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

Function ggml_are_same_layout

external/ggml/src/ggml-impl.h:75–88  ·  view source on GitHub ↗

TODO: move to ggml.h? (won't be able to inline)

Source from the content-addressed store, hash-verified

73
74// TODO: move to ggml.h? (won't be able to inline)
75static bool ggml_are_same_layout(const struct ggml_tensor * a, const struct ggml_tensor * b) {
76 if (a->type != b->type) {
77 return false;
78 }
79 for (int i = 0; i < GGML_MAX_DIMS; i++) {
80 if (a->ne[i] != b->ne[i]) {
81 return false;
82 }
83 if (a->nb[i] != b->nb[i]) {
84 return false;
85 }
86 }
87 return true;
88}
89
90static bool ggml_op_is_empty(enum ggml_op op) {
91 switch (op) {

Callers 5

ggml_backend_tensor_copyFunction · 0.85
ggml_metal_op_binFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected