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

Function is_identity_materialization

src/framework/runtime/graph_optimizer.cpp:46–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44 return true;
45}
46
47bool is_identity_materialization(const ggml_tensor & node) {
48 if (node.src[0] == nullptr || !same_type_shape_and_layout(node, *node.src[0])) {
49 return false;
50 }
51
52 switch (node.op) {
53 case GGML_OP_CONT:
54 case GGML_OP_DUP:
55 case GGML_OP_REPEAT:
56 return true;
57 default:
58 return false;
59 }
60}
61
62bool supports_implicit_broadcast_rhs(ggml_op op) {

Callers 1

optimize_graphFunction · 0.85

Calls 1

Tested by

no test coverage detected