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

Function TEST_CASE

test/api/test_gpu.cpp:32–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30#include "test.hpp"
31
32TEST_CASE(load_and_run)
33{
34 auto p = read_onnx("conv_relu_maxpool_test.onnx");
35 auto shapes_before = p.get_output_shapes();
36 migraphx::compile_options options;
37 options.set_offload_copy();
38 p.compile(migraphx::target("gpu"), options);
39 auto shapes_after = p.get_output_shapes();
40 CHECK(shapes_before.size() == 1);
41 CHECK(shapes_before.size() == shapes_after.size());
42 CHECK(shapes_before.front() == shapes_after.front());
43 migraphx::program_parameters pp;
44 auto param_shapes = p.get_parameter_shapes();
45 for(auto&& name : param_shapes.names())
46 {
47 pp.add(name, migraphx::argument::generate(param_shapes[name]));
48 }
49
50 auto outputs = p.eval(pp);
51 CHECK(shapes_before.size() == outputs.size());
52 CHECK(shapes_before.front() == outputs.front().get_shape());
53}
54
55using hip_ptr = MIGRAPHX_MANAGE_PTR(void, hipFree);
56using stream_ptr = MIGRAPHX_MANAGE_PTR(hipStream_t, hipStreamDestroy);

Callers

nothing calls this directly

Calls 15

generateFunction · 0.85
get_hip_bufferFunction · 0.85
frontMethod · 0.80
addMethod · 0.80
dynamicMethod · 0.80
run_asyncMethod · 0.80
atMethod · 0.80
get_streamFunction · 0.70
read_onnxFunction · 0.50
targetClass · 0.50
argumentClass · 0.50
shapeFunction · 0.50

Tested by

no test coverage detected