| 200 | } |
| 201 | |
| 202 | TEST_CASE(simple_compile_hip) |
| 203 | { |
| 204 | auto binaries = migraphx::gpu::compile_hip_src( |
| 205 | {make_src_file("main.cpp", write_2s)}, {}, migraphx::gpu::get_device_name()); |
| 206 | EXPECT(binaries.size() == 1); |
| 207 | |
| 208 | migraphx::argument input{{migraphx::shape::int8_type, {5}}}; |
| 209 | auto ginput = migraphx::gpu::to_gpu(input); |
| 210 | migraphx::gpu::kernel k{binaries.front(), "write"}; |
| 211 | k.launch(nullptr, input.get_shape().elements(), 1024)(ginput.cast<std::int8_t>()); |
| 212 | auto output = migraphx::gpu::from_gpu(ginput); |
| 213 | |
| 214 | EXPECT(output != input); |
| 215 | auto data = output.get<std::int8_t>(); |
| 216 | EXPECT(migraphx::all_of(data, [](auto x) { return x == 2; })); |
| 217 | } |
| 218 | |
| 219 | static auto check_target(const std::string& arch) |
| 220 | { |
nothing calls this directly
no test coverage detected