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

Function TEST_CASE

test/simplify_qdq_test.cpp:65–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65TEST_CASE(remove_qdq)
66{
67 migraphx::shape sh1{migraphx::shape::float_type, {100, 100}};
68 migraphx::shape sh2{migraphx::shape::float_type, {100, 100}};
69
70 migraphx::module m1;
71 {
72 auto t1 = m1.add_parameter("t1", sh1);
73 auto t2 = m1.add_parameter("t2", sh2);
74 auto scale = m1.add_literal(0.5f);
75 auto zero = m1.add_literal(std::int8_t{0});
76
77 auto q1 = add_quantize_op(m1, "quantizelinear", t1, scale, zero);
78 auto d1 = add_quantize_op(m1, "dequantizelinear", q1, scale, zero);
79 auto q2 = add_quantize_op(m1, "quantizelinear", t2, scale, zero);
80 auto d2 = add_quantize_op(m1, "dequantizelinear", q2, scale, zero);
81 auto add = m1.add_instruction(migraphx::make_op("add"), d1, d2);
82 m1.add_return({add});
83 }
84
85 migraphx::module m2;
86 {
87 auto t1 = m2.add_parameter("t1", sh1);
88 auto t2 = m2.add_parameter("t2", sh2);
89
90 auto add = m2.add_instruction(migraphx::make_op("add"), t1, t2);
91 m2.add_return({add});
92 }
93
94 run_pass(m1);
95 EXPECT(m1 == m2);
96}
97
98TEST_CASE(qdq_different_scales)
99{

Callers

nothing calls this directly

Calls 15

generate_literalFunction · 0.85
broadcast_shiftFunction · 0.85
create_moduleFunction · 0.85
find_matchFunction · 0.85
make_targetFunction · 0.85
verify_rms_rangeFunction · 0.85
run_cseFunction · 0.85
run_passesFunction · 0.85
containsFunction · 0.85
broadcast_scaleFunction · 0.85
add_parameterMethod · 0.80
lensMethod · 0.80

Tested by

no test coverage detected