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!