Skip to content

Latest commit

 

History

History
17 lines (15 loc) · 391 Bytes

File metadata and controls

17 lines (15 loc) · 391 Bytes

Compile the .cu into .ll (bitcode file):

clang++ -S -emit-llvm --cuda-gpu-arch=sm_<compute_cap> <target.cu>

compute_cap: computing capability of current gpu

// Have the navidia pacakge installed
// in terminal:
nvidia-smi --query-gpu=compute_cap --format=csv

// sample output:
compute_cap
8.9

// compile command:
clang++ -S -emit-llvm --cuda-gpu-arch=sm_89 rgb.cu