MCPcopy Create free account
hub / github.com/evilsocket/cake / read_tensors

Method read_tensors

cake-core/src/utils/tensor_storage.rs:80–82  ·  view source on GitHub ↗

Read multiple tensors at once. Default calls read_tensor in a loop. Implementations may optimize by batching I/O for contiguous tensors.

(&self, names: &[&str])

Source from the content-addressed store, hash-verified

78 /// Read multiple tensors at once. Default calls read_tensor in a loop.
79 /// Implementations may optimize by batching I/O for contiguous tensors.
80 fn read_tensors(&self, names: &[&str]) -> Result<Vec<TensorData>> {
81 names.iter().map(|n| self.read_tensor(n)).collect()
82 }
83 /// Check if a tensor exists in this storage.
84 fn has_tensor(&self, name: &str) -> bool;
85 /// List all tensor names available in this storage.

Callers

nothing calls this directly

Implementers 3

tensor_storage.rscake-core/src/utils/tensor_storage.rs
disk_expert_provider.rscake-core/src/models/common/disk_exper
disk_provider_via_mockcake-core/tests/unit_tests/test_expert

Calls 1

read_tensorMethod · 0.45

Tested by

no test coverage detected