INNER CODE UNIT · Rust
driver_result_stands_when_the_v2_entry_point_exists
NVlabs/cuda-oxide · cuda-bindings/src/lib.rs:135
fn driver_result_stands_when_the_v2_entry_point_exists() {
for code in [
cudaError_enum_CUDA_SUCCESS,
cudaError_enum_CUDA_ERROR_INVALID_HANDLE,
cudaError_enum_CUDA_ERROR_NOT_SUPPORTED,
] {
for mode in [CU_HOST_TASK_BLOCKING, CU_HOST_TASK_SPINWAIT] {
assert_eq!(
host_func_v2_outcome(code, mode),
HostFuncV2Outcome::Done(code),
"code {code} in mode {mode} must pass through untouched"
);
}
}
}
#[test]
fn missing_v2_symbol_falls_back_for_blocking_and_refuses_spinwait() {