Commit Graph

49 Commits

Author SHA1 Message Date
Philippe Tillet
ce7c0a2b10 [CI] Changed triton-nightly to --pre triton (#78)
The solution proposed in #77 can create namespace conflicts when triton and triton-nightly have both been pip installed. Therefore, this PR is moving nightly releases to pre-releases in the main triton index.
2021-03-23 03:32:51 -04:00
Philippe Tillet
9c05ec148f [BUILD] Added automatic nightly build releases to pip in CI; removed build-time dependence on LLVM and PyTorch (#77)
Recently there has been more and more report about installation issues:

    - Installing Triton before upgrading pytorch can create some issues because Triton uses some torch headers

    - llvm-10-dev not available on some platform; llvm-11-dev not available on e.g. Ubuntu.
    absence of nightly builds

This PR should fix all these issues. Some CMake tricks are used to download and install llvm at build time. Triton Python bindings were modified to remove dependence on pytorch ops. Midnight CI job added to generate binary wheels for all Triton version and update them on pypi's new triton-nightly project.

This PR will also make it very easy to use LLVM forks in the future for whatever needs we have.
2021-03-22 20:03:37 -04:00
Philippe Tillet
2f8f0042a9 [DOCS] Added matrix multiplication tutorial 2021-03-15 13:57:41 -04:00
Philippe Tillet
58207d4647 [PYTHON] CUTLASS wrapper for fair benchmarks (#75)
Before this commit, the benchmarking infrastructure used heterogeneous protocols between library (e.g., CUTLASS uses a C++ binary that reports mean TFLOPS; torch and triton use python call and report 10th, 50th and 90th quantiles). For the sake of uniformity and fair benchmark practices, this PR adds a python wrapper for auto-tuned CUTLASS matrix multiplication. Benchmarks have been rewritten to use this wrapper with `triton.testing.do_bench` rather than system calls to CUTLASS profiler. Importantly, this also ensures that all the matmuls are done on the *same* input data which should stabilize clock across providers.
2021-03-09 16:32:44 -05:00
Philippe Tillet
15f8e8c3b7 [CODEGEN] Major performance improvements on A100 (#70)
Improved handling of asynchronous copy, scheduling and synchronization for A100. Now achieving CUTLASS-like performance on large square dense matrix multiplication tasks
2021-02-21 18:19:39 -05:00
Philippe Tillet
0125ab1740 [CI] Added benchmarking to CI script (#65) 2021-02-10 14:01:47 -05:00
Philippe Tillet
53fd9631ef [PYTHON] Added automated benchmark script (#63)
This adds a bench functionality to the setup.py that can be used to run the benchmark suite and generates a bunch of csv files (and optionally plots)

python setup.py bench
python setup.py bench --with-plots
python setup.py bench --filter=cross_entropy
2021-02-08 15:16:41 -05:00
Philippe Tillet
ffb1e14268 [TUTORIALS] Fixed TYPO in CMakeLists.txt 2021-01-31 13:36:55 -05:00
Philippe Tillet
79d098450f [PYTHON][TESTS][DOC] Various improvement of the API and code quality:
* Simplified `triton.kernel` API to achieve lower latency:
  > .data_ptr() must now be passed as kernel argument. No more implicit
conversion from torch.tensor
  > compilation options are now constant attributes, i.e., opt.d('VAR')
becomes opt.VAR
  > torch.device must now be passed explicitly to triton.kernel (no
longer inferred from torch.tensor arguments)
* C++ tests moved to `python/tests/`
* C++ tutorial created in `tutorials/`
* Python tutorial created in python/tutorials/
* Version changed to 1.0alpha
* No longer copying C++ headers into the Python package
* added python/triton/ops/ package for pre-written Triton ops
2021-01-29 17:27:16 -05:00
Philippe Tillet
af080740f2 [GENERAL] Merged v1.0alpha into master. Added features are:
- A100 support via mma.16816
- Thread swizzling for conflict-free shared memory accesses without
padding
- Complete overhaul of the LLVM code generation in
codegen/selection/generator.cc to remove overengineering
- Added debugging capabilities in the Python binding
- Compilation error for kernels that spill
2021-01-11 19:23:24 -05:00
Philippe Tillet
d913cbd916 [VERSION] 0.2.3 -> 0.3.0 2020-12-08 23:34:55 -05:00
Philippe Tillet
fa066b531c [PYTHON] Compiling Triton in Release mode now... 2020-11-13 01:44:52 -05:00
Philippe Tillet
a2d54b5ad3 [General] LLVM-9 -> LLVM-10 2020-11-07 22:46:18 -05:00
Philippe Tillet
c1920cbabb [PYTHON] Fixed torch ABI issue 2020-11-05 12:37:00 -05:00
Philippe Tillet
9be1d5afc2 [GENERAL] Various improvements:
* Sparse einsum in triton.ops.einsum
* Hacky support for fixed-tile-size atomic-add
* Various bugfixes in parser
2020-10-25 12:16:40 -07:00
Philippe Tillet
0cbee3ec56 [CODEGEN] More work on the CPU backend 2020-09-14 10:59:40 -04:00
Philippe Tillet
526a3468e0 [Version] Now version 0.2.3 2020-09-03 14:36:30 -04:00
Philippe Tillet
010f85e91d [VERSION] Now version 0.2.2 2020-08-31 15:16:09 -04:00
Philippe Tillet
30ac1359b9 [RUNTIME] Lower-level interface for executing functions 2020-08-12 18:33:35 -04:00
Philippe Tillet
ec923cfc5e [PACKAGING] Now version 0.2.1 2020-07-29 14:07:28 -04:00
Philippe Tillet
3683b38963 [PACKAGING] Now version 0.2.0 2020-07-14 19:50:39 -04:00
Philippe Tillet
b48460f51c [PACKAGING] Now version 0.1.3 2020-06-05 12:01:09 -04:00
Philippe Tillet
f8614b2490 [PACKAGING] Now version 0.1.2 2020-05-12 20:50:52 -04:00
Philippe Tillet
8f9233e546 [LANG] Fixed undefined behavior in replace_all_uses_with() 2020-05-12 20:31:10 -04:00
Philippe Tillet
b9e36331be [PACKAGING] sdist now generates working .tar.gz file 2020-05-04 10:43:38 -04:00
Philippe Tillet
c3d4a8b7ae [PACKAGING] Fixed import error 2020-05-04 10:14:34 -04:00
Philippe Tillet
0685fcb804 [PACKAGING] Added MANIFEST.in and some symlinks for better packaging 2020-05-04 10:09:30 -04:00
Philippe Tillet
1e7fee573b [PACKAGING] Fixed typo in setup.py 2020-05-04 09:09:54 -04:00
Philippe Tillet
dc2ded4165 [PACKAGING] Added some more files for packaging 2020-05-04 08:58:58 -04:00
Philippe Tillet
e04efc1c85 [GENERAL] Error messages now no longer make terminal color green 2020-04-03 23:25:29 -04:00
Jack Turner
53b9e4790e [PYTHON] Add empty string to llvm-config versions in setup.py 2020-03-13 18:03:25 +00:00
Philippe Tillet
cc094936d0 [PYTHON][SETUP] Removed obsolete debug print() 2020-02-24 21:35:45 -05:00
Philippe Tillet
67c633aa2d [PYTHON] Better packaging 2020-02-24 17:46:20 -05:00
Philippe Tillet
f278d9741a [GENERAL] Merged einsum feature branch. Various feature, performance
improvements and bugfixes:

* Added preliminary support for extended Einstein summation in PyTriton
* Significant performance improvement on FP32 kernels containing matrix
multiplication
* Added re-coalescing pass for FP16 kernels containing matrix
multiplication
* Various bugfixes
2020-01-20 12:42:48 -05:00
Philippe Tillet
d65a94c768 [PYTHON][OPS] Added batch normalization op 2019-10-29 17:29:11 -04:00
Philippe Tillet
e9c787ef05 [PYTHON][EINSUM] Added support for FP16 2019-10-28 14:07:17 -04:00
Philippe Tillet
0405509190 [python] setup.py now finds LLVM version if available 2019-09-05 17:47:53 -04:00
Philippe Tillet
0a6329ea7d [python] more robust way to add triton includes to python package 2019-09-05 16:01:56 -04:00
Philippe Tillet
7bfbb89612 [python] now packaging include and libtriton in triton._C submodule 2019-09-05 15:37:00 -04:00
Philippe Tillet
58544d0523 [python] renamed src/tensorflow.cc -> src/bindings.cc 2019-09-05 09:39:58 -04:00
Philippe Tillet
ed0f706005 [python] fixed various issues in pytorch supoport 2019-09-05 00:19:42 -04:00
Philippe Tillet
945b5d0de9 [python] modularized triton package 2019-09-04 21:55:47 -04:00
Philippe Tillet
b747959a57 trying to work around tensorflow limitations 2019-09-04 01:54:43 -04:00
Philippe Tillet
2ccc915011 [python][examples] added template for blocksparse 2019-09-03 20:44:27 -04:00
Philippe Tillet
d457482539 [codegen] fixed issue in double buffering pointer update 2019-08-28 17:50:45 -07:00
Philippe Tillet
321d268a4a more progress 2019-08-25 21:26:09 -07:00
Philippe Tillet
b4a9ed9663 [python] added basic tensorflow support 2019-08-17 18:18:26 -07:00
Philippe Tillet
11a6a92598 [python][tensorflow] basic op generation is working 2019-08-16 20:50:18 -07:00
Philippe Tillet
4de22df930 [python] added skeleton for python interface 2019-08-15 20:50:10 -07:00