Expand description
Launch telemetry / tracing integration.
This module provides the kernel_launch_span! macro that emits a
tracing instrumentation span around every kernel launch when the
tracing Cargo feature is enabled. When the feature is disabled the
macro expands to a unit expression () with zero overhead.
§Feature gate
Add tracing to the features in Cargo.toml to enable live spans:
[dependencies]
oxicuda-launch = { version = "*", features = ["tracing"] }§Span fields
When enabled, each span carries:
| Field | Type | Description |
|---|---|---|
kernel | &str | Function name as passed to Kernel::new |
grid | Debug | Grid dimensions (x, y, z) |
block | Debug | Block dimensions (x, y, z) |
§Example (with tracing enabled)
use oxicuda_launch::trace::kernel_launch_span;
let _span = kernel_launch_span!("my_kernel", (4u32, 1u32, 1u32), (256u32, 1u32, 1u32));
// The span is entered while `_span` is in scope.Macros§
- kernel_
launch_ span - No-op version used when the
tracingfeature is disabled.
Structs§
- Kernel
Span Guard - RAII guard that enters a kernel-launch tracing span and exits on drop.