Questions tagged [cuda]
CUDA (Compute Unified Device Architecture) is a parallel computing platform and programming model for NVIDIA GPUs (Graphics Processing Units). CUDA provides an interface to NVIDIA GPUs through a variety of programming languages, libraries, and APIs.
13,651
questions
0
votes
0
answers
9
views
IntelliSense VSCode show "name must be a namespace nameC/C++(725)" on "using namespace nvcuda;"
Hi everyone actually I'm programming on Cuda and I'm testing a simple tensor core example, but i have a problem with intelliSense, practically its show me errore on this commands (see image) and I ...
-2
votes
0
answers
14
views
i was trying to build opencv from source. but got this error. how to solve this
CUSTOMBUILD : nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future re
lease (Use -Wno-deprecated-gpu-...
0
votes
0
answers
8
views
SpGEMM in CUDA 11.4
I copied an example here and did SpGEMM which works fine with CUDA 11.1. However, when I switch to 11.4, I get run time errors such as
` 3: ** On entry to cusparseCsrSetPointers() parameter number ...
1
vote
0
answers
19
views
cuda compute compatibility issue
Recently I started to learn CUDA, and here is my first cuda program. I compiled it with
nvcc hello.cu -o hello and ran it with ./hello, but nothing is printed.
Is it because I'm using cuda 10 which is ...
0
votes
0
answers
20
views
nvidia-drm module will not be installed
I was using /opt/deeplearning/install-driver.sh script to install nvidia driver. But I got following error saying that the nvidia-drm module was not installed. I have two questions:
Is this module ...
0
votes
1
answer
19
views
how to fix CUDA cuInit: Unknown CUDA error value?
I using colab on blender rendering GPU
suddenly it appear warning
how i fix it out?
CUDA cuInit: Unknown CUDA error value
F0523 17:11:21.172250 499 device.cpp:402] Device does not support queues.
***...
0
votes
1
answer
19
views
Why CUDA is unavailable for using with easyocr?
According to Pytorch I used this command in cmd
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113
But CUDA still unavailable. Could someone help me, ...
-2
votes
1
answer
28
views
Error when compiling a CUDA program: invalid type argument of unary ‘*’ (have ‘int’)
I (or somebody else) is compiling a CUDA program (e.g. vectorAdd from the cuda-api-wrappers library) using CUDA 11.6 and GCC 12.1, with C++17 set as the language standard. I get the following error:
/...
0
votes
1
answer
33
views
All blocks read same global memory location section. Fastest method is?
I am writing an algorithm which all blocks are reading a same address. Such as we have a list=[1, 2, 3, 4], and all blocks are reading it and store it to their own shared memory...My test shows the ...
0
votes
1
answer
31
views
large-size page-locked memory copy get wrong result in CUDA
I found an issue about large-size page-locked memory in CUDA. Here is the source code and makefile. The code allocates 10GB page-locked memory and copy some data from device memory to this page-locked ...
-1
votes
0
answers
27
views
Have difficulties building OpenCV from source with CUDA for GPU access with Visual Studio
I am trying to build OpenCV from source with CUDA for GPU access on Windows with visual studio. I have followed the tutorials on how to build and how to install CUDA and cuDNN. The process of ...
0
votes
2
answers
35
views
Unrecognized options: {'target'} when using @jit(target="cuda")
I have optimized some python code using the decorator @jit from numba library. However, I want to indicate to @jit to use my GPU device explicitly. From: Difference between @cuda.jit and @jit(target=...
0
votes
0
answers
23
views
How to change the pxtas library location
Trying to run some keras code, but I keep running into this warning.
Is it important? How do I solve it? I have no idea what pxtas is or what environment variable should I specify to change it, or to ...
-1
votes
0
answers
51
views
Cuda kernel not running on if statements c++
I have a small program that has two arrays of vectors (pos, vel) representing particles floating in space, and I'm using the GPU to update them and will soon run the GPU to render them as well. The ...
0
votes
1
answer
26
views
Linker error: /usr/bin/ld: cannot find -lcudart_static while trying to compile CUDA code with clang
I tried to compile a axpy.cu file as specified in the official docs here:
clang++ axpy.cu -o exec --cuda-gpu-arch=sm_60 -L/usr/local/cuda -lcudart_static -ldl -lrt -pthread
But that gave a linker ...
-4
votes
0
answers
30
views
ERROR: no suitable conversion function from "cv::Mat" to "const void *" exists in MEMCPY FUNCTION, the code calculate the inverse matrix using CUDA [closed]
I want to compare between cpu and gpu while doing the inverse matrix
of matrix c. It appears there is a problem when copuing elements from
cpu to gpu and from gpu to cpu in memcpy function. I tried ...
2
votes
1
answer
37
views
the cuda local variable makes me confused
firstly i think local variable in kernel is only belong to its thread only, but below results make me confused. Could you tell me why?
#include <stdio.h>
__global__ void bcast(int arg) {
int ...
0
votes
1
answer
78
views
CUDA C pow() function causing rounding errors with modf() and similar functionality
I am tracking indices across threads by adding the thread to some value that is being sorted: value + threadIdx.x*.001. This works (theoretically) because the values I am sorting are whole numbers, ...
0
votes
0
answers
19
views
The GPU-Util remain 100% after running my PyCUDA code
I'm new to CUDA/PyCUDA, so this question might be a little stupid.
I'm basically using pycuda to define the (gaussian)hypergeometric function 2F1(a,b,c,z) . The original version of this code I found ...
-3
votes
0
answers
21
views
After installing CUDA, run fine for torch, but nvcc not found [closed]
My os is windows10.
I have installed CUDA and torch.cuda.is_available() return Ture.
However, in terminal, nvcc -V can not run.
1
vote
0
answers
22
views
Can userspace code leverage NVIDIA's open-sourcing of their kernel modules?
NVIDIA has recently announced they are open-sourcing (a variant of) their GPU Linux kernel driver. They are not, however, open-sourcing the user-mode driver libraries (e.g. libcuda.so).
It's a gradual ...
0
votes
0
answers
20
views
Can I use a GPU/CPU of a different machine than the one with my virtual env?
I have a setup where I develop a Python ML applciation on Windows, but I use an SSH virtual environment from Ubuntu (WSL2).
Now suppose that I would like to run my experiments on some machine with ...
-2
votes
0
answers
38
views
How to copy frame to GPU, resize it with cuda, then copy it back to host side?
My main purpose is to load frames from a video with OpenCV, then copy it Nvidia Gpu memory, resize it with CUDA, then copy it back to the host side and visualise it with cv::imshow()
Unfortunately, ...
1
vote
0
answers
40
views
Fail to call cuDNN or cuBLAS routine with explicit Graph APIs in CUDA Graph
I’m tring to create a graph with a cuDNN activation function as a node using explicit Graph APIs, like cudaGraphAddHostNode, however, I got CUDNN_STATUS_EXECUTION_FAILED returned. I’m doing this with ...
-3
votes
0
answers
22
views
Inserting image into another image in CUDA [closed]
I have a Structure definition for exchanging data between Host and Device:
struct CudaImg
{
uint3 m_size; // size of picture
union {
void *m_p_void; // data of picture
...
0
votes
0
answers
31
views
Pass cuda array to host function
I'm not able to find any answer to this. Is it possible to pass a device array (pointer) to a host function? Inside this host function a kernel will be launched which will use the device array. I don'...
-3
votes
0
answers
14
views
cuda program with MSB372 [closed]
Why do I get this error every time I write a cuda program?just like follows.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 11.7....
0
votes
1
answer
33
views
Template Template Parameter and Container Value Type
Question Context:
I am working on a PyTorch CUDA extension that process complex-typed Tensors. I have the following code snippet that is used to launch the CUDA kernel
AT_DISPATCH_COMPLEX_TYPES(x....
0
votes
0
answers
24
views
Unable to manually install CUDA 10.2 packages on Jetson TX2 Ubuntu 18.04 (Without SDK Manager) [closed]
I'm trying to manually install CUDA 10.2 in Jetson TX2 Ubuntu 18.04 but this is proving to be a tricky task.
These are my specifications:
Jetson TX2
Ubuntu 18.04
So basically I'm stuck on trying to ...
0
votes
0
answers
24
views
Call to cuLinkAddData results in UNKNOWN_CUDA_ERROR
I get Call to cuLinkAddData results in UNKNOWN_CUDA_ERROR when I am trying to use numba. I am aware that the problem is with the CUDA toolkit versions but I am not sure what I should update/downgrade ...
-1
votes
0
answers
32
views
Advice about Sobel algorithm in Cuda [closed]
I've recently built a sobel algorithm in c and i'm trying to implement it in Cuda too.I have come up with some problems though.The main code,before implementing cuda is :
int sobel(int Image_input[...
0
votes
1
answer
20
views
Numba-Cuda and data types
A while ago, I asked the following question:
Numba Cuda computation seems to be slower than sequential run. Did I do obvious mistakes?
It was about using the GPU for a simple calculation. I noticed ...
0
votes
1
answer
67
views
No CMAKE_CUDA_COMPILER could be found when installing pytorch
I am trying to install pytorch from source. The reason why I am doing this (instead of just pip install pytorch) is because I need the sm_86 support for my GPU (NVIDIA GTX 3060 Ti) and so I have set ...
-2
votes
0
answers
21
views
How to link cudart with gromacs_mpi?
I have been trying to install gromacs 2020 version on the cluster with cuda. My system has NVIDIA Drivers installed. But while running the cmake command it always throws an error at 98% saying a ...
0
votes
1
answer
37
views
Run multiple GPU functions on a single GPU in parallel using numba and cupy
I was wondering whether it is possible or even safe to run multiple cupy functions or numba cuda kernels in parallel inside the same code. Currently my code does this:
for i in range(int(nLoop)):
...
0
votes
1
answer
42
views
CUDA failed to launch kernel : no kernel image available for execution
i am trying to run CUDA on a rather old GPU. I tried the CUDA Samples vectorAdd which gives me the following error:
Failed to launch vectorAdd kernel (error code no kernel image is available for ...
-4
votes
0
answers
25
views
Can I Install Cuda, CudNN on Windows 11 with an Integrated intel display card UHD 600 [closed]
I have a basic laptop with a integrated display adaptor (Intel UHD 600). I've installed tensorflow-GPU but I'm not sure if it's possible to install Cuda, CudNN on my windows 11 pc.
Can someone please ...
-2
votes
0
answers
29
views
Not finding cuda_path
I installed cupy via pip install cupy-cuda112.
However, when I do "import cupy", it shows the error below:
================================================================
Failed to import ...
2
votes
2
answers
58
views
Using multi streams in cuda graph, the execution order is uncontrolled
I am using cuda graph stream capture API to implement a small demo with multi streams. Referenced by the CUDA Programming Guide here, I wrote the complete code. In my knowledge, kernelB should execute ...
0
votes
0
answers
20
views
How can I convert Packed YUV422(YCbCr) into Planar YUV?
As the title says, I'd like to convert any ordinary YUV422 (U0 Y0 V0 Y1 U2 Y2 V2 Y3 U4 Y4 V4…) raw data into YUV planar data (so that I can put it into a cuda function nvjpegEncodeYUV()).
I've found ...
0
votes
0
answers
44
views
<<< 1,1>>> error, expecting an expression [closed]
I'm trying to run the following code using vs 2022 and cuda 11.7, but I get MSB3721 error.
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <stdio.h>
...
1
vote
0
answers
32
views
How can I interact with NVIDIA's JIT compilation cache?
(Following Is NVIDIA's JIT compilation cache used when you don't use NVCC?)
NVIDIA's JIT compilation cache (which we find in ~/.nv/CompilationCache on Linux systems) has a somewhat opaque ...
0
votes
0
answers
16
views
Why is the CUDA driver installed with the toolkit "not recommended for use in production"?
In the CUDA release notes (for v11.7 at least), it says:
For convenience, the NVIDIA driver is installed as part of the CUDA Toolkit installation. Note that this driver is for development purposes ...
1
vote
2
answers
40
views
Is NVIDIA's JIT compilation cache used when you don't use NVCC?
As we should all know (but not enough people do), when you build a CUDA program with NVCC, and run it on a device for which fully-compiled (SASS) code for the specific device is not included in the ...
-2
votes
1
answer
22
views
Using two compiler in one sconscript (nvcc, g++)
How can I use both of the compiler in one sconscript?? Some of the details of the sconscript is shown below:
I have a .cu file and with nvcc -c test.cu, I could generate a .o file. How can I import ...
0
votes
1
answer
28
views
In NSight Compute, can I skip ahead to the first invocation of a specific kernel?
I'm profiling kernels in an app which invokes kernel my_kernel_1 thousands of times, then invokes my_kernel_2 thousands of times. I don't want to profile all invocations of all kernels; I just want to ...
-3
votes
0
answers
31
views
nvcc not found when source installation
I want to install pytorch3d from source with the following command as recommended at Link:
git clone https://github.com/facebookresearch/pytorch3d.git
cd pytorch3d && pip install -e .
Error ...
0
votes
0
answers
33
views
CGBN: How to send to device memory short cgbn_mem_t, but make calculations over long cgbn_mem_t?
I'm somewhat lost on the point of converting, for instance, cgbn_mem_t<256> into cgbn_mem_t<1024> in device code. Say, the kernel receives two pointers to cgbn_mem_t<256>, it's quite ...
-1
votes
1
answer
64
views
Want some guide about how to use nvjpegEncodeYUV()
I am trying to implement some jpeg encoding cuda code based one a sample code below:
https://docs.nvidia.com/cuda/nvjpeg/index.html#nvjpeg-encode-examples
I post all the code, test result and Makefile ...
0
votes
0
answers
40
views
how to solve ' CUDA was found but your compiler failed to compile a simple CUDA program'
I tried vs2015 2017 2019 2022 without success, cmake also tried 3.14.1 and the latest version, cuda is available, and vs2019 seems to have also compiled test.cu and passed, can anyone tell me how to ...