Skip to content

Instantly share code, notes, and snippets.

@getianao
Last active March 26, 2023 09:38
Show Gist options
  • Select an option

  • Save getianao/eff304ff136853542500ab451125e823 to your computer and use it in GitHub Desktop.

Select an option

Save getianao/eff304ff136853542500ab451125e823 to your computer and use it in GitHub Desktop.
### AMDGPU
cmake -G 'Ninja' \
-DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11" \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_PROJECTS="clang;lld;compiler-rt;libcxx;libcxxabi;" \
-DLLVM_TARGETS_TO_BUILD="AMDGPU;X86;NVPTX" \
-DLLVM_ENABLE_ASSERTIONS=On \
../llvm
ninja
HIP_CLANG_PATH=~/workspace/llvm-project-amd/build-rocm-4.3.1/bin HIPCC_VERBOSE=7 \
hipcc -s -x hip --offload-arch=gfx908 HelloWorld.cpp -o HelloWorld -std=c++11 -stdlib=libc++ -lc++ -lc++abi
LD_LIBRARY_PATH=/mnt/sdb1/home/tge/workspace/llvm-project-amd/build-rocm-4.3.1/lib:$LD_LIBRARY_PATH rocprof --sys-trace ./HelloWorld
git clone [email protected]:llvm/llvm-project.git
cd llvm-project
git reset --hard llvmorg-13.0.0
mkdir build-13.0.0
cd build-13.0.0
### x86
cmake -G 'Ninja' \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_PROJECTS="clang;lld;openmp;flang;clang-tools-extra" \
-DLLVM_TARGETS_TO_BUILD="X86" \
../llvm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment