MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / ggml_is_padded_1d

Function ggml_is_padded_1d

subprojects/llama.cpp/ggml/src/ggml.c:1460–1467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1458}
1459
1460static inline bool ggml_is_padded_1d(const struct ggml_tensor * tensor) {
1461 static_assert(GGML_MAX_DIMS == 4, "GGML_MAX_DIMS is not 4 - update this function");
1462
1463 return
1464 tensor->nb[0] == ggml_type_size(tensor->type) &&
1465 tensor->nb[2] == tensor->nb[1]*tensor->ne[1] &&
1466 tensor->nb[3] == tensor->nb[2]*tensor->ne[2];
1467}
1468
1469bool ggml_is_empty(const struct ggml_tensor * tensor) {
1470 for (int i = 0; i < GGML_MAX_DIMS; ++i) {

Callers 2

ggml_add1_implFunction · 0.85
ggml_scale_implFunction · 0.85

Calls 1

ggml_type_sizeFunction · 0.85

Tested by

no test coverage detected