I am using JCuda to build CUDA applications. Under some platforms, such as the newest version of Ubuntu, the default gcc version is greater than the compatible version with nvcc. This makes setting up my development environment a hassle. Since I only care about generating PTX files (which are supposed to be portable), I am under the impression that I don’t actually need GCC or any other compiler. Is is possible to call nvcc without any default compiler for compiling this type of code? This will make compiling kernels from Java code more robust and available to any platform.
Share
I think you still need a compiler suite (for example, nvcc on linux still needs libgcc_s.so.1) , but the -ptx flag to nvcc will skip compilation of the host code. And even ptx generation relies on the preprocessor for macro expansion as far as I know.