Questions tagged [cuda-gdb]

CUDA-GDB is the NVIDIA tool for debugging CUDA applications running on Linux and Mac. CUDA-GDB is an extension to the x86-64 port of GDB, the GNU Project debugger.

From the CUDA-GDB documentation:

CUDA-GDB is the NVIDIA tool for debugging CUDA applications running on Linux and Mac. CUDA-GDB is an extension to the x86-64 port of GDB, the GNU Project debugger. The tool provides developers with a mechanism for debugging CUDA applications running on actual hardware. This enables developers to debug applications without the potential variations introduced by simulation and emulation environments.

CUDA-GDB runs on Linux and Mac OS X, 32-bit and 64-bit. CUDA-GDB is based on GDB 7.2 on both Linux and Mac OS X.

88 questions
2
votes
1 answer

Shared memory address passed to device function is still shared memory?

Let's say I have this __device__ function: __device__ unsigned char* dev_kernel(unsigned char* array_sh, int params){ return array_sh + params; } And within the __global__ kernel I use it in this way: uarray = dev_kernel (uarray,…
Blufter
  • 97
  • 1
  • 12
2
votes
1 answer

failed using cuda-gdb walking-through example

I am trying the walking-through example in CUDA-GDB manual, and follow exactly the same compilation command. I am using CUDA-4 on Fermi M2090, and CUDA-GDB failed with the following message when I type "run" under GDB…
Hailiang Zhang
  • 17,604
  • 23
  • 71
  • 117
2
votes
3 answers

cuda-gdb with cuda-memcheck error

I have this cuda code, that when I execute with cuda-memcheck it returns no errors, it exits normally, and the results I get are actually the expected... At the same time, there is a file "cuda-memcheck-(put various mumbers here).out" created, that…
Panagiotis
  • 315
  • 1
  • 3
  • 5
2
votes
2 answers

Does cuda-gdb require root permissions?

I am doing GPGPU development on Arch Linux with the cuda-sdk and cuda-toolkit packages. My attempts to run cuda-gdb as a normal user on a simple program results in: $ cuda-gdb ./driver NVIDIA (R) CUDA Debugger 4.2 release Portions Copyright (C)…
nwhsvc
  • 652
  • 1
  • 6
  • 15
2
votes
1 answer

Misaligned Shared or Local Address

I am using cuda-memcheck for checking for memory errors. A simple question. What exactly means Misaligned Shared or Local Address ?
1
vote
1 answer

Debugging symbols for CUFFT and CUDA Runtime API (cudart)

Where I can find *.debug file with debugging info for CUDA libraries from CUDA SDK, namely CUFFT and CUDA Runtime API (cudart), and how to provide them to debugger and/or profiler? Without this info debugging application that uses CUDA libraries is…
Jakub Narębski
  • 309,089
  • 65
  • 217
  • 230
1
vote
1 answer

CUDA-GDB crashes in Kernel

I've been trying to debug my code, as I know something is going wrong in the Kernel, and I've been trying to figure out what specifically. If I try to step into the kernel it seems to completely step over the kernel functions, and will eventually…
Izri
  • 21
  • 1
1
vote
1 answer

VSCode fail to debug Cython wrapped CUDA code (but CLI cuda-gdb can)

Background: Running VSCode on Ubuntu 20.04 The following have been accomplished: (a) Compiled and build the Cython wrapper for CUDA code (packaged as shared library .so); (b) Python script importing said .so file runs, and can be debugged directly…
1
vote
2 answers

How to debug a CUDA program built by cmake in VIsual Studio Code?

I'm trying to debug a test program with VS CODE, CMake in Ubuntu 20. I referred mainly to the CUDA debugger document: https://docs.nvidia.com/nsight-visual-studio-code-edition/cuda-debugger/index.html. However, I'm not sure about how to write a…
hh zhao
  • 11
  • 2
1
vote
1 answer

Is it possible to change the order in which CUDA thread blocks are scheduled when compiled with `--device-debug`?

Short Version I have a kernel that launches a lot of blocks and I know that there is are illegal memory reads happening for blockIdx.y = 312. Running it under cuda-gdb results in sequential execution of blocks 16 at a time and it takes very long for…
loonatick
  • 648
  • 1
  • 7
  • 15
1
vote
0 answers

RuntimeError: CUDA error: CUBLAS_STATUS_EXECUTION_FAILED when calling `cublasSgemm( handle, opa, opb, m, n, k, &alpha, a, lda, b, ldb, &beta, c, ldc)`

I'm trying to extract feathers from BertTopic model and I'm using jupyter notebook. The first feature is sentiment analysis and it's done by following code: df-DataFrame, df["title_selftext"] - this data frame column contain a text (str) def…
1
vote
1 answer

Is there a way to access value of constant memory bank in CUDA

I have been trying to debug cuda programs that use inline PTX assembly. Specifically, I am debugging at the instruction level, and am trying to determine the values of arguments to the instructions. Occasionally, the disassembly includes a…
Benjie
  • 113
  • 10
1
vote
0 answers

cuda-gdb attaching: A program is being debugged already. Kill it?

I tried to attach to running process(python3) after I found GPU-related log in the dmesg. ex) Xid 13, 31, 45 But i couldn't get any clue because of below message. Does anyone know what this message means? Couldn't write extended state status: Bad…
uthline
  • 102
  • 7
1
vote
2 answers

Why does cuda-gdb launch multiple threads?

When I start my program in cuda-gdb, I get an output like: [New Thread 0x7fffef8ea700 (LWP 8003)] [New Thread 0x7fffe35b2700 (LWP 8010)] [New Thread 0x7fffe2db1700 (LWP 8011)] [New Thread 0x7fffe25b0700 (LWP 8012)] I do not understand why these…
shaunshd
  • 95
  • 5
1
vote
1 answer

CUDA-GDB view variables in C/C++

I have installed the latest version of the CUDA drivers available from NVIDIA mmiller@host:~/NVIDIA_CUDA-7.5_Samples$ nvcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2015 NVIDIA Corporation Built on…
Milhous
  • 14,473
  • 16
  • 63
  • 82