triton
triton copied to clipboard
[AMD] [triton-opt] Add AMD passes to triton-opt
This PR adds AMD specific passes to triton-opt.
This is needed to test changes from #3060
@micmelesse PTAL
I think one problem with this approach is that it will fail to link if triton
is built without AMD support and the AMD targets don't exist. I think our CMake already has a mechanism to create a list with all the targets that were created?
@ptillet
I've wrapped code in USE_ROCM
macro and added checks in CMake files.
Another approach I can think is a separate tool, something like triton-amd-opt
.
What do you think?
@binarman I think there may be a third approach, which is to rely on add_triton_library
/ add_triton_object
, so the target will be automatically added only if they are compiled. This would avoid having amd-specific stuff in our cmakes
@ptillet I've removed AMD stuff from common cmakes, could you take a look?
@ptillet @ThomasRaoux I've rebased this PR and removed some unused stuff, could you take a look again?