Skip to main content

Crate cubek_test_utils

Crate cubek_test_utils 

Source

Structs§

BaseInputSpec
CubekConfig
Top-level configuration loaded from cubek.toml.
HostData
PrintSection
Progress
Counter shared between a reference algorithm (which bumps it) and a caller (which polls it for streaming progression).
QuantizationInfo
Information about a quantized tensor in tests. This allows marking a tensor as quantized for the kernel dispatcher while keeping the original unquantized data on the host for reference.
RandomInputSpec
TestInput
TestInputBuilder
Fluent builder for TestInput.
TestSection
TestTensor
A test tensor which might be marked as quantized.

Enums§

DataKind
DimFilter
Distribution
ExecutionOutcome
Whether a kernel was executed (without regard to correctness) or failed to compile.
HostDataType
HostDataVec
InputDataType
PrintView
StrideSpec
TestDecision
The final policy-based verdict of a test, after applying the test mode. Determines whether the test should be considered passing or failing.
TestOutcome
The overall outcome of a test, combining execution and validation. Either the kernel was validated or failed to compile.
TestPolicy
ValidationResult
The result of correctness validation for a kernel execution.

Functions§

assert_equals_approx
Check if two tensors are approximately equal
assert_equals_approx_in_slice
Check if two tensors are approximately equal within the given filter.
compare_host_data_files
Compare two HostData blobs previously written to disk by crate::write_host_data.
config
Returns the active config. Cached on first call.
decide
Decide whether a test outcome passes or fails under the active policy.
flush_compile_error
Flush client and surface any pending compile/launch failure as a ExecutionOutcome::CompileError.
launch_and_capture_outcome
Run launch against client, returning its ExecutionOutcome after flushing for any compile/launch errors that surface only asynchronously.
parse_tensor_filter
physical_extent
Number of elements in the physical buffer required to cover every logical index in shape under strides, assuming element 0 is at offset 0.
pretty_print_zip
print_tensor
Backwards-compatible single-tensor helper. Delegates to print_tensors.
print_tensors
Pretty-print one or two tensors through the unified renderer.
read_host_data
Read a HostData previously produced by write_host_data.
write_host_data
Write data to path in the binary format documented at the module level.

Type Aliases§

TensorFilter