device_compute_capability_of

Function device_compute_capability_of 

Source
pub fn device_compute_capability_of(ordinal: usize) -> Result<(u32, u32)>
Expand description

2026-09-25: (major, minor) compute capability of GPU ordinal, with no current context needed on the calling thread.

The preflight needs this form. cuda_host::host creates the context only on its first call; later calls return the existing host and leave the calling thread’s current context alone. A later load can run on another thread (the TUI’s metrale-swap thread, tui/lib_state.rs), where a context-addressed query has no context to read. The ignored GPU test the_real_preflight_runs_on_a_thread_that_did_not_make_the_host checks this form on such a thread.