Expand description
Kernel argument serialization, Debug/Display formatting, and launch logging.
This module provides infrastructure for serializing kernel arguments into a human-readable format, logging kernel launches, and producing aggregate launch summaries. It is useful for debugging, profiling, and tracing GPU kernel invocations.
§Overview
ArgType— describes the data type of a serialized kernel argument.SerializedArg— a single kernel argument with its type, name, and string representation of its value.LaunchLog— a complete record of a single kernel launch including the kernel name, grid/block dimensions, shared memory, and arguments.LaunchLogger— collectsLaunchLogentries for analysis.LaunchSummary— aggregate statistics (per-kernel launch counts, etc.).SerializableKernelArgs— extendsKernelArgswith the ability to serialize arguments intoSerializedArgform.
§Example
use oxicuda_launch::arg_serialize::*;
use oxicuda_launch::{LaunchParams, Dim3};
let arg = SerializedArg::new(Some("n".to_string()), ArgType::U32, "1024".to_string(), 4);
assert_eq!(arg.name(), Some("n"));
assert_eq!(arg.value_repr(), "1024");
let params = LaunchParams::new(4u32, 256u32);
let formatted = format_launch_params(¶ms);
assert!(formatted.contains("grid"));Structs§
- Kernel
Launch Stats - Per-kernel aggregate statistics within a
LaunchSummary. - Launch
Log - A complete record of a single kernel launch.
- Launch
Logger - Collects
LaunchLogentries for inspection and analysis. - Launch
Summary - Aggregate statistics over all recorded kernel launches.
- Serialized
Arg - A serialized representation of a single kernel argument.
Enums§
- ArgType
- Describes the data type of a serialized kernel argument.
Traits§
- Serializable
Kernel Args - Extension trait for
KernelArgsthat can serialize arguments intoSerializedArgform for logging and debugging. - Serialize
Arg - Helper trait to serialize a single value into a
SerializedArg.
Functions§
- format_
args - Pretty-prints a slice of
SerializedArgvalues. - format_
launch_ params - Pretty-prints a
LaunchParamsconfiguration.