I am using CUDA 4.0 . I am trying to use the following functions.
CUT_DEVICE_INIT();
CUT_SAFE_CALL(cutCreateTimer(&hTimer));
I included cutil.h to use the above functions. But the compiler reports the following..
fatal error C1083: Cannot open include file: 'cutil.h': No such file or directory
I searched in the CUDA directory but there is no file 'cutil.h'.
How can I find the time needed for a CUDA function using the above method? (not using the C++ timer)
You probably didn't tell your compiler where to find the file. I can't tell you exactly because you didn't provide details on what system you are using but for example, on Windows XP and assuming a default installation of version 4.0 of the SDK the cutil.h header file is in:
C:\Documents and Settings\All Users\Application Data\NVIDIA Corporation\NVIDIA GPU Computing SDK 4.0\C\common\inc
For Windows 7 I think it is:
C:\Program Data\NVIDIA Corporation\NVIDIA GPU Computing SDK 4.0\C\common\inc
but not sure.
Related
I used below command to build binary for nvidia GPU:
clang++ -fsycl -fsycl-targets=nvptx64-nvidia-cuda simple-sycl-app.cpp -o simple-sycl-app-cuda
But got below error message:
clang++: error: cannot find 'libspirv-nvptx64--nvidiacl.bc'; provide path to libspirv library via '-fsycl-libspirv-path', or pass '-fno-sycl-libspirv' to build without linking with libspirv
I searched in both intel oneAPI installation path and cuda toolkit path, but cannot find the spirv-nvptx64-nvidiacl.bc.
Anyone knows where to find libspirv-nvptx64—nvidiacl.bc?
It looks like you are trying to compile using the DPC++ compiler for Nvidia GPUs.
This option is not included in the oneAPI release installations from the Intel website. At the moment you will need to compile the DPC++ LLVM project with this enabled to be able to use the appropriate flag to target Nvidia devices.
You can follow the instructions on this page to compile the project and then it explains how to use the ptx target. In the future Codeplay, the company I work for, intends to publish release binaries that include the ptx compiler option.
We are using a GTX 1080
with Ubuntu 16.04,
we installed CUDA 7.5, cudnn v5.1
We used compute capabilities 6.1
The 16.04 installation of CUDA was
made using the 15.04 Ubuntu version
and some very minor changes suggested by
https://www.pugetsystems.com/labs/hpc/NVIDIA-CUDA-with-Ubuntu-16-04-beta-on-a-laptop-if-you-just-cannot-wait-775/
All this seems to have worked fine.
In trying to install tensorflow from sources, per Google's
instructions for anything other than the default configuration,
we have run into a problem.
We do not know if this is something wrong on your end or Google's.
If you cannot help us, can you refer us to someone who can?
Thank you.
Below is the relevant run from a script file, with embedded special characters edited out.
laefsky#main:~/anaconda2/envs/tensorflow/tensorflow file://main/home/laefsky/anaconda2/envs/tensorflow/tensorflow(tensorflow) laefsky#main: ~/anaconda2/envs/tensorflow/tensorflow laefsky#main ~/anaconda2/envs/tensorflow/tensorflow$ ./configure
~/anaconda2/envs/tensorflow/tensorflow ~/anaconda2/envs/tensorflow/tensorflow
Please specify the location of python. [Default is /home/laefsky/anaconda2/envs/tensorflow/bin/python]:
Do you wish to build TensorFlow with Google Cloud Platform support? [y/N] N
No Google Cloud Platform support will be enabled for TensorFlow
Found possible Python library paths:
/home/laefsky/anaconda2/envs/tensorflow/lib/python2.7/site-packages
Please input the desired Python library path to use. Default is [/home/laefsky/anaconda2/envs/tensorflow/lib/python2.7/site-packages]
/home/laefsky/anaconda2/envs/tensorflow/lib/python2.7/site-packages
Do you wish to build TensorFlow with GPU support? [y/N] y
GPU support will be enabled for TensorFlow
Please specify which gcc should be used by nvcc as the host compiler. [Default is /usr/bin/gcc]:
Please specify the Cuda SDK version you want to use, e.g. 7.0. [Leave empty to use system default]:
Please specify the location where CUDA toolkit is installed. Refer to README.md for more details. [Default is /usr/local/cuda]:
Please specify the Cudnn version you want to use. [Leave empty to use system default]:
Please specify the location where cuDNN library is installed. Refer to README.md for more details. [Default is /usr/local/cuda]:
Please specify a list of comma-separated Cuda compute capabilities you want to build with.
You can find the compute capability of your device at: https://developer.nvidia.com/cuda-gpus.
Please note that each additional compute capability significantly increases your build time and binary size.
[Default is: "3.5,5.2"]: "6.1"
INFO: Starting clean (this may take a while). Consider using --expunge_async if the clean takes more than several minutes.
......
ERROR: /home/laefsky/anaconda2/envs/tensorflow/tensorflow/third_party/gpus/cuda_configure.bzl:442:18: function 'repository_rule' does not exist.
ERROR: com.google.devtools.build.lib.packages.BuildFileContainsErrorsException: error loading package 'external': Extension file '#local_config_cuda//cuda:build_defs.bzl' may not be loaded from a WORKSPACE file since the extension file is located in an external repository.
Configuration finished
laefsky#main:~/anaconda2/envs/tensorflow/tensorflow[]7;file://main/home/laefsky/anaconda2/envs/tensorflow/tensorflow(tensorflow) []0;laefsky#main: ~/anaconda2/envs/tensorflow/tensorflow[[01;32mlaefsky#main[[00m:[[01;34m~/anaconda2/envs/tensorflow/tensorflow$ logout
CUDA programming guide states that:
the driver API is backward compatible, meaning that applications, plug-ins, and libraries (including the C runtime) compiled against a particular version of the driver API will continue to work on subsequent device driver releases
I understand this as that, if my code was compiled on CUDA4, the binary will run on CUDA5. However, it turned out that running the CUDA5-compiled binary on CUDA5 led to:
error while loading shared libraries: libcudart.so.4: cannot open shared object file: No such file or directory
Note that I am using the "module" facility in Linux to switch in between different cuda versions, i.e.
module load cuda4
compile
module unload cuda4
module load cuda5
run
It is the developers responsibility to package libcudart.so.4 with the application. The module command is likely changing your LD_LIBRARY_PATH or your PATH variable so LDD is not finding libcudart.so.4. I recommend you add a post build step to copy the required .so into your application directory.
ATTACHMENT A in EULA.txt at the root of the CUDA Toolkit directory lists the Redistributable Software. This includes libcudart.so (and variations that have version number information embedded in the file name). This also includes libcufft, libcublas, ...
I am new to GPU computing , but somewhere I've read that it's possible to execute a CUDA program without a GPU card using a simulator/ emulator. I have installed NVIDIA's GPU Computing SDK 4.0 and Visual C++ 2010 Express on Windows Vista. I would like to know:
Whether it is feasible or not to run CUDA code without a GPU, using NVIDA's Computing SDK 4.0 and Visual C++ 2010 express?
Why I get the following error, when I try to execute a sample program I have:
------ Build started: Project: example1, Configuration: Debug Win32 ------
1> '"\nvcc.exe"' is not recognized as an internal or external command,
1> operable program or batch file.
1> Performing Custom Build Tools
1> C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5):
error MSB6006: "cmd.exe" exited with code 9009.
I'm unsure if I have installed all the required software, if something else is needed, or if I need to use another version of the product.
You have to install the NVIDA CUDA Toolkit 4.0 witch brings you the nvcc compiler, all headers and libraries needet to build a CUDA program.
The CUDA Toolkit can be found here CUDA Toolkit 4.0
As far as i know the emulation mode is no longer supported in CUDA versions >= 3.0, if i'm wrong someone may correct me on this topic. You'll need a CUDA enabled device to run a CUDA program.
I am using 0.3.1 JCuda and 3.1 nvidia cuda sdk. I am trying to run JCudaRuntimeDriverMixSample.java from here. I compiled the .cu file with "nvcc -keep invertVectorElements.cu". I set the cuModuleLoad filename to the .sm_10.cubin file generated.
When I run the compiled java file, I get CUDA_ERROR_INVALID_SOURCE. I am running nvidia driver version 256.53 on a GTS 450 gpu.
Have you tried loading the .ptx file rather than the .cubin file? As I understand it, .cubin files are already assembled for very particular architectures, whereas .ptx are JIT-compiled by the driver. (You can still use cuModuleLoad with .ptx). You're attempting to load the sm_10 version of the cubin - but do you have a compute capability 1.0 device?