Skip to content
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

Build issues with latest Triton LLVM #8

Open
coleramos425 opened this issue Dec 2, 2024 · 0 comments
Open

Build issues with latest Triton LLVM #8

coleramos425 opened this issue Dec 2, 2024 · 0 comments

Comments

@coleramos425
Copy link
Collaborator

When attempting to build from main with the latest version of Triton LLVM on HPCFund I encountered the following error. Looks related to the new function signature of registerPipelineEarlySimplificationEPCallback() (llvm/llvm-project@dc45ff1).

Should be fixed by #6.

(instrument) [colramos@login1 build]$ cmake -DCMAKE_C_COMPILER=/opt/rocm-6.2.1/bin/amdclang -DCMAKE_CXX_COMPILER=/opt/rocm-6.2.1/bin/amdclang++ -DLLVM_INSTALL_DIR=$HOME/.triton/llvm/llvm-86b69c31-ubuntu-x64 ..
-- The C compiler identification is Clang 18.0.0
-- The CXX compiler identification is Clang 18.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/rocm-6.2.1/bin/amdclang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/rocm-6.2.1/bin/amdclang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.11") 
-- Found LibXml2: /usr/lib64/libxml2.so (found version "2.9.13") 
-- Found LLVM 20.0.0git
-- Using LLVMConfig.cmake in: /home1/colramos/.triton/llvm/llvm-86b69c31-ubuntu-x64
LLVM STATUS:
  Definitions -D_GNU_SOURCE -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
  Includes    /home1/colramos/.triton/llvm/llvm-86b69c31-ubuntu-x64/include
  Libraries   /home1/colramos/.triton/llvm/llvm-86b69c31-ubuntu-x64/lib
  Targets     NVPTX;AMDGPU;X86
-- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG
-- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /work1/amd/colramos/audacious/instrument-amdgpu-kernels/build
(instrument) [colramos@login1 build]$ make
[ 10%] Building CXX object lib/CMakeFiles/InjectAMDGCNFunction.dir/InjectAMDGCNFunction.cpp.o
/work1/amd/colramos/audacious/instrument-amdgpu-kernels/lib/InjectAMDGCNFunction.cpp:28:55: warning: 'getDeclaration' is deprecated: Use getOrInsertDeclaration instead [-Wdeprecated-declarations]
   28 |       Function *WorkItemXIDIntrinsicFunc = Intrinsic::getDeclaration(
      |                                                       ^~~~~~~~~~~~~~
      |                                                       getOrInsertDeclaration
/home1/colramos/.triton/llvm/llvm-86b69c31-ubuntu-x64/include/llvm/IR/Intrinsics.h:100:3: note: 'getDeclaration' has been explicitly marked deprecated here
  100 |   LLVM_DEPRECATED("Use getOrInsertDeclaration instead",
      |   ^
/home1/colramos/.triton/llvm/llvm-86b69c31-ubuntu-x64/include/llvm/Support/Compiler.h:234:50: note: expanded from macro 'LLVM_DEPRECATED'
  234 | #define LLVM_DEPRECATED(MSG, FIX) __attribute__((deprecated(MSG, FIX)))
      |                                                  ^
/work1/amd/colramos/audacious/instrument-amdgpu-kernels/lib/InjectAMDGCNFunction.cpp:46:9: error: no viable conversion from '(lambda at /work1/amd/colramos/audacious/instrument-amdgpu-kernels/lib/InjectAMDGCNFunction.cpp:46:9)' to 'const std::function<void (ModulePassManager &, OptimizationLevel, ThinOrFullLTOPhase)>' (aka 'const function<void (PassManager<Module> &, llvm::OptimizationLevel, llvm::ThinOrFullLTOPhase)>')
   46 |         [&](ModulePassManager &MPM, auto) {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   47 |           MPM.addPass(InjectAMDGCNFunc());
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   48 |           return true;
      |           ~~~~~~~~~~~~
   49 |         });
      |         ~
/usr/lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/bits/std_function.h:375:7: note: candidate constructor not viable: no known conversion from '(lambda at /work1/amd/colramos/audacious/instrument-amdgpu-kernels/lib/InjectAMDGCNFunction.cpp:46:9)' to 'nullptr_t' (aka 'std::nullptr_t') for 1st argument
  375 |       function(nullptr_t) noexcept
      |       ^        ~~~~~~~~~
/usr/lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/bits/std_function.h:386:7: note: candidate constructor not viable: no known conversion from '(lambda at /work1/amd/colramos/audacious/instrument-amdgpu-kernels/lib/InjectAMDGCNFunction.cpp:46:9)' to 'const function<void (PassManager<Module> &, OptimizationLevel, ThinOrFullLTOPhase)> &' for 1st argument
  386 |       function(const function& __x)
      |       ^        ~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/bits/std_function.h:404:7: note: candidate constructor not viable: no known conversion from '(lambda at /work1/amd/colramos/audacious/instrument-amdgpu-kernels/lib/InjectAMDGCNFunction.cpp:46:9)' to 'function<void (PassManager<Module> &, OptimizationLevel, ThinOrFullLTOPhase)> &&' for 1st argument
  404 |       function(function&& __x) noexcept
      |       ^        ~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/bits/std_function.h:435:2: note: candidate template ignored: requirement '_Callable<(lambda at /work1/amd/colramos/audacious/instrument-amdgpu-kernels/lib/InjectAMDGCNFunction.cpp:46:9), (lambda at /work1/amd/colramos/audacious/instrument-amdgpu-kernels/lib/InjectAMDGCNFunction.cpp:46:9), std::__invoke_result<(lambda at /work1/amd/colramos/audacious/instrument-amdgpu-kernels/lib/InjectAMDGCNFunction.cpp:46:9) &, llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>> &, llvm::OptimizationLevel, llvm::ThinOrFullLTOPhase>>::value' was not satisfied [with _Functor = (lambda at /work1/amd/colramos/audacious/instrument-amdgpu-kernels/lib/InjectAMDGCNFunction.cpp:46:9)]
  435 |         function(_Functor&& __f)
      |         ^
/home1/colramos/.triton/llvm/llvm-86b69c31-ubuntu-x64/include/llvm/Passes/PassBuilder.h:484:54: note: passing argument to parameter 'C' here
  484 |                                ThinOrFullLTOPhase)> &C) {
      |                                                      ^
1 warning and 1 error generated.
make[2]: *** [lib/CMakeFiles/InjectAMDGCNFunction.dir/build.make:76: lib/CMakeFiles/InjectAMDGCNFunction.dir/InjectAMDGCNFunction.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:295: lib/CMakeFiles/InjectAMDGCNFunction.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
  • CMake version: 3.25.2
  • Clang version: 18.0.0
  • ROCm version: 6.2.1
  • Triton LLVM (commit id): 86b69c31
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

No branches or pull requests

1 participant