Skip to main content

Module testing

Module testing 

Source
Expand description

Test helpers for teeny-cuda’s own test suite.

Structs§

CudaTestEnv
A device + capability pair set up for a test, via setup_cuda_env.

Functions§

launch_config
Build a launch config with an explicit block size.
launch_config_from_program
Build a launch config using block size from kernel metadata.
launch_config_with_grid
Build a launch config with a pre-computed grid and block from kernel metadata.
load_program_from_ptx
Loads a compiled program directly from raw PTX bytes via the driver’s JIT loader (skipping nvptxcompiler) — useful in tests that already have PTX in hand.
setup_cuda_env
Asserts CUDA is available, opens the first device, and resolves its compute capability (overridable via the TEENYC_CAPABILITY env var, e.g. sm_90) — the standard setup for teeny-cuda’s own device-dependent tests.