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

Function graph_sub

src/framework/audio/zipenhancer.cpp:399–404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

397}
398
399core::TensorValue graph_sub(core::ModuleBuildContext & ctx, const core::TensorValue & lhs, const core::TensorValue & rhs) {
400 core::validate_shape(rhs, lhs.shape, "ZipEnhancer sub rhs");
401 const auto lhs_contiguous = core::ensure_backend_addressable_layout(ctx, lhs);
402 const auto rhs_contiguous = core::ensure_backend_addressable_layout(ctx, rhs);
403 return core::wrap_tensor(ggml_sub(ctx.ggml, lhs_contiguous.tensor, rhs_contiguous.tensor), lhs.shape, GGML_TYPE_F32);
404}
405
406core::TensorValue graph_mul(core::ModuleBuildContext & ctx, const core::TensorValue & lhs, const core::TensorValue & rhs) {
407 return modules::MulModule().build(ctx, lhs, rhs);

Callers 2

graph_bypassFunction · 0.85
graph_bias_normFunction · 0.85

Calls 4

validate_shapeFunction · 0.85
wrap_tensorFunction · 0.85
ggml_subFunction · 0.85

Tested by

no test coverage detected