| 83 | } |
| 84 | |
| 85 | TEST_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 | |
| 106 | TEST_CASE(test_stream_sync) |
| 107 | { |
nothing calls this directly
no test coverage detected