MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / add_quantize_op

Function add_quantize_op

test/eliminate_zero_point_test.cpp:43–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41static void run_pass(migraphx::module& m) { run_passes(m, {migraphx::simplify_algebra{}}); }
42
43static migraphx::instruction_ref add_quantize_op(migraphx::module& m,
44 const std::string& name,
45 migraphx::instruction_ref x,
46 migraphx::instruction_ref scale,
47 migraphx::instruction_ref shift)
48{
49 auto lens = x->get_shape().lens();
50 auto scale_mb =
51 m.add_instruction(migraphx::make_op("multibroadcast", {{"out_lens", lens}}), scale);
52 auto shift_mb =
53 m.add_instruction(migraphx::make_op("multibroadcast", {{"out_lens", lens}}), shift);
54 return m.add_instruction(migraphx::make_op(name), x, scale_mb, shift_mb);
55}
56
57static migraphx::instruction_ref
58add_quantize_op(migraphx::module& m,

Callers 1

TEST_CASEFunction · 0.70

Calls 6

lensMethod · 0.80
make_opFunction · 0.50
to_valueFunction · 0.50
get_shapeMethod · 0.45
add_instructionMethod · 0.45
to_valueMethod · 0.45

Tested by

no test coverage detected