Skip to main content

build_kernel

Function build_kernel 

Source
pub fn build_kernel(
    client: &Client,
    key: ThroughputKey,
    config: LaunchConfig,
    spec: MemorySpec,
) -> Result<KernelConfig, ThroughputError>
Expand description

Builds the write-only streaming kernel, moving working_set bytes per pass, all of them written.

This is memory_direct with the load removed. The copy kernel moves a line in and a line back out, and counts both directions in ops_count, so what it reports is total traffic across the memory interface. That is the right ceiling for a kernel that also reads what it writes, and the wrong one for a kernel that only writes: an RNG fill, a memset, a broadcast. Those legitimately exceed the copy figure, because half of the copy’s traffic is a direction they never use.

Reported ops_count is the write count alone.