MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / write_tensor_i32

Function write_tensor_i32

src/framework/core/backend.cpp:472–480  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

470 const size_t total = static_cast<size_t>(tensor.shape.num_elements());
471 if (element_offset > total || count > total - element_offset) {
472 throw std::runtime_error("write_tensor_f32_slice range exceeds tensor shape");
473 }
474 ggml_backend_tensor_set(
475 tensor.tensor,
476 values,
477 element_offset * sizeof(float),
478 count * sizeof(float));
479}
480
481void write_tensor_f32(const TensorValue & tensor, const std::vector<float> & values) {
482 write_tensor_f32(tensor, values.data(), values.size());
483}

Callers 15

upload_runtime_masksMethod · 0.85
flushMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
encodeMethod · 0.85
embed_tokensMethod · 0.85
encodeMethod · 0.85
buildMethod · 0.85
decode_chunkMethod · 0.85
buildMethod · 0.85

Calls 4

ggml_backend_tensor_setFunction · 0.85
num_elementsMethod · 0.80
dataMethod · 0.45
sizeMethod · 0.45