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

Function list_string_driver_config

crates/openshell-driver-docker/src/tests.rs:60–81  ·  view source on GitHub ↗
(field: &str, values: &[&str])

Source from the content-addressed store, hash-verified

58}
59
60fn list_string_driver_config(field: &str, values: &[&str]) -> prost_types::Struct {
61 prost_types::Struct {
62 fields: std::iter::once((
63 field.to_string(),
64 prost_types::Value {
65 kind: Some(prost_types::value::Kind::ListValue(
66 prost_types::ListValue {
67 values: values
68 .iter()
69 .map(|device_id| prost_types::Value {
70 kind: Some(prost_types::value::Kind::StringValue(
71 (*device_id).to_string(),
72 )),
73 })
74 .collect(),
75 },
76 )),
77 },
78 ))
79 .collect(),
80 }
81}
82
83fn gpu_resources(count: Option<u32>) -> ResourceRequirements {
84 ResourceRequirements {

Callers 2

cdi_devices_configFunction · 0.70
cdi_device_typo_configFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected