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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
7 views

NotImplementedError: Could not run 'torchvision::nms' despite successful setup and device discovery

I'm trying to train a model on my laptop using the GPU on Windows 10 using pyCharm, so i followed some guides online on how to properly setup my NVidia drivers, cuda, cuDNN and what versions of ...
Andrei's user avatar
  • 59
0 votes
0 answers
28 views

Is Eigen::Map supported on CUDA?

Eigen is a C++ linear algebra library. If I had an array in global memory, can I use Eigen::Map to define a matrix during runtime? For example, if the below declaration is given and each thread ...
Pathlessbark8's user avatar
0 votes
0 answers
25 views

error: a __global__ function call must be configured

I am trying to run this code for vector multiplication: C = A * B but it has an error that I can not fix. I'm trying to launch a CUDA kernel (vectorMult) from a function (executeKernel) that is marked ...
Mohamed 's user avatar
0 votes
0 answers
19 views

Memory error in function "cudaMallocPitch" [duplicate]

#define mas_len 10000 #define pod_mas_len 100 #define _CRT_SECURE_NO_WARNINGS #include "cuda_runtime.h" #include <cuda.h> #include <cuda_runtime_api.h> #include "...
Artiomik's user avatar
-2 votes
1 answer
46 views

How can I debug code 700 "illegal memory access" aka `CUDA_EXCEPTION_14, Warp Illegal Address`?

My code is showing CUDA error calling "cudaStreamSynchronize(0)", code is 700 an illegal memory access was encountered on 489 0# my_func(signed char const*, unsigned char const*, int*, int*,...
Richard's user avatar
  • 57.4k
0 votes
0 answers
47 views

Can DFS be sped up by using GPUs?

I have written a low-level algorithm that performs an A* search in parallel using a work stealing approach explained in this paper: https://www.lrde.epita.fr/~bleton/doc/parallel-depth-first-search....
Chris's user avatar
  • 1,545
1 vote
1 answer
45 views

Getting "GPU page fault" by initializing data in a kernel

I am new to CUDA/C++ and I am studying about Unified Memory. I have found this introduction to this topic. However, I have a question regarding one of the examples. To mitigate migration overhead ...
Felipe_SC's user avatar
2 votes
1 answer
47 views

What stride should I use for matrices in CUDA for the fastest possible speed?

I'm working with matrices that range in size from 2,000x2,000 up to 5,000x5,000, doing operations such as multiplication and QR decomposition. I'm curious if, for example, I should align the stride by ...
meisel's user avatar
  • 2,215
-5 votes
0 answers
25 views

RTSP Streaming on Jetson Xavier NX, Ubuntu 20.04 [closed]

i am working on a project, where i want to create a rtsp live server from a USB Camera. To do that i downloaded the mediamtx rtsp server. Then i am pushing the stream from the camera to the rtsp ...
Jan's user avatar
  • 1
-3 votes
0 answers
27 views

Parallel or sequential execution of branches in an NVIDIA GPU Model? [closed]

I'm looking into how a model with a backbone and three different branches operates on an NVIDIA GPU. My concern is whether these branches run in parallel, sequentially, or in an unpredictable manner. ...
picklesmithy129's user avatar
-4 votes
0 answers
29 views

Nvidia driver on Ubuntu 22.04 [closed]

I am so confused, why ubuntu sources get more updated driver and cudnn version than nvidia's wevsite, and which one should be used? Q1: When use ubuntu-drivers list --gpgpu, I suppose it return ...
ease_zh's user avatar
  • 38
0 votes
1 answer
33 views

Docker image with gpu gives error 535.129.3 does not match DSO version 545.23.6

I though a docker image wit GPU support would solve my problems with installing cuda. I have run: docker pull tensorflow/tensorflow:latest-gpu-jupyter docker run --gpus all -it --rm -p 8889:8888 ...
Endre Moen's user avatar
0 votes
0 answers
32 views

cuda sample build fails on windows with CUDA 12.3, VS 2022

When I tries to build cuda bandwidth test sample, MSB3721 error occurs. MSB3721 ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\bin\nvcc.exe" - gencode=arch=compute_50,code=\&...
user23053190's user avatar
0 votes
0 answers
44 views

CMake C++ & CUDA: How to manipulate the compile options property only for a submodule and only for CUDA?

For example, a CMake submodule S has some compile flags inherited from its parent's modules, like -std=C++14. But submodule S is a CUDA project that requires C++17. I removed this flag like the ...
max_xu's user avatar
  • 21
0 votes
0 answers
42 views

Simple CUDA program for image processing not working

I have to write a simple program, that binearizes an image with CUDA. I am using cbmp lib to parse the image. #include <stdio.h> #include <stdint.h> #include <string.h> #include <...
Micza Pienio's user avatar
-3 votes
0 answers
31 views

Why can't i access the amount of constant memory used? [closed]

My code crashed because my device did not have enough constant memory. I don't know if manually keeping a record of the memory allocated is the only way to solve this problem or if there is any other ...
Lucas SBB21's user avatar
-2 votes
1 answer
76 views

CuDNN using wrong CUDA version

I'm re-doing my CUDA/CuDNN setup on a new profile on Ubuntu 22.04.3 because Keras raised an error with libcublasLT I couldn't fix. For project compatibility, I need to use TF 12.12 with CUDA 11.8 and ...
Sharky Bamboozle's user avatar
0 votes
0 answers
22 views

PAPI installation throwing errors duting make command execution

I am trying to install PAPI-7.0.1 on my NVIDIA Jetson Xavier NX boards. Linux 4.9.253, aarch64,Ubuntu 18.04 cuda-10.2 is installed at /usr/local/cuda-10.2/. cuda and cupti include files available at /...
user2201980's user avatar
-2 votes
0 answers
47 views

SHA-256 GPU/CUDA [closed]

I have two functions. One of them is executed on the kernel and the other is called from it. I have a question related to how can I perform these functions in parallel on the GPU? Function that is ...
Artiomik's user avatar
-3 votes
0 answers
41 views

why cuda is slowed by waitKey(100)?

#include <opencv2/opencv.hpp> int main() { cv::Mat img = cv::imread(".\img.tif"); cv::cuda::GpuMat gpu_img; gpu_img.upload(img); cv::cuda::GpuMat gpu_result; for(...
song's user avatar
  • 3
1 vote
1 answer
61 views

Accumulating Two Tensor Core wmma::accumulator Fragments

Let's say that I have two instances of wmma::fragment<wmma::accumulator, 16, 16, 16, half> a, b; (namely a and b). How would I go about conducting an element-wise addition of a and b and storing ...
Elvir Crncevic's user avatar
-5 votes
0 answers
24 views

ffmpeg opencl filters with nvenc encoding [closed]

I am trying to denoise HD video with GPU acceleration: ffmpeg.exe -init_hw_device opencl=gpu:0.0 -filter_hw_device gpu -i $FileBrowser.FileName -vf "hwupload, nlmeans_opencl=5:7:5:3:3, hwdownload,...
David Hajes's user avatar
0 votes
0 answers
60 views

What happens when I use atomicAdd() and the destination pointer is allocated by cudaHostAlloc()?

I find that using pinned memory as a global counter seems to result in slower performance. What actually happens? Is there any hidden synchronization or data transfer operation during the kernel time? ...
AnyaLou's user avatar
  • 11
0 votes
0 answers
75 views

'cudaMalloc' unintentionally allocating memory on multiple GPUs instead of just 1

I am having a strange issue on a system with CUDA. Intially, I thought the problem was with pytorch but it persists with this custom CUDA C code. #include <stdio.h> #include <stdlib.h> #...
Emoticon's user avatar
-2 votes
0 answers
47 views

How is the cufftPlanMany() Api returning only NaNs? [closed]

So I am using the cuFFT library on a Jetson AGX Orin. My FFT input data is arranged as follows in memory: (0,0), (0, 1), ... (0, 15), (1, 0), (1, 1), ... , (1, 15), ... , (1023, 15) where the first ...
charlie9193's user avatar
-3 votes
0 answers
45 views

Conda cuda-compat and how to determine if a conda package is a dud [closed]

Nvidia provides cuda-compat, an apt/dnf-installed package that allows coda-tookit 12 to work with older drivers that could not support it. I use a cluster running older driver (492, cuda-toolkit 11.3 ...
Matteo Ferla's user avatar
  • 2,182
1 vote
0 answers
42 views

Why am I able to operate Cupy's NDArray on cuda by using NumPy module?

I was thinking that numpy is used to operate data on cpu, but I found that when I created a cupy.array, I can still use numpy module to operate it, and it's still on cuda. Like this x = cp.array([[1, ...
jieyou zhao's user avatar
0 votes
0 answers
97 views

Why is this cuda code for summing arrays so slow?

Windows 64bit MSVC CUDA 12 Release mode. CPU: R7-5800H GPU: 3060 Laptop. Ratio: 4.8, why so slow? I don't know why such a simple code is so slow. Where is the bottleneck? How to accelarate (still use ...
Linhh's user avatar
  • 11
-1 votes
1 answer
77 views

Obtain real OpenGL texture format

In my application I need to update a texture every frame and to do this very fast I am using CUDA, also because my initial data are 24bit BGR. I created a texture this way: glTexImage2D(GL_TEXTURE_2D, ...
Perry's user avatar
  • 1,111
0 votes
0 answers
129 views

Can we replace XOR with multiply-add?

I'm working on a CUDA program where ALU is fully utilized (almost 100% compute throughput). The program does a lot of XOR operations, among others. Is it possible to offload the XOR to the floating-...
Serge Rogatch's user avatar
0 votes
0 answers
77 views

CUDA Execution Provider in ONNX makes error where combining TensorRT with ONNX

Moving from CUDA ONNX to TensorRT code in Python got this error while running a model from ONNX (with CUDA Provider) and model from TensorRT in the same code. got this errors 2023-11-26 11:46:35....
Arthur's user avatar
  • 1
0 votes
0 answers
39 views

CUDA failed to initialize in docker container, Ubuntu22.04, WSL2

The pytorch code running in container seems not able to access my GPU. I m running a pytorch mesh generation project, they provided a docker image like FROM nvcr.io/nvidia/pytorch:23.04-py3 ARG ...
goulz's user avatar
  • 1
-1 votes
1 answer
56 views

How to associate a CUDA thread with a triple nested loop?

Let's say that there are three variables X, Y and Z with minimum, maximum and variation step values, minX, maxX, minY, maxY, minZ, maxZ (the minimum and maximum values can have any value, negative or ...
Athanasios Margaris's user avatar
0 votes
0 answers
48 views

Bank Conflict between warps and nvprof's detection of Bank Conflict

I am a beginner in CUDA and I am currently studying GEMM and bank conflicts. I have two questions: 1. Is there any bank conflict when threads from different warps access shared memory? I have searched ...
VastRock Huang's user avatar
-2 votes
0 answers
150 views

How does CPU->GPU memory copying work in details?

I'm new to high-performance computing and GPU usage. I want to understand how to estimate the computation time on a GPU. Now I am trying to understand how memory copying between host and device works....
kekmek's user avatar
  • 1
-2 votes
0 answers
34 views

CUDA installation succesfull but no folder to point to for nvcc [duplicate]

I'm trying to install a cudatoolkit version compatible with a github repo I'm trying to work with on ubuntu 22.04.3 LTS that specifies pytorch 1.11.0 in their environment.yml. When installing the ...
MrJorisdh's user avatar
0 votes
1 answer
50 views

How to suppress compiler warnings for CUDA with CMake?

I have a project with both CXX and CUDA enabled: project(my_proj LANGUAGES CXX CUDA) I am linking a third-party library, which uses another third-party library (Eigen) as a dependency. I am building ...
nikitablack's user avatar
  • 4,403
0 votes
0 answers
49 views

How to replicate CUDA wmma::store_matrix_sync manually

I'm learning about WMMA ops in CUDA and I have the following working code that does a matrix multiply (both matrices are 16x16): int lidx0 = threadIdx.x; int lidx1 = threadIdx.y; nvcuda::...
Steven Daniel Anderson's user avatar
0 votes
0 answers
254 views

ONNXRuntimeError : 1 : FAIL : Failed to load library libonnxruntime_providers_cuda.so with error: libcurand.so.10

ONNX Failed to create CUDAExecutionProvider. Environment: venv on Ubuntu22.04 python 3.10 GPU: Quadro P600 driver 535 cuda11.8, cudnn8.6 & cudnn8.9 are installed correctly on the system. Packages ...
Abdelaziz Gomaa's user avatar
0 votes
0 answers
35 views

nvcc compile problem. A single input file is required for a non-link phase when an outputfile is specified

I am learning cuda programming and find this compile error. cuda version: 12.2 I write this file to learn the 'add' kernel. The main.cu file includes main function. The add.cu file includes cuda ...
ingridli's user avatar
2 votes
2 answers
61 views

"Reverse" map of `inverse` in torch.unique?

I want to implement a function like "reverse" map of inverse value of torch.unique. For example, torch.unique function can return the unique values uniques of long type input x and a inverse ...
yatorho's user avatar
  • 23
-2 votes
0 answers
50 views

Optimizing Parallel Addition of a Vector to Multiple Vectors Using Thrust Library in C++

I'm attempting to optimize a code snippet that adds a single vector to multiple vectors simultaneously using the Thrust library in C++. The code I've written seems functional, but I'm uncertain about ...
ha ze's user avatar
  • 1
-2 votes
0 answers
29 views

Can't import Nvidia Developer Toolkit in VS2022 [duplicate]

I'm trying to compile (in Windows 11, VS2022) this code: #include <iostream> #include <vector> #include <nvjpeg.h> using namespace std; int main() { nvjpegHandle_t nv_handle; ...
Amiram Yassif's user avatar
0 votes
0 answers
76 views

negative refcount after running cudaHostRegister-cudaHostUnregister on mmap'ed DMA zone (result: memory leak)

Description A custom device allocates memory using dma_alloc_coherent() and returns it to userland using remap_pfn_range() on .mmap routine. User mmap() the device and pinned the memory using ...
Pan's user avatar
  • 9
-2 votes
0 answers
47 views

How is the work efficiency of Blelloch scan leveraged when using shared memory?

I am trying to understand how Blelloch scan is work efficient. I see how it theoretically needs less operations: The downsweep and upsweep both examine the data using a tree pattern. So you just need ...
Guido Sales Calvano's user avatar
0 votes
0 answers
22 views

VS 2022 cannot run cublasCreate() CUDA nvidia cuBLAS [duplicate]

As I wrote in the title. I cannot compile my program in VS 2022 beacuse of the cublasCreate() function. Below is my code and logs. This program is in the .cu file. #include "cublas_v2.h" #...
Miłosz Wiśniewski's user avatar
-4 votes
0 answers
32 views

Cannot traverse large array allocated on device in CUDA [duplicate]

I'm testing some code that's using CUDA and I'm stuck on a problem involving large arrays. Here's the code which gives me problems: #include "cuda_runtime.h" #include "...
Francesco Greco's user avatar
0 votes
1 answer
83 views

Random Reduction Results Without Block Level ThreadFence

I am writing a simple kernel for Tree Reduction that copies multiple slices of blockDim.x elements each to the shared memory array of each block. The number of slices mapped for each block is a ...
salehjg's user avatar
  • 51
1 vote
0 answers
58 views

Intercepting cuda memory management related APIs in cuda11.7 and encountering invalid device context (201) errors

I implemented an interception library that intercepts the driver API cuMemAlloc() and cuGetProcAddress() and then forwards it. Then I set LD_LIBRARY_PATH to the path of the interception library and ...
yyyfish's user avatar
  • 11
0 votes
0 answers
33 views

Trouble with GPU-Accelerated Image Processing using CUDA.NET in C#

I'm attempting to perform GPU-accelerated image processing using CUDA.NET in a C# application. The goal is to swap pixels in an image based on brightness. However, I'm encountering issues, and the ...
tomato bar's user avatar

1
2 3 4 5
287