JuliaGPU / JuliaGPU/CUDA.jl

Host-side stack unwinding

Open
#64 4 comments 0 reactions 0 assignees View on GitHub
cuda kernels enhancement
Dominant language
Julia
Stars
1.4k
Forks
281
Avg merge
1d 7h
Merged PRs (30d)
30

Description

[brain-dump of potentially interesting approach for exception traces]

The exception backtrace POC in https://github.com/JuliaGPU/CUDAnative.jl/pull/303 embeds debug information in global variables and reports it at run-time since we don't have the ability to unwind the stack on-device. At the same time, unwinding the stack should be possible from the host, using the [CUDA debugger API](https://docs.nvidia.com/cuda/debugger-api/r_main.html#r_main) (this requires https://github.com/JuliaGPU/CUDAnative.jl/issues/31, of course). The only remaining problem there is how to transfer control from the device to the host once an exception occurs, since running under the debugger all time is probably expensive. the `CUDA_DEVICE_WAITS_ON_EXCEPTION` environment variable might be a possibility: https://docs.nvidia.com/cuda/cuda-gdb/index.html#attaching

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.