Expand description
Kernel debugging utilities for OxiCUDA.
This module provides tools for debugging GPU kernels without traditional debuggers. It includes memory checking, NaN/Inf detection, printf emulation, assertion support, and PTX instrumentation for automated bounds/NaN checking.
§Architecture
The debugging system is layered:
KernelDebugger— Top-level manager that creates debug sessions and manages breakpoints / watchpoints.DebugSession— CollectsDebugEvents for a single kernel launch.MemoryChecker— Validates memory accesses against known allocations.NanInfChecker— Scans host-side buffers for NaN / Inf values.PrintfBuffer— Parses a raw byte buffer that emulates GPUprintf.KernelAssertions— Convenience assertion helpers that produceDebugEvents instead of panicking.DebugPtxInstrumenter— Instruments PTX source for automated bounds/NaN checking and printf support.
§Example
use oxicuda_driver::debug::*;
let config = KernelDebugConfig::default();
let mut debugger = KernelDebugger::new(config);
let session = debugger.attach("my_kernel").unwrap();
assert_eq!(session.kernel_name(), "my_kernel");Structs§
- Debug
Event - A single debug event captured during kernel execution.
- Debug
PtxInstrumenter - Instruments PTX source code with debugging checks.
- Debug
Session - An active debug session for a single kernel launch.
- Debug
Summary - Aggregate statistics for a debug session.
- Kernel
Assertions - Convenience assertion helpers that produce
DebugEvents instead of panicking, suitable for GPU kernel emulation / validation. - Kernel
Debug Config - Configuration for a kernel debug session.
- Kernel
Debugger - Top-level kernel debugging manager.
- Memory
Checker - Validates memory accesses against a set of known
MemoryRegions. - Memory
Region - A contiguous GPU memory allocation known to the memory checker.
- NanInf
Checker - Scans host-side buffers for NaN and Inf values.
- NanInf
Location - Location of a NaN or Inf value found in a buffer.
- Printf
Buffer - GPU-side printf emulation buffer.
- Printf
Entry - A parsed GPU-side printf entry.
Enums§
- Debug
Event Type - The kind of debug event captured during kernel execution.
- Debug
Level - Verbosity level for kernel debugging output.
- Printf
Arg - A single argument captured from a GPU printf call.
- Watch
Type - The kind of memory access a watchpoint monitors.