Add a constant propagator for gpu.launch op in cases where the
grid/thread IDs can be trivially determined to take a single constant
value of zero.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
| mlir/lib/Dialect/GPU/IR/GPUDialect.cpp | ||
|---|---|---|
| 568 | nit: you can do return success(simplified); | |
| mlir/lib/Dialect/GPU/IR/GPUDialect.cpp | ||
|---|---|---|
| 540–543 | You should be able to use m_One in place of this. | |
Comment Actions
Nice, thanks! I just have a nit about the comment. In case you touch this again anyway.
| mlir/lib/Dialect/GPU/IR/GPUDialect.cpp | ||
|---|---|---|
| 534 | This comment for me read as if this only applies if all of them are one. Maybe when the range of a thread or block ID? | |
| mlir/lib/Dialect/GPU/IR/GPUDialect.cpp | ||
|---|---|---|
| 534 | Thanks. I'll take care of this and the other comment from River below in an NFC PR in an hour. | |
This comment for me read as if this only applies if all of them are one. Maybe when the range of a thread or block ID?