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

Function driver_gpu_requirements

crates/openshell-core/src/gpu.rs:55–59  ·  view source on GitHub ↗
(
    resources: Option<&DriverResourceRequirements>,
)

Source from the content-addressed store, hash-verified

53/// Return the requested compute-driver GPU requirements, if present.
54#[must_use]
55pub fn driver_gpu_requirements(
56 resources: Option<&DriverResourceRequirements>,
57) -> Option<&DriverGpuResourceRequirements> {
58 resources.and_then(|resources| resources.gpu.as_ref())
59}
60
61const CDI_NVIDIA_GPU_PREFIX: &str = "nvidia.com/gpu=";
62const CDI_NVIDIA_GPU_ALL_SUFFIX: &str = "all";

Callers 11

validated_sandboxMethod · 0.85
validate_gpu_requestFunction · 0.85
vm_gpu_device_idFunction · 0.85
create_sandboxMethod · 0.85
sandbox_to_k8s_specFunction · 0.85

Calls

no outgoing calls

Tested by 1