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

Function TEST_CASE

test/onnx/verify/resize_downsample_linear_dyn_test.cpp:29–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27#include <onnx_test.hpp>
28
29TEST_CASE(resize_downsample_linear_dyn_test)
30{
31 using migraphx::half;
32 migraphx::onnx_options options;
33 options.map_dyn_input_dims = {{"X", {{1, 1}, {1, 1}, {2, 3}, {4, 8}}}};
34 migraphx::program p = read_onnx("resize_downsample_linear_half_test.onnx", options);
35 p.compile(migraphx::make_target("ref"));
36
37 migraphx::shape sx{migraphx::shape::half_type, {1, 1, 2, 4}};
38 std::vector<half> dx = {half{1}, half{2}, half{3}, half{4}, half{5}, half{6}, half{7}, half{8}};
39
40 migraphx::parameter_map pp;
41 pp["X"] = migraphx::argument(sx, dx.data());
42
43 auto result = p.eval(pp).back();
44 std::vector<half> result_vector;
45 result.visit([&](auto output) { result_vector.assign(output.begin(), output.end()); });
46
47 // Expected output was calculated without any quantization
48 std::vector<half> gold = {half{2.8333333}, half{4.833333}};
49
50 EXPECT(migraphx::verify::verify_rms_range(result_vector, gold));
51}

Callers

nothing calls this directly

Calls 12

make_targetFunction · 0.85
verify_rms_rangeFunction · 0.85
backMethod · 0.80
read_onnxFunction · 0.50
argumentClass · 0.50
compileMethod · 0.45
dataMethod · 0.45
evalMethod · 0.45
visitMethod · 0.45
assignMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected