MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / sandbox_gpu_requested

Function sandbox_gpu_requested

crates/openshell-core/src/gpu.rs:20–24  ·  view source on GitHub ↗
(resources: Option<&SandboxResourceRequirements>)

Source from the content-addressed store, hash-verified

18/// Return whether sandbox resource requirements request a GPU.
19#[must_use]
20pub fn sandbox_gpu_requested(resources: Option<&SandboxResourceRequirements>) -> bool {
21 resources
22 .and_then(|resources| resources.gpu.as_ref())
23 .is_some()
24}
25
26/// Return the requested sandbox GPU count, if one was specified.
27#[must_use]

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected