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

Function are_same_layout

common/train.cpp:454–462  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

452}
453
454static bool are_same_layout(struct ggml_tensor * a, struct ggml_tensor * b) {
455 GGML_ASSERT(a != NULL);
456 GGML_ASSERT(b != NULL);
457 GGML_ASSERT(a->type == b->type);
458 GGML_ASSERT(ggml_are_same_shape(a, b));
459 GGML_ASSERT(ggml_is_contiguous(a) && ggml_is_contiguous(b));
460
461 return true;
462}
463
464void copy_tensor_by_name(struct ggml_tensor * dst, struct ggml_context * ctx, const char * name) {
465 if (dst == NULL) {

Callers 1

copy_tensor_by_nameFunction · 0.85

Calls 2

ggml_are_same_shapeFunction · 0.50
ggml_is_contiguousFunction · 0.50

Tested by

no test coverage detected