Skip to main content

time_brick

Macro time_brick 

Source
macro_rules! time_brick {
    ($profiler:expr, $name:expr, $elements:expr, $body:block) => { ... };
}
Expand description

Macro for convenient brick timing with automatic sync.

§Usage

time_brick!(profiler, "RmsNorm", 1, {
    rmsnorm_kernel.launch();
    stream.synchronize(); // REQUIRED for GPU
});