This patch add tests when lowering multiple gpu.all_reduce operations in the same kernel. This was previously failing.
Details
Diff Detail
Event Timeline
mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp | ||
---|---|---|
386 | It would be better to use SymbolTable::insert for this. See KernelOutlining.cpp for an example. |
@herhut Thanks for the pointer to SymbolTable::insert. I have updated the patch accordingly.
csigg@ just landed some code that does in-dialect lowering and should achieve the same that is done here via using function attributions, instead. Can you verify?
The patch from @csigg works fine. I updated the patch with just the tests if it makes sense to add them. Otherwise just discard the patch.
Thanks for the extra tests, more tests are always better. Could you fix the Summary in the commit message and I will land it.
mlir/test/Dialect/GPU/multiple-all-reduce.mlir | ||
---|---|---|
22 | We should not rely on actual names here, as those might change. Does this test currently pass? In any case, please use @{{.*}} instead. |
@herhut I updated the test. It was passing but for sure if the name of the buffer were to change it would fail as you mentioned. By the way I heard from Medhi that if I used arc the attribution would be done correctly for the patch. Will use it for my next patches.
@ftynse Thanks for the review. As I do not have commit right, do you mind pushing this patch? I did not create it with arc so attribution my not be done correctly.
It would be better to use SymbolTable::insert for this. See KernelOutlining.cpp for an example.