Expand description
Extended occupancy helpers for CPU-side occupancy estimation.
Unlike the GPU-side queries in crate::occupancy that call
cuOccupancy* driver functions, this module provides pure computation
for analysing occupancy trade-offs without requiring a live GPU.
§Features
OccupancyCalculator— CPU-side occupancy estimationOccupancyGrid— sweep block sizes to find the optimumDynamicSmemOccupancy— occupancy with shared-memory callbacksClusterOccupancy— Hopper+ thread block cluster support
§Example
use oxicuda_driver::occupancy_ext::*;
let info = DeviceOccupancyInfo {
sm_count: 84,
max_threads_per_sm: 1536,
max_blocks_per_sm: 16,
max_registers_per_sm: 65536,
max_shared_memory_per_sm: 102400,
warp_size: 32,
};
let calc = OccupancyCalculator::new(info);
let est = calc.estimate_occupancy(256, 32, 0);
assert!(est.occupancy_ratio > 0.0);Structs§
- Cluster
Config - Thread block cluster configuration for Hopper+ GPUs.
- Cluster
Occupancy - Hopper+ thread block cluster occupancy estimation.
- Cluster
Occupancy Estimate - Result of a cluster occupancy estimation.
- Device
Occupancy Info - Hardware parameters needed for CPU-side occupancy estimation.
- Dynamic
Smem Occupancy - Occupancy estimation where shared memory varies with block size.
- Occupancy
Calculator - CPU-side occupancy estimator — no GPU calls required.
- Occupancy
Estimate - Result of a CPU-side occupancy estimation for one configuration.
- Occupancy
Grid - Sweep block sizes to find the configuration that maximises occupancy.
- Occupancy
Point - A single data point from a block-size sweep.
Enums§
- Limiting
Factor - The resource that limits occupancy the most.