<div dir="ltr"><div>Hi,</div><div>I am trying to offload to my GPUs. I have GTX1060 6GB with compute capability of 6.1.</div><div><br></div><div>I followed the instructions given in <br></div><div><a href="https://hpc-wiki.info/hpc/Building_LLVM/Clang_with_OpenMP_Offloading_to_NVIDIA_GPUs">https://hpc-wiki.info/hpc/Building_LLVM/Clang_with_OpenMP_Offloading_to_NVIDIA_GPUs</a></div><div><br></div><div>Then I compiled my helloworld program using the following environment variables:</div><div>CFLAGS="-fopenmp -fopenmp-targets=nvptx64-sm_61 -pthread -I /usr/lib/gcc/x86_64-linux-gnu/9/include -O2 --libomptarget-nvptx-path=$CLANG_HOME/lib --cuda-gpu-arch=sm_61"</div><div><br></div><div>LD_LIBRARY_PATH=$CLANG_HOME/lib:$LD_LIBRARY_PATH</div><div><br></div><div>CC=clang</div><div><br></div><div>my helloworld program simply printfs omp_get_num_devices() after #including <omp.h><br></div><div><br></div><div>it compiles fine; but when i run it i get the number of devices as 0.</div><div><br></div><div>Does someone have any idea?</div><div>Thanks much,</div><div>Mani<br></div></div>