macro_rules! require_gpu {
($ctx:ident, $expr:expr) => { ... };
}Expand description
Bind a GPU context from $expr, skipping the test when no GPU is available.
If the environment variable OXIUI_GPU_TESTS is set to "1", a missing GPU
causes a panic (fail-loud mode for dedicated GPU CI runners). Otherwise the
test function returns early with a printed skip notice.
§Example
ⓘ
require_gpu!(ctx, ComputeContext::try_new());
// ctx: ComputeContext is bound here