triton icon indicating copy to clipboard operation
triton copied to clipboard

[AMD] [triton-opt] Add AMD passes to triton-opt

Open binarman opened this issue 1 year ago • 5 comments

This PR adds AMD specific passes to triton-opt.

binarman avatar Feb 06 '24 12:02 binarman

This is needed to test changes from #3060

binarman avatar Feb 06 '24 12:02 binarman

@micmelesse PTAL

binarman avatar Feb 06 '24 17:02 binarman

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 avatar Feb 06 '24 20:02 ptillet

@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 avatar Feb 07 '24 15:02 binarman

@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 avatar Feb 08 '24 05:02 ptillet

@ptillet I've removed AMD stuff from common cmakes, could you take a look?

binarman avatar Feb 21 '24 19:02 binarman

@ptillet @ThomasRaoux I've rebased this PR and removed some unused stuff, could you take a look again?

binarman avatar Feb 28 '24 17:02 binarman