Skip to content

[Backend] Update to llvm/llvm-project@1d4801f22ab #6352

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 1, 2025

Conversation

makslevental
Copy link
Contributor

@makslevental makslevental commented Mar 31, 2025

Needed to pick up llvm/llvm-project#133556
and fix breakages on main.

@makslevental makslevental requested a review from ptillet as a code owner March 31, 2025 19:39
@ThomasRaoux ThomasRaoux merged commit 52e7a4b into triton-lang:main Apr 1, 2025
8 checks passed
@FindHao
Copy link

FindHao commented Apr 1, 2025

Hi, I found the recently llvm bumps breaks my local compilation, and still experiencing compilation errors with this PR like the below. I have to rebase my local branch to commit e196446 in Mar 20th. Can you tell me if there is a way to solve it before triton main branch fix it? Thanks!

 cc1plus: note: unrecognized command-line option ‘-Wno-covered-switch-default’ may have been intended to silence earlier diagnostics
      cc1plus: all warnings being treated as errors
      [89/207] Building CXX object lib/Conversion/TritonGPUToLLVM/CMakeFiles/TritonGPUToLLVM.dir/ElementwiseOpToLLVM.cpp.o
      FAILED: lib/Conversion/TritonGPUToLLVM/CMakeFiles/TritonGPUToLLVM.dir/ElementwiseOpToLLVM.cpp.o
      /home/yhao/miniconda3/envs/pta/bin/ccache /usr/bin/c++ -DGTEST_HAS_RTTI=0 -I/home/yhao/ptf/triton/python/build/cmake.linux-x86_64-cpython-3.11/lib/Conversion/TritonGPUToLLVM -I/home/yhao/ptf/triton/lib/Conversion/TritonGPUToLLVM -I/home/yhao/ptf/triton/include -I/home/yhao/ptf/triton/. -I/home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include -I/home/yhao/ptf/triton/python/build/cmake.linux-x86_64-cpython-3.11/include -I/home/yhao/ptf/triton/third_party -I/home/yhao/ptf/triton/python/build/cmake.linux-x86_64-cpython-3.11/third_party -D__STDC_FORMAT_MACROS  -fPIC -std=gnu++17 -Werror -Wno-covered-switch-default -fvisibility=hidden -g -std=gnu++17  -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Conversion/TritonGPUToLLVM/CMakeFiles/TritonGPUToLLVM.dir/ElementwiseOpToLLVM.cpp.o -MF lib/Conversion/TritonGPUToLLVM/CMakeFiles/TritonGPUToLLVM.dir/ElementwiseOpToLLVM.cpp.o.d -o lib/Conversion/TritonGPUToLLVM/CMakeFiles/TritonGPUToLLVM.dir/ElementwiseOpToLLVM.cpp.o -c /home/yhao/ptf/triton/lib/Conversion/TritonGPUToLLVM/ElementwiseOpToLLVM.cpp
      In file included from /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/mlir/Conversion/LLVMCommon/StructBuilder.h:18,
                       from /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/mlir/Conversion/LLVMCommon/MemRefBuilder.h:17,
                       from /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/mlir/Conversion/LLVMCommon/Pattern.h:12,
                       from /home/yhao/ptf/triton/lib/Conversion/TritonGPUToLLVM/ElementwiseOpToLLVM.cpp:1:
      /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/mlir/IR/Value.h:77:41: error: ‘retain’ attribute ignored [-Werror=attributes]
         77 |   LLVM_DUMP_METHOD Type debug_getType() const { return getType(); }
            |                                         ^~~~~
      /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/mlir/IR/Value.h:78:41: error: ‘retain’ attribute ignored [-Werror=attributes]
         78 |   LLVM_DUMP_METHOD Kind debug_getKind() const { return getKind(); }
            |                                         ^~~~~
      In file included from /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/mlir/IR/OpDefinition.h:24,
                       from /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/mlir/IR/Builders.h:12,
                       from /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/mlir/IR/PatternMatch.h:12,
                       from /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/mlir/Rewrite/FrozenRewritePatternSet.h:12,
                       from /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/mlir/Transforms/DialectConversion.h:17,
                       from /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/mlir/Conversion/LLVMCommon/TypeConverter.h:19,
                       from /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/mlir/Conversion/LLVMCommon/Pattern.h:13,
                       from /home/yhao/ptf/triton/lib/Conversion/TritonGPUToLLVM/ElementwiseOpToLLVM.cpp:1:
      /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/mlir/IR/Operation.h:328:36: error: ‘retain’ attribute ignored [-Werror=attributes]
        328 |   LLVM_DUMP_METHOD void dumpPretty();
            |                                    ^
      /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/mlir/IR/Operation.h:1029:52: error: ‘retain’ attribute ignored [-Werror=attributes]
       1029 |   LLVM_DUMP_METHOD operand_range debug_getOperands() { return getOperands(); }
            |                                                    ^
      /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/mlir/IR/Operation.h:1030:50: error: ‘retain’ attribute ignored [-Werror=attributes]
       1030 |   LLVM_DUMP_METHOD result_range debug_getResults() { return getResults(); }
            |                                                  ^
      /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/mlir/IR/Operation.h:1031:55: error: ‘retain’ attribute ignored [-Werror=attributes]
       1031 |   LLVM_DUMP_METHOD SuccessorRange debug_getSuccessors() {
            |                                                       ^
      /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/mlir/IR/Operation.h:1034:61: error: ‘retain’ attribute ignored [-Werror=attributes]
       1034 |   LLVM_DUMP_METHOD MutableArrayRef<Region> debug_getRegions() {
            |                                                             ^
      In file included from /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/llvm/Support/CFGDiff.h:20,
                       from /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/llvm/Support/GenericDomTree.h:32,
                       from /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/mlir/IR/Dominance.h:23,
                       from /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/mlir/Interfaces/MemorySlotInterfaces.h:12,
                       from /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/mlir/Dialect/LLVMIR/LLVMTypes.h:19,
                       from /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/mlir/Dialect/LLVMIR/LLVMAttrs.h:17,
                       from /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/mlir/Conversion/LLVMCommon/Pattern.h:14,
                       from /home/yhao/ptf/triton/lib/Conversion/TritonGPUToLLVM/ElementwiseOpToLLVM.cpp:1:
      /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/llvm/Support/CFGUpdate.h:52:32: error: ‘retain’ attribute ignored [-Werror=attributes]
         52 |   LLVM_DUMP_METHOD void dump() const { print(dbgs()); }
            |                                ^~~~~
      In file included from /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/llvm/Support/GenericDomTree.h:32,
                       from /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/mlir/IR/Dominance.h:23,
                       from /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/mlir/Interfaces/MemorySlotInterfaces.h:12,
                       from /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/mlir/Dialect/LLVMIR/LLVMTypes.h:19,
                       from /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/mlir/Dialect/LLVMIR/LLVMAttrs.h:17,
                       from /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/mlir/Conversion/LLVMCommon/Pattern.h:14,
                       from /home/yhao/ptf/triton/lib/Conversion/TritonGPUToLLVM/ElementwiseOpToLLVM.cpp:1:
      /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/llvm/Support/CFGDiff.h:172:32: error: ‘retain’ attribute ignored [-Werror=attributes]
        172 |   LLVM_DUMP_METHOD void dump() const { print(dbgs()); }
            |                                ^~~~~
      In file included from /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/mlir/Analysis/DataFlow/SparseAnalysis.h:18,
                       from /home/yhao/ptf/triton/include/triton/Analysis/AxisInfo.h:4,
                       from /home/yhao/ptf/triton/include/triton/Conversion/TritonGPUToLLVM/ElementwiseOpToLLVMBase.h:7,
                       from /home/yhao/ptf/triton/lib/Conversion/TritonGPUToLLVM/ElementwiseOpToLLVM.cpp:4:
      /home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include/mlir/Analysis/DataFlowFramework.h:470:32: error: ‘retain’ attribute ignored [-Werror=attributes]
        470 |   LLVM_DUMP_METHOD void dump() const;
            |                                ^~~~~
      cc1plus: note: unrecognized command-line option ‘-Wno-covered-switch-default’ may have been intended to silence earlier diagnostics
      cc1plus: all warnings being treated as errors
      [90/207] Building CXX object lib/Conversion/TritonToTritonGPU/CMakeFiles/TritonToTritonGPU.dir/TritonToTritonGPUPass.cpp.o
      FAILED: lib/Conversion/TritonToTritonGPU/CMakeFiles/TritonToTritonGPU.dir/TritonToTritonGPUPass.cpp.o
      /home/yhao/miniconda3/envs/pta/bin/ccache /usr/bin/c++ -DGTEST_HAS_RTTI=0 -I/home/yhao/ptf/triton/python/build/cmake.linux-x86_64-cpython-3.11/lib/Conversion/TritonToTritonGPU -I/home/yhao/ptf/triton/lib/Conversion/TritonToTritonGPU -I/home/yhao/ptf/triton/include -I/home/yhao/ptf/triton/. -I/home/yhao/.triton/llvm/llvm-1d4801f2-ubuntu-x64/include -I/home/yhao/ptf/triton/python/build/cmake.linux-x86_64-cpython-3.11/include -I/home/yhao/ptf/triton/third_party -I/home/yhao/ptf/triton/python/build/cmake.linux-x86_64-cpython-3.11/third_party -D__STDC_FORMAT_MACROS  -fPIC -std=gnu++17 -Werror -Wno-covered-switch-default -fvisibility=hidden -g -std=gnu++17  -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Conversion/TritonToTritonGPU/CMakeFiles/TritonToTritonGPU.dir/TritonToTritonGPUPass.cpp.o -MF lib/Conversion/TritonToTritonGPU/CMakeFiles/TritonToTritonGPU.dir/TritonToTritonGPUPass.cpp.o.d -o lib/Conversion/TritonToTritonGPU/CMakeFiles/TritonToTritonGPU.dir/TritonToTritonGPUPass.cpp.o -c /home/yhao/ptf/triton/lib/Conversion/TritonToTritonGPU/TritonToTritonGPUPass.cpp

@makslevental makslevental deleted the makslevental/llvm-bump-3 branch April 1, 2025 19:21
@makslevental
Copy link
Contributor Author

makslevental commented Apr 1, 2025

@FindHao this is due to an upstream change llvm/llvm-project#133025. There's a fix coming llvm/llvm-project#133793 - I'll watch and bump again after it lands. For now adding -Wno-error=attributes to CMAKE_CXX_FLAGS should unblock.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants