CUDA cutil.h where is it? - cuda

Does anyone know which and where is the SDK/toolkits that contents cutil.h? I tried CUDA toolkits3.2 and toolkits5.0(I know this version it is not supported already for cutil.h)
Also I notice some mentioned about it in how to include cutil.h in linux
but which & where installer that generate "NVIDIA_GPU_Computing/C/common/inc"? My toolkit dont generate such files.
is CUDA3.0 only contain these cutil.h?

For linux, the CUDA SDK (not toolkit) installer versions 3.2 to 4.1 inclusive (at least) should install the .../C/common/inc/cutil.h file. It was eliminated in the CUDA 5.0 release and is not in the installer there as you have discovered.

Related

No "nvcc" in "cuda-10.2/bin" toolkit patch

I have a working cuda-10.0 toolkit and 470 driver. I need to use new virtual memory management features that I found in 10.2 driver. And I can't install more than 10.x because my old video card has compute capability 3.0.
So after applying new toolkit with:
sudo sh ./cuda_10.2.1_linux.run --toolkit --silent --override
it is as I think successfully installed:
But now in folder with "cuda-10.2" there is almost nothing, "bin" folder only has uninstaller and no "nvcc" and others. And newly created link links to that "nothing". How to deal with it?
I tried official docs and googling but nothing was found.
The patch updates for CUDA 10.2 do not contain complete toolkits. The idea behind a "patch" is that it contains only the files necessary to address the items that the patch is focused on.
To get a full CUDA 10.2 CUDA tookit install, you must first install using a full CUDA 10.2 toolkit installer, and a typical filename for that would be cuda_10.2.89_440.33.01_linux.run (runfile installer to match your indicated runfile installer usage). After that, if you decide you need/want the items addressed by the patch, you must also install the desired patch.
Note the statement on the download page:
These patches require the base installer to be installed first.

No library found under: /usr/local/cuda-9.0/targets/aarch64-linux/lib/libcublasLt.so.9.0

I'm trying to install JAX on the NVIDIA Jetson TX2 and I'm facing considerable issues.
I have CUDA 9.0 and it gives me the following error:
No library found under: /usr/local/cuda-9.0/targets/aarch64-linux/lib/libcublasLt.so.9.0
So I go looking and of course that library does not exist. Does anyone have any pointers on how I can about installing that library? I've tried searching google and it does not appear to exist at all.
The cublasLt library did not come into existence until cuda 10.1 here is the cublas 10.0 doc and here is the cublas 10.1 doc.
Therefore you won't be able to use cublasLt with CUDA 9.0
On a Jetson the correct way to get the latest CUDA install including libraries like cublas is to install the latest JetPack.

What is libcublasLt.so (not libcublas.so)?

I'm compiling the source code by using pgf95 (Fortran compiler).
If I use cuda 10.0, it successfully compiles the source code.
However, If I use cuda 10.1, it fails showing that 'cannot find libcublasLt.so'.
When I scan the directory cuda-10.0/lib64, cuda-10.1/lib64, both do not have the file starting with 'libcublasLt'.
How can I solve this issue?
libcublasLt.so is the library that provides the implementation for the cublasLt API which is defined here. It just happens to be a separate shared object from libcublas.so
In the past (e.g. CUDA 10.0 and prior), most CUDA libraries were installed in /usr/local/cuda/lib64 (or similar) by default (on linux). At about the CUDA 10.1 timeframe, it was decided that some libraries would be installed in different places. CUDA 10.1 is also where the cublasLt API and library were introduced. This affected some cublas libraries and is discussed in the CUDA 10.1 release notes here (both the introduction of the cublasLt library, as well as the change in library locations).
So there are 2 possibilities here (for CUDA 10.1, CUDA 10.2):
libcublasLt.so is on your machine, but it is simply not where you were expecting to find it.
libcublasLt.so is not on your machine. This means you are working with CUDA version prior to the introduction of the cublasLt API (i.e. 10.0 or prior), or you have a broken install.
So, assuming you are working with CUDA 10.1 or CUDA 10.2, the first step is to locate/determine whether libcublasLt.so is on your machine or not. You can use a linux utility like find or locate to accomplish that. They should have man pages available for you.
If you can find it, then you need to provide the path to it, via a linker spec (e.g. -L/path/to/libcublasLt.so/
If you can't find it, then either you are working with an older version of CUDA (10.0 or prior), or you need to reinstall CUDA.
I believe by the time you get to CUDA 11.0, the CUDA packages put the cublas libraries back in /usr/local/cuda/lib64 with the other libraries. YMMV.

Best solution to have multiple CUDA/cuDNN versions installed on Ubuntu

I am using Conda on Ubuntu 16.04. My objective is to associate each Conda environment to a specific version of CUDA / cuDNN. I had a look around and I found this interesting article, which basically suggests to put different CUDA versions into different folders and then use an environment-specific bash script (run when the environment is activated) to properly set the PATH/LD_LIBRARY_PATH variables (which creates the association with the CUDA version).
This is fine, but when I try to install frameworks such as pytorch using Conda, it forces me to install also the "cudatoolkit" package.
So, a couple of questions:
1) does downloading cudatoolkit mess up my previous CUDA configurations? which version will be used?
2) if using Conda is possible to install "cudatoolkit" and also "cudnn", why not just using conda for everything? Why even needing to apply the instructions of the above mentioned article?
Thank you.
As an answer to the first question, no, downloading and installing another CUDA toolkit won't mess up other configurations. From CUDA toolkit installer, you specify an installation directory, so just pick whatever works for you that is unique to that CUDA version. This won't affect any currently installed CUDA versions. A Pytorch install will look for a CUDA_HOME environment variable as well as in '/usr/local/cuda' (the default CUDA toolkit install dir.), so it's just this environment variable that needs to be changed.
I can't speak for the second part. Perhaps the installation using Conda will use the default installation directory for the CUDA toolkit (seems silly but this is just speculation).

What is the difference between the CUDA tookit and the CUDA sdk

I am installing CUDA on Ubuntu 14.04 and have a Maxwell card (GTX 9** series) and I think I have installed everything properly with the toolkit as I can compile my samples. However, I read that in places that I should install the SDK (This appears to be talked about with the sdk 4). I am not sure if the toolkit and sdk are different? As I have a later 9 series card does that mean I have CUDA 6 running? Here is my nvcc version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2014 NVIDIA Corporation
Built on Wed_Aug_27_10:36:36_CDT_2014
Cuda compilation tools, release 6.5, V6.5.16
I am following a book and I need to include <cutil.h> and I can't find that file in the includes anywhere where I installed it.
I followed this guide provided by nvidia and as I have done what they say this is why I am confused http://developer.download.nvidia.com/compute/cuda/6_5/rel/docs/CUDA_Getting_Started_Linux.pdf
Thanks for help
CUDA Toolkit is a software package that has different components. The main pieces are:
CUDA SDK (The compiler, NVCC, libraries for developing CUDA software, and CUDA samples)
GUI Tools (such as Eclipse Nsight for Linux/OS X or Visual Studio Nsight for Windows)
Nvidia Driver (system driver for driving the card)
It has also many other components such as CUDA-debugger, profiler, memory checker, etc.
The fact that you are able to compile and run samples means that you probably installed the Toolkit fully and have the SDK, the driver, and the Samples at least.
As for the cutil.h, doing a search in my CUDA 6.5 installation with find -L . -iname "cutil.h" yielded no results. Also looking at other related questions on SO, it seems like this header file does not exist in CUDA installations anymore (since CUDA 5.0). However, looking at the samples, you can find some newer utility headers such as helper_cuda.h being in use. Helpers like these should be located in somewhere like /usr/local/cuda/samples/common/inc in your OS. helper_cuda.h is a header I almost always include in my CUDA programs since I find utility functions such as checkCudaErrors() very useful.
If you are following a book, my recommendation is; try to compile the code, and whenever you get an error saying a utility function is missing, do a grep search in the header files included in samples/common/inc. You will most probably find the missing utility functions there and then you can include the necessary headers accordingly.