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

Function TEST_CASE

test/api/test_cpu.cpp:30–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28#include "test.hpp"
29
30TEST_CASE(load_and_run)
31{
32 auto p = read_onnx("conv_relu_maxpool_test.onnx");
33 auto shapes_before = p.get_output_shapes();
34 p.compile(migraphx::target("ref"));
35 auto shapes_after = p.get_output_shapes();
36 CHECK(shapes_before.size() == 1);
37 CHECK(shapes_before.size() == shapes_after.size());
38 CHECK(shapes_before.front() == shapes_after.front());
39 migraphx::program_parameters pp;
40 auto param_shapes = p.get_parameter_shapes();
41 for(auto&& name : param_shapes.names())
42 {
43 pp.add(name, migraphx::argument::generate(param_shapes[name]));
44 }
45 auto outputs = p.eval(pp);
46 CHECK(shapes_before.size() == outputs.size());
47 CHECK(shapes_before.front() == outputs.front().get_shape());
48}
49
50TEST_CASE(load_and_run_init_list)
51{

Callers

nothing calls this directly

Calls 15

generateFunction · 0.85
read_stringFunction · 0.85
pathFunction · 0.85
frontMethod · 0.80
addMethod · 0.80
get_main_moduleMethod · 0.80
read_onnxFunction · 0.50
targetClass · 0.50
quantize_fp16Function · 0.50
quantize_int8Function · 0.50
quantize_fp8Function · 0.50
shapeFunction · 0.50

Tested by

no test coverage detected