Hi,
I am trying to offload to my GPUs. I have GTX1060 6GB with compute
capability of 6.1.

I followed the instructions given in
https://hpc-wiki.info/hpc/Building_LLVM/Clang_with_OpenMP_Offloading_to_NVIDIA_GPUs

Then I compiled my helloworld program using the following environment
variables:
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"

LD_LIBRARY_PATH=$CLANG_HOME/lib:$LD_LIBRARY_PATH

CC=clang

my helloworld program simply printfs omp_get_num_devices() after #including
<omp.h>

it compiles fine; but when i run it i get the number of devices as 0.

Does someone have any idea?
Thanks much,
Mani
_______________________________________________
cfe-users mailing list
cfe-users@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users

Reply via email to