文件最后提交记录最后更新时间
[BACKEND] add folder for AdvanceOp (#4240) add a folder pattern for AdvanceOp: advance(ptr, 0, 0) -> ptr1 年前
[Triton] Use UnitAttr in tt.reshape definition (#4947) Make allow_reorder and efficient_layout UnitAttr for a cleaner interface. This way, the operation exposes a bool getEfficientLayout() member to check for that attribute and a constructor receiving bool arguments for both of these attributes (defaulted to false). The core Triton is a small number of people, and we receive many PRs (thank you!). To help us review your code more quickly, **if you are a new contributor (less than 3 PRs merged) we ask that you complete the following tasks and include the filled-out checklist in your PR description.** Complete the following tasks before sending your PR, and replace [ ] with [x] to indicate you have done them. - [X] I am not making a trivial change, such as fixing a typo in a comment. - [X] I have written a PR description following these [rules](https://cbea.ms/git-commit/#why-not-how). - [X] I have run pre-commit run --from-ref origin/main --to-ref HEAD. - Select one of the following. - [X] I have added tests. - /test for lit tests - /unittest for C++ tests - /python/test for end-to-end tests - [ ] This PR does not need a test because FILL THIS IN. - Select one of the following. - [ ] I have not added any lit tests. - [X] The lit tests I have added follow these [best practices](https://mlir.llvm.org/getting_started/TestingGuide/#filecheck-best-practices), including the "tests should be minimal" section. (Usually running Python code and using the instructions it generates is not minimal.) Signed-off-by: victor-eds <victor.perez@codeplay.com>1 年前
[Triton] Verify all tt.reduce operands have the same shape (#4957) Add SameOperandsShape to tt.reduce to verify all operands have the same shape. This matches triton.language.reduce (and similar) semantics. This change may enable further optimizations and even may help simplify the code dealing with this operation. Followup PRs will tackle this. The core Triton is a small number of people, and we receive many PRs (thank you!). To help us review your code more quickly, **if you are a new contributor (less than 3 PRs merged) we ask that you complete the following tasks and include the filled-out checklist in your PR description.** Complete the following tasks before sending your PR, and replace [ ] with [x] to indicate you have done them. - [X] I am not making a trivial change, such as fixing a typo in a comment. - [X] I have written a PR description following these [rules](https://cbea.ms/git-commit/#why-not-how). - [X] I have run pre-commit run --from-ref origin/main --to-ref HEAD. - Select one of the following. - [X] I have added tests. - /test for lit tests - /unittest for C++ tests - /python/test for end-to-end tests - [ ] This PR does not need a test because FILL THIS IN. - Select one of the following. - [ ] I have not added any lit tests. - [X] The lit tests I have added follow these [best practices](https://mlir.llvm.org/getting_started/TestingGuide/#filecheck-best-practices), including the "tests should be minimal" section. (Usually running Python code and using the instructions it generates is not minimal.) Signed-off-by: victor-eds <victor.perez@codeplay.com>1 年前
[BACKEND] Add a loop unroller pass (#4645) Adding a loop unroller pass which applies to only loops with unroll annotation. An annotated loop will look like: ``` scf.for %arg5 = %c0_i32 to %arg3 step %c32_i32 : i32 { ... } {tt.loop_unroll_factor = 2 : i32} ```1 年前
[Triton] Use UnitAttr in tt.reshape definition (#4947) Make allow_reorder and efficient_layout UnitAttr for a cleaner interface. This way, the operation exposes a bool getEfficientLayout() member to check for that attribute and a constructor receiving bool arguments for both of these attributes (defaulted to false). The core Triton is a small number of people, and we receive many PRs (thank you!). To help us review your code more quickly, **if you are a new contributor (less than 3 PRs merged) we ask that you complete the following tasks and include the filled-out checklist in your PR description.** Complete the following tasks before sending your PR, and replace [ ] with [x] to indicate you have done them. - [X] I am not making a trivial change, such as fixing a typo in a comment. - [X] I have written a PR description following these [rules](https://cbea.ms/git-commit/#why-not-how). - [X] I have run pre-commit run --from-ref origin/main --to-ref HEAD. - Select one of the following. - [X] I have added tests. - /test for lit tests - /unittest for C++ tests - /python/test for end-to-end tests - [ ] This PR does not need a test because FILL THIS IN. - Select one of the following. - [ ] I have not added any lit tests. - [X] The lit tests I have added follow these [best practices](https://mlir.llvm.org/getting_started/TestingGuide/#filecheck-best-practices), including the "tests should be minimal" section. (Usually running Python code and using the instructions it generates is not minimal.) Signed-off-by: victor-eds <victor.perez@codeplay.com>1 年前
[IR] Rework textual IR for load, store, dot, and other ops (#3587) The initial motivation for this change was that tt.dot's inputPrecision value was printed in textual IR not as a string (e.g. "tf32") but as an opaque number. The trick to fixing this is to explicitly list the attr in the assemblyFormat, instead of relying on attr-dict. attr-dict prints the attr as an integer, but if we list it explicitly, it will be printed as a string. But when I fixed this, I realized that many other ops, such as load and store, also had enums which were printed as numbers rather than strings. So I had to fix those, too. I also added reasonable defaults for most of the arguments to make the textual IR more concise. I then noticed that load and store had complicated asm parsers to handle the fact usually the pointer type was not specified, but sometimes it was necessary. This is because given e.g. load : tensor<128xf32> the pointer may be either tensor<128x!tt.ptr<f32>> (the default) or !tt.ptr<tensor<128xf32>> (for block pointers). So I fixed this too. Now load and store specify the *pointer* type instead of the value type. This lets us use the built-in asm parser and delete a bunch of code. I also noticed that we had a bunch of dead ttgir tests (actually it seems like these were never enabled); rather than attempt to update them, without any way to test it, I just deleted them. Thanks to @joker-eph for suggesting the solution here -- I never would have figured this out on my own.2 年前
[BACKEND] Update LLVM to llvm/llvm-project@657ec7320d8a (#4147) Upgrading LLVM repo again, because we need a feature that has been recently submitted in https://github.com/llvm/llvm-project/pull/95057 Changes made: - MathExtras has been merged with its LLVM version. So I had to replace mlir::ceilDiv with llvm:divideCeilSigned1 年前
[Backend] Update scf.if result uses in RewriteTensorPointer pass (#4893) I ran into an error in the RewriteTensorPointer pass. In my IR, there's an scf.if that produces a non-pointer result. The rewriteIfOp() created a new scf.if, but the use of scf.if result is still referencing the old one, which caused a compile error. In this patch, I updated all uses of scf.if with the results of the new if-op.1 年前
[IR] Rework textual IR for load, store, dot, and other ops (#3587) The initial motivation for this change was that tt.dot's inputPrecision value was printed in textual IR not as a string (e.g. "tf32") but as an opaque number. The trick to fixing this is to explicitly list the attr in the assemblyFormat, instead of relying on attr-dict. attr-dict prints the attr as an integer, but if we list it explicitly, it will be printed as a string. But when I fixed this, I realized that many other ops, such as load and store, also had enums which were printed as numbers rather than strings. So I had to fix those, too. I also added reasonable defaults for most of the arguments to make the textual IR more concise. I then noticed that load and store had complicated asm parsers to handle the fact usually the pointer type was not specified, but sometimes it was necessary. This is because given e.g. load : tensor<128xf32> the pointer may be either tensor<128x!tt.ptr<f32>> (the default) or !tt.ptr<tensor<128xf32>> (for block pointers). So I fixed this too. Now load and store specify the *pointer* type instead of the value type. This lets us use the built-in asm parser and delete a bunch of code. I also noticed that we had a bunch of dead ttgir tests (actually it seems like these were never enabled); rather than attempt to update them, without any way to test it, I just deleted them. Thanks to @joker-eph for suggesting the solution here -- I never would have figured this out on my own.2 年前
Add verifier for MakeRangeOp. (#2660) Add verifier for MakeRangeOp. Checks that the op returns a 1D tensor of i32s. I also removed "TODO: should have ConstantLike as a trait" from the op. AFAICT, ConstantLike should only be used for ops that we *always* want to fold. But we only want to fold MakeRangeOp when it's "small", in the current implementation 1 element. If I mark the op as ConstantLike, it seems to get unconditionally folded, and fold() must always succeed (otherwise MLIR asserts).2 年前