-
Notifications
You must be signed in to change notification settings - Fork 3
/
crnchHelpCommands
64 lines (29 loc) · 2.37 KB
/
crnchHelpCommands
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/opt/rocm-5.2.0/llvm/bin/llvm-dis
/opt/rocm-5.2.0/llvm/bin/clang -c -emit-llvm
salloc -t 1:00:00 -p rg-gpu -w instinct
source /etc/profile.d/modules.sh
module use /projects/tools/x86_64/rhel-8/modulefiles/
module load rocm/5.2.0
hipcc -emit-llvm -save-temps -c
export LD_LIBRARY_PATH=/opt/rocm-5.2.0/opencl/lib:$LD_LIBRARY_PATH
gcc openclex.c -o vectorAddition -I/opt/rocm-5.2.0/opencl/include -lOpenCL
gcc openclex.c -L/opt/rocm-5.2.0/opencl/lib -o vectorAddition -I/opt/rocm-5.2.0/opencl/include -lOpenCL
AMD_OCL_BUILD_OPTIONS_APPEND="-save-temps-all -fbin-amdil"
export AMD_OCL_BUILD_OPTIONS_APPEND=-save-temps-all
Clang:
/opt/rocm-5.2.0/llvm/bin/clang
/opt/rocm-5.2.0/llvm/bin/clang++
You can copy llvm to your local directory to allow to use across different nodes.
export PATH=/nethome/jchen706/llvm/bin:$PATH
Nvidia GPU
salloc -t 1:00:00 -p rg-gpu -w quorra2
export PATH=/usr/local/cuda-12.0/bin:/nethome/jchen706/llvm/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-11.5/lib64:$LD_LIBRARY_PATH
nvcc vecAdd.cu -c -save-temps
clang++ vecAdd.cu -c -save-temps -emit-llvm
export PATH=/nethome/jchen706/cuda-11.5/bin:/nethome/jchen706/llvm/bin:$PATH
OpenCL
AMD:
clang++ -target amdgcn-amdhsa-opencl -c -S -emit-llvm -x cl vecAdd.cl -include <path to clc.h>
Nvidia:
/nethome/jchen706/opt/llvm/bin/lld -flavor gnu --no-undefined -shared -plugin-opt=-amdgpu-internalize-symbols -plugin-opt=mcpu=gfx90a -plugin-opt=O3 -plugin-opt=-amdgpu-early-inline-all=true -plugin-opt=-amdgpu-function-calls=false -save-temps -o main-cuda.translated.out main-cuda.translated.o /nethome/jchen706/ROCm-Device-Libs/install/amdgcn/bitcode//ockl.bc /nethome/jchen706/ROCm-Device-Libs/install/amdgcn/bitcode//ocml.bc /nethome/jchen706/ROCm-Device-Libs/install/amdgcn/bitcode//oclc_abi_version_400.bc /nethome/jchen706/ROCm-Device-Libs/install/amdgcn/bitcode//oclc_finite_only_off.bc /nethome/jchen706/ROCm-Device-Libs/install/amdgcn/bitcode//oclc_unsafe_math_on.bc /nethome/jchen706/ROCm-Device-Libs/install/amdgcn/bitcode//oclc_daz_opt_on.bc /nethome/jchen706/ROCm-Device-Libs/install/amdgcn/bitcode//oclc_correctly_rounded_sqrt_on.bc /nethome/jchen706/ROCm-Device-Libs/install/amdgcn/bitcode//oclc_isa_version_90a.bc /nethome/jchen706/ROCm-Device-Libs/install/amdgcn/bitcode//oclc_wavefrontsize64_on.bc /nethome/jchen706/ROCm-Device-Libs/install/amdgcn/bitcode//opencl.bc libbc-clang_rt.builtins.amdgcn.a