721
questions
0
votes
0
answers
44
views
Encountering Strange Issues When Installing CUDA 12.3 and Visual Studio 2019 on Windows!
VS Version: VS2019 Version 16.11.8
CUDA Version: cuda_12.3.0_545.84_windows
Windows system: Windows Server 2019 Standard
Install Steps:
First, I installed VS2019.
Then, I installed CUDA 12.3, ...
1
vote
1
answer
66
views
How to stop nvcc from reordering clock instructions?
In the following snippet nvcc (CUDA 12.5) 'helpfully' reorders the clock statement. This causes the timings to be off by a factor 26x.
#include <cuda.h>
#include <stdio.h>
__device__ int ...
0
votes
0
answers
33
views
How to evaluate the vector dot performance on Nvidia Gpu
I want to evaluate the vector dot efficient. I recursively launch vector dot operation cublasSdot. The result is very far from the official metrics.
My hardware is H20 with 40TFLOPS cuda core ...
0
votes
0
answers
55
views
NVCC 12.2 and g++ 13.2.0 on CUDA 12.4
When I compile a program with NVCC using CUDA 12.4 and g++ 13.2.0 I get the error
/run/current-system/sw/include/crt/host_config.h:143:2: error: #error -- unsupported GNU version! gcc versions later ...
1
vote
2
answers
128
views
CUDA nvcc compiler from Windows PowerShell
I'm trying to compile a simple example from GitHub/cuda_samples on Windows PowerShell1:
$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on ...
0
votes
0
answers
32
views
Load modules in the environment where vscode cmake runs
I have created a CMakePresets.json file for a project where I use some libraries that use Kokkos and uses a custom compiler called nvcc_wrapper. I have added two scripts as CMAKE_COMMAND to load the ...
0
votes
0
answers
60
views
Debugging REShAPE software mex and nvcc issue
I am running this software called REShAPE on Windows 10 using Matlab 2019b and VS Studio 2017. although I get this error:
MATLAB: > In vl_compilenn>activate_nvcc (line 768)
MATLAB: In ...
0
votes
0
answers
51
views
Mex complier issue (windows 10, cuda 10.1, visual studio 2017)
I am trying to follow this github and to open the code I am running into errors with the mex compiler:
% Apply pre-compilation modifier function to adjust the flags and
% parameters. This can be used ...
0
votes
1
answer
397
views
Difference between nvidia-cuda-toolkit and cuda-toolkit-12-6
I am trying to install cuda on my ubuntu machine. I followed instructions from https://developer.nvidia.com/cuda-downloads to install the base installer for the cuda toolkit, which installs the cuda-...
-1
votes
0
answers
37
views
Problem with cudnn as well as cuda while running an old software called REShAPE (using matlab 2019b and vs code 2022)
The GitHub this is based off of: https://github.com/NIH-NEI/REShAPE
Here is the error message I am running using cuda 10.1, as well as a problem with cudnn and nvcc, not sure at all what this means or ...
0
votes
1
answer
120
views
Cannot use GPU, CuPy is not installed
I have a GPU enabled machine.
O.S: Ubuntu 20.04.6 LTS
nvcc version: 12.2
Nvidia Driver Version: 535.183.01
Pytorch version 2.3.1+cu121
spaCy version 3.7.5
Python version 3.8.10
Pipelines : ...
0
votes
1
answer
109
views
CMake: CUDA compiler found, yet "no GPU detected"
After upgrading cuda, cmake couldn't detect GPU for the following cuda project (it worked perfectly before upgrading):
# CMakeLists.txt:
cmake_minimum_required(VERSION 3.24)
if (NOT ...
0
votes
1
answer
59
views
Linking CUDA device functions
I have this a.cu file:
extern "C" __device__ int test42();
__global__ void get42(int* toStore){
*toStore = test42();
}
int main() {
int host{0};
int* device;
cudaMalloc(&...
0
votes
1
answer
517
views
cudafe++ died with status 0xc0000409 when switching to c++20 for nvcc
When I switch nvcc from using c++17 to c++20 through std flag, I get this error:
cudafe++ died with status 0xc0000409
All compiles and works as expected with 17, but when I switch to c++20, my ...
0
votes
1
answer
78
views
CUDA Error 101 with cudaMemPrefetchAsync Positioning on WSL2
I am running these snippets on WSL using CUDA 12.1.
snip1 returns a CUDA error 101: invalid device ordinal, while snip2 runs without any issues.
The difference between these snippets is only positions ...
0
votes
1
answer
124
views
nvcc doesn't produce any windows output
The nvcc compiler doesn't produce any output whatsoever when it is called regularly.
Using --version gives me:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on ...
1
vote
1
answer
64
views
cudaDeviceSynchronize() not found in nvcuda.dll
I'm writting CUDA code, compiling it with nvcc in VS2022, generating a PTX file, and running the CUDA code from Embarcadero Delphi. For running the CUDA kernels from Delphi I have written an API to ...
0
votes
2
answers
224
views
nvcc - add flags to a specific file using cmake
I am writing a CXX+CUDA project, and I'm compiling using nvcc, with CXX compiler of icpc.
I want to add different compilation flags for icpc for different files. In CXX standalone this is possible ...
1
vote
1
answer
360
views
Installing Tensorflow (building pip package)
I'm tring to install tensorflow 2.6.0 on WSL2. I follow the guide (https://www.tensorflow.org/install/source?hl=pl) and after:
bazel build //tensorflow/tools/pip_package:wheel --repo_env=WHEEL_NAME=...
4
votes
0
answers
640
views
Why is nvcc giving the error "identifier "__builtin_ia32_ldtilecfg" is undefined" when including the SDL2 Library?
Relatively new to programming and I've been trying to make a 3D Rendering pipeline from scratch in C++ without the abstraction that OpenGL or Vulkan provide and I wanted to try implementing CUDA for ...
1
vote
1
answer
66
views
Is there a way to enable `-Wconversion` in nvcc for the device code (the kernel code)?
I am recently learning to write a prefix sum algorithm with CUDA. I had a stupid bug where I assigned a float variable to an integer variable losing precision:
// Phase 3: populate last element o ...
0
votes
0
answers
33
views
Compilation Error with Boost.Geometry and NVCC (CUDA 12.4): '__T0' does not name a type [duplicate]
I'm encountering a compilation error when trying to compile a project using Boost.Geometry with NVCC, part of CUDA 12.4. The project compiles fine with GCC alone, but when NVCC is involved, it throws ...
3
votes
0
answers
75
views
Compute and Data transfer not happening concurrently in cuda Streams on Iteration 2
I have written a basic program where a chunk of data is loaded in CPU memory (Pinned), and then I transfer it in chunks to GPUs (Asynchronously), and then do computation on each chunk. So for each ...
1
vote
1
answer
116
views
Missing functions for NVIDIA CUDA 12.3 CSR Formatted Sparse Linear Algebra
Does anyone know why the cuSPARSE documentation for CUDA version 12 references cusparseDcsrsv2_analysis and cusparseDcsrsv2_solve, but these functions are no where to be found in their actual cusparse....
0
votes
0
answers
141
views
On windows Server 2019 nvidia-smi cannot show the correct installed version of CUDA
when I try nvidia-smi I am getting this:
CUDA version:12.2
But i have uninstalled 12.2 version and installed 11.2,
while trying in nvcc --version cmd am getting this 11.2 version only,
**nvcc:
NVIDIA (...
0
votes
1
answer
137
views
Error linking c++ shared library with CUDA
EDIT:
I was able to reduce the problem a lot. Only three files, one .cpp, one .cu and one heather, and the same error as the original message appears when trying to link them.
The code of example ...
0
votes
0
answers
108
views
CMake fails to link a shared library decorated with a suffix (like somelib.so.1). Is there any way around it?
I'm experimenting with HIP/ROCm and I'm exploring the cross-platform capabilities.
While, I'm impressed with how welcoming it is to port CUDA implementations on a AMD GPU, I'm having a difficult time ...
0
votes
1
answer
94
views
Compiling cpp helper function with main.cu using NVCC compiler
I'm having an issue on creating a Makefile to compile my main file as a .cu file and my helper function as a cpp file. The reason I'm using cpp is that the helper function "sequence.cpp" is ...
-1
votes
1
answer
106
views
Register usage count of kernel different with and without -lineinfo flag
I have a simple matrix multiplication kernel running on CUDA.
When compiling using -lineinfo command along with --ptxas-options -v the register count is displayed as 28, whereas without the -lineinfo ...
2
votes
1
answer
76
views
CMake and Cuda separate compilation of class constructor on device fail during linking
I have problem with linking constructor that is on device via CMake. It causes troubles only when calling function within class. Do you have any idea?
I tried to compile and link manually with nvcc ......
0
votes
1
answer
189
views
couldn't allocate an array of size 2116800 on device code
I have a class Color with 3 double variable and another class Image with an array of Color. The problem is I can't allocate a Color array of size 1960*1080 on GPU code:
#include <iostream>
// ...
1
vote
0
answers
47
views
L1/Texture cache enabling effect on nvcc(cuda 10.2) on jetson nano (maxwell architecture)
In an attempt to understand the usage of texture memory for bilinear interpolation compared to global memory.
I implemented a simple bilinear interpolation kernel using global memory as follows :
...
1
vote
1
answer
415
views
clangd mangling system include paths
Running clangd --check=my_file.cu I get something along these lines (simplified):
I[13:05:09.356] Testing on source file /path/to/my_file.cu
I[13:05:09.362] Loading compilation database...
I[13:05:09....
0
votes
1
answer
326
views
How do I include Cutlass in a CuPy project?
kernel = r"""
#include <include/cutlass/cutlass.h>
extern "C" __global__ void entry0() {
return ;
}
"""
import cupy as cp
raw_module = cp.RawModule(...
0
votes
0
answers
210
views
CondaValueError: invalid package specification: nvcc --version=10.1
when try to create environment in anaconda, input:
conda env create -f environment.yml
Output:
CondaValueError: invalid package specification: nvcc --version=10.1
enviroment.yml include dependency:
...
0
votes
1
answer
159
views
Compilation Errors with CUDA and MSVC: Identifiers from <atomic> Undefined
I'm working on a CUDA project using cl as the host compiler (Visual Studio 2019, MSVC v14.29.30133). I encountered an error related to the C++11 <atomic> header in CUDA standard library ...
0
votes
0
answers
32
views
icpx: error: cannot specify -o when generating multiple output files
I can't seem to specify -xRAPTORLAKE to the intel compiler when also using nvcc.
nvcc -ccbin icpx -Xcompiler -xRAPTORLAKE -o exe_filename source_filename.cu
icpx: error: cannot specify -o when ...
0
votes
0
answers
184
views
Why does this code not compile in CUDA c++20 standard?
This code should compile but it doesn't and I don't know why: https://godbolt.org/z/c8ox9KoGY
I get this error:
<source>:1:20: error: expected identifier before '>' token
1 | ...
3
votes
1
answer
6k
views
Getting CUDA version correctly reported by nvcc
I am trying to update CUDA in Ubuntu. Following the guide here, my initial set up had the CUDA version reported as:
via nvcc - Cuda compilation tools, release 10.1, V10.1.243
via nvidia-smi - 11.1
...
2
votes
1
answer
527
views
How to compile C++20 CUDA program on Ubuntu 20?
I am trying to build a program with some CUDA files using C++20 language standard on Ubuntu 20.04 LTS (Focal Fossa) with nvidia/cuda:12.1.0-devel-ubuntu20.04:
The CUDA compiler identification is ...
1
vote
0
answers
128
views
Use of bitfields for arm64 architecture
I have a code base with following data structure.
#pragma pack(push,1)
struct points_t {
uint16_t r, r2;
uint16_t intensity : 12;
uint16_t intensity2 : 12;
uint8_t match, match2, retro;
...
1
vote
0
answers
196
views
Compiling CUDA files that rely on a Protobuf message with a map field results in "return type is not identical to nor covariant with return type"
I am trying to compile a project that uses CUDA, gRPC, and Protobuf.
The project was originally built with gRPC 1.20 and Protobuf 3.7, but I am using the latest version of gRPC (tried 1.55, 1.56.x, ...
0
votes
1
answer
89
views
Is there a way to output the closure type of an extended lambda from NVCC?
I'm trying to port parts of a large project of mine to CUDA/HIP and have been disappointed with the countless restrictions that there are on the use of extended lambdas. I encountered a nasty bug when ...
1
vote
1
answer
227
views
nvcc (cuda8, gcc 5.3) no longer compiles with -O1 on Ubuntu 22.04
I have a CUDA-8 program which compiled (nvcc) well 7 months ago on Ubuntu 22.04, following this procedure, the underlying compiler being gcc (Ubuntu 5.3.1-14ubuntu2) 5.3.1 20160413.
After (not sure ...
2
votes
1
answer
570
views
Does nvcc use cl.exe to compiler both .cpp and .cu files in windows?
I know nvcc only compiles .cu files, and pass .c or .cpp to designated compilers like gcc, g++, clang, clang++, etc...
Here's my problem.
Thrust headers in .h file in Windows which uses cl.exe ...
0
votes
1
answer
331
views
why nvcc doesn't work while cmake works when compiling a CUDA C++ project?
I have a code written in CUDA C++, I can build this project using CMake, Make and run it as usual. But when I try to use nvcc to debug it, it throws an error like
fatal error: ATen/ATen.h: No such ...
1
vote
1
answer
2k
views
nvcc fatal : A single input file is required for a non-link phase when an outputfile is specified
When using CMake 3.26.4 with CUDA v12.1 and Visual 16.11.25 and compiling a .cu file,
I get the following error:
1>nvcc fatal : A single input file is required for a non-link phase when an ...
2
votes
0
answers
1k
views
CUDA NVCC compiles very slowly without "-G" debug flag
This command works fine (with the -G option):
nvcc test.cu -o test -Iinclude -I../boost_1_79_0 -std=c++20 --expt-relaxed-constexpr -DNDEBUG -arch=sm_86 -G
But if I remove the -G option, the nvcc ...
0
votes
2
answers
269
views
CUDA using __global__ kernel as template parameter
#include <cuda_runtime.h>
#include <iostream>
#include <fstream>
using namespace std;
__host__ __device__
struct Cargs {
int x, y;
Cargs() {}
};
using Func = void(*)(int N, ...
1
vote
1
answer
927
views
Thread block clusters and distributed shared memory not working as intended
I have written a simple CUDA program to perform array reduction using thread block clusters and distributed shared memory. I am compiling it with CUDA 12.0 and running on a hopper GPU. Below is the ...