MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / ggml_are_same_layout

Function ggml_are_same_layout

ggml-backend.c:169–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167// backend copy
168
169static bool ggml_are_same_layout(const struct ggml_tensor * a, const struct ggml_tensor * b) {
170 if (a->type != b->type) {
171 return false;
172 }
173 for (int i = 0; i < GGML_MAX_DIMS; i++) {
174 if (a->ne[i] != b->ne[i]) {
175 return false;
176 }
177 if (a->nb[i] != b->nb[i]) {
178 return false;
179 }
180 }
181 return true;
182}
183
184void ggml_backend_tensor_copy(struct ggml_tensor * src, struct ggml_tensor * dst) {
185 //printf("src: %s ne: [%d %d %d %d] nb: [%d %d %d %d]\n", src->name, (int)src->ne[0], (int)src->ne[1], (int)src->ne[2], (int)src->ne[3], (int)src->nb[0], (int)src->nb[1], (int)src->nb[2], (int)src->nb[3]);

Callers 1

ggml_backend_tensor_copyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected