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

Function TEST_CASE

test/gpu/stream_sync.cpp:85–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85TEST_CASE(test_stream_sync_compare_kernel)
86{
87 auto binaries = migraphx::gpu::compile_hip_src(
88 {make_src_file("check_stuff.cpp", compare_numbers)}, {}, migraphx::gpu::get_device_name());
89 EXPECT(binaries.size() == 1);
90
91 migraphx::gpu::kernel k1{binaries.front(), "compare"};
92
93 auto input =
94 migraphx::fill_argument({migraphx::shape::float_type, {128}}, stream_sync_test_val);
95
96 auto ginput = migraphx::gpu::to_gpu(input);
97
98 hip_stream_ptr pstream = get_stream();
99
100 k1.launch(pstream.get(), input.get_shape().elements(), 1024)(ginput.cast<float>());
101
102 auto output = migraphx::gpu::from_gpu(ginput);
103 EXPECT(output == input);
104}
105
106TEST_CASE(test_stream_sync)
107{

Callers

nothing calls this directly

Calls 15

compile_hip_srcFunction · 0.85
fill_argumentFunction · 0.85
to_gpuFunction · 0.85
from_gpuFunction · 0.85
generate_literalFunction · 0.85
make_targetFunction · 0.85
frontMethod · 0.80
launchMethod · 0.80
get_main_moduleMethod · 0.80
add_parameterMethod · 0.80
make_src_fileFunction · 0.70
get_streamFunction · 0.70

Tested by

no test coverage detected