#test-framework #edge-cases #gpu

trueno-cuda-edge

GPU edge-case test framework — null fuzzing, shared memory probing, lifecycle chaos, quantization parity, PTX poison trapping

1 unstable release

0.1.0 Feb 11, 2026

#1557 in Testing

Download history 26/week @ 2026-02-22 228/week @ 2026-03-01 115/week @ 2026-03-08 99/week @ 2026-03-15 4/week @ 2026-03-22 8/week @ 2026-03-29 200/week @ 2026-04-05 121/week @ 2026-04-12

343 downloads per month
Used in 2 crates

MIT license

165KB
3.5K SLoC

trueno-cuda-edge

GPU edge-case test framework for the Trueno ecosystem.

This crate provides comprehensive tools for testing GPU code edge cases:

  • Null Fuzzing: Inject null pointers into kernel arguments
  • Shared Memory Probing: Detect overflows and bank conflicts
  • Lifecycle Chaos: Stress-test context creation/destruction
  • Quantization Oracle: Verify CPU/GPU parity across formats
  • PTX Poison: Mutation testing for PTX assembly
  • Supervision: Erlang-style worker crash recovery

Feature Flags

  • cuda: Enable CUDA driver FFI (requires NVIDIA driver)
  • full: All features enabled

Quick Start

use trueno_cuda_edge::{
    null_fuzzer::NonNullDevicePtr,
    shmem_prober::{ComputeCapability, check_allocation},
    supervisor::{SupervisionTree, SupervisionStrategy},
    falsification::FalsificationReport,
};

// Guard type rejects null pointers
assert!(NonNullDevicePtr::<u8>::new(0).is_err());

// Validate shared memory allocation
let ampere = ComputeCapability::new(8, 0);
assert!(check_allocation(ampere, 100 * 1024).is_ok());

// Supervision tree
let mut tree = SupervisionTree::new(SupervisionStrategy::OneForOne, 4);

// Track test coverage
let report = FalsificationReport::new();
assert_eq!(report.coverage(), 0.0);

PMAT Tickets

This crate implements:

Ticket Module Description
TCE-001 null_fuzzer NonNullDevicePtr guard type
TCE-002 null_fuzzer Null injection strategies
TCE-003 null_fuzzer Propagation tracking
TCE-004 shmem_prober Boundary sentinel probing
TCE-005 shmem_prober Bank conflict injection
TCE-006 lifecycle_chaos Context chaos scenarios
TCE-007 lifecycle_chaos Leak detection
TCE-008 quant_oracle CPU/GPU parity checking
TCE-009 quant_oracle Boundary value generation
TCE-010 ptx_poison PTX mutation operators
TCE-011 ptx_poison PTX structural verification
TCE-012 supervisor Worker supervision tree

Dependencies

~0.2–1.3MB
~27K SLoC