niessner / Opt

Opt DSL
Other
254 stars 68 forks source link

A problem when compiled with CUDA11.1 and RTX 3090 #160

Open Cryst4L9527 opened 3 years ago

Cryst4L9527 commented 3 years ago

I've follow all the steps to build the llvm、terra and Opt one by one, and i"m sure all of the tests of terra are passed, so it must be a cuda version of terra. However, when I use the API, there comes a mistake:

Global variable 'cudalib' is not declared. Global variables must be 'declared' through a regular assignment (even to nil) at global scope before being used.

By the way, I change the libdevice to string.format("/usr/local/cuda-11.1/nvvm/libdevice/libdevice.10.bc" for another reason. Does any one know what's the problem? Thanks!

Cryst4L9527 commented 3 years ago

I don't have an idea about the terra language itself, so I don't understand how to "declare" through a regular assignment

Cryst4L9527 commented 3 years ago

I've tried to export CUDALIB in the bashrc, it seems the path is got. but there comes another mistake: variable '__syncthreads' not found.

I think that's because I got the wrong path of the CUDALIB, so what should the CUDALIB refer to ? If someone can output it then I can try to define the right path and have a try. Thanks!

yys123456 commented 2 years ago

@Cryst4L9527 Have you solved this problem? Would you please tell me how to deal with it? By the way, I tried opt both on win10, MX150, CUDA7.5 with VS2013 and Ubuntu 18.04.6 LTS, rtx2060,CUDA11.3, the first one got cudalib is not declared and the second one got llvm: No such file or directory Screenshot from 2022-01-25 19-09-08