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

ROCm and Triton LLVM assets at build #9

Draft
wants to merge 3 commits into
base: superbuild/submodules
Choose a base branch
from

Conversation

coleramos425
Copy link
Collaborator

Made some small changes to the build logic to accommodate both Triton and ROCm LLVM versions. Now we can link against both at build time to produce separate assets. Usage is largely the same, except now you'll see assets with suffixes denoting LLVM version

$ cmake -DTRITON_LLVM=~/.triton/llvm/llvm-86b69c31-ubuntu-x64 -DCMAKE_COMPILER=/opt/rocm-6.3.1/llvm/bin/clang -DCMAKE_CXX_COMPILER=/opt/rocm-6.3.1/llvm/bin/clang++ .. && make
-- The C compiler identification is GNU 11.4.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: /usr/bin/cc - 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.3.1/llvm/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
ROCM_PATH: /opt/rocm
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11")
-- Found zstd: /usr/lib/x86_64-linux-gnu/libzstd.so
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version "2.9.13")
-- Found LLVM 18.0.0git in /opt/rocm/llvm
-- Using LLVMConfig.cmake in: /opt/rocm/llvm
ROCM LLVM STATUS:
    Definitions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
    Includes    /opt/rocm/llvm/include
    Libraries   /opt/rocm/llvm/lib
    Targets     AMDGPU;X86
-- Found LLVM 20.0.0git in /home/colramos/.triton/llvm/llvm-86b69c31-ubuntu-x64
-- Using LLVMConfig.cmake in: /home/colramos/.triton/llvm/llvm-86b69c31-ubuntu-x64
TRITON LLVM STATUS:
    Definitions -D_GNU_SOURCE -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
    Includes    /home/colramos/.triton/llvm/llvm-86b69c31-ubuntu-x64/include
    Libraries   /home/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 (0.4s)
-- Generating done (0.0s)
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_COMPILER


-- Build files have been written to: /home/colramos/audacious/instrument-amdgpu-kernels/build
...

$ ls lib/
CMakeFiles           libAMDGCNMemTrace-rocm.so    libAMDGCNNumCacheLines-rocm.so    libInjectAMDGCNFunction-rocm.so    libInjectAMDGCNInlineASM-rocm.so    libInjectAMDGCNSharedMemTtrace-rocm.so    Makefile
cmake_install.cmake  libAMDGCNMemTrace-triton.so  libAMDGCNNumCacheLines-triton.so  libInjectAMDGCNFunction-triton.so  libInjectAMDGCNInlineASM-triton.so  libInjectAMDGCNSharedMemTtrace-triton.so

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.

1 participant