MCPcopy Create free account
hub / github.com/antirez/ds4 / model_map_span_vec_include_layer_decode

Function model_map_span_vec_include_layer_decode

ds4.c:4275–4286  ·  view source on GitHub ↗

* Decode-time spans for one layer. The static set excludes routed expert * tensors because the streaming expert cache serves them — but a boosted * layer (per-expert bytes != the global slab class) can never be cached, and * both the selected-addr prefill fallback and the decode no-cache fallback * read its experts through ds4_gpu_wrap_model_range / wrap_model_exact_range * over the model map

Source from the content-addressed store, hash-verified

4273 if (n < 0 || (size_t)n >= sizeof(name)) ds4_die("tensor name is too long");
4274 return required_tensor(m, name);
4275}
4276
4277static ds4_tensor *tensor_by_mtp_stage_suffix(
4278 const ds4_model *m,
4279 uint32_t stage,
4280 const char *suffix) {
4281 char name[160];
4282 int n = snprintf(name, sizeof(name), "mtp.%u.%s", stage, suffix);
4283 if (n < 0 || (size_t)n >= sizeof(name)) ds4_die("tensor name is too long");
4284 return model_find_tensor(m, name);
4285}
4286
4287static void tensor_expect_layout(
4288 const ds4_tensor *t,
4289 uint32_t type,

Tested by

no test coverage detected