Opt icon indicating copy to clipboard operation
Opt copied to clipboard

A problem when compiled with CUDA11.1 and RTX 3090

Open Cryst4L9527 opened this issue 3 years ago • 3 comments

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 avatar Mar 16 '21 08:03 Cryst4L9527

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

Cryst4L9527 avatar Mar 16 '21 08:03 Cryst4L9527

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!

Cryst4L9527 avatar Mar 16 '21 09:03 Cryst4L9527

@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

yys123456 avatar Jan 25 '22 11:01 yys123456