You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Heads up that a new LLVM version will cause macros from TritonGPUToLLVM/Utility.h to be expanded in LLVM's own headers and lead to compilation failures. To work around that we currently have this hack, which is obviously far from ideal.
I'm wondering how folks here would want to solve this issue? I do get the convenience of using these macros, but TBH they always seemed to me like quite a footgun with fallout from it just waiting to happen. My suggestion would be to replace them with a class LLVMBuilder that encapsulates loc and rewriter and defines the methods that used to be macros. Something like this:
LLVMBuilder b(rewriter, loc);
...
r = b.fma(a, b, c);
...
This way it's still quite concise, but avoids all the issues with macros.
WDYT?
The text was updated successfully, but these errors were encountered:
gflegar
changed the title
New LLVM version will conflict with macros defined in triton/Conversion/TritonGPUToLLVM/Utility.h
New LLVM version will conflict with macros defined in TritonGPUToLLVM/Utility.h
Jan 24, 2025
Heads up that a new LLVM version will cause macros from TritonGPUToLLVM/Utility.h to be expanded in LLVM's own headers and lead to compilation failures. To work around that we currently have this hack, which is obviously far from ideal.
I'm wondering how folks here would want to solve this issue? I do get the convenience of using these macros, but TBH they always seemed to me like quite a footgun with fallout from it just waiting to happen. My suggestion would be to replace them with a class
LLVMBuilder
that encapsulatesloc
andrewriter
and defines the methods that used to be macros. Something like this:This way it's still quite concise, but avoids all the issues with macros.
WDYT?
The text was updated successfully, but these errors were encountered: