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

Function sandbox_gpu_count

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

Source from the content-addressed store, hash-verified

26/// Return the requested sandbox GPU count, if one was specified.
27#[must_use]
28pub fn sandbox_gpu_count(resources: Option<&SandboxResourceRequirements>) -> Option<u32> {
29 resources
30 .and_then(|resources| resources.gpu.as_ref())
31 .and_then(|gpu| gpu.count)
32}
33
34/// Return the effective compute-driver GPU count.
35///

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected