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

Function TEST_CASE

test/gpu/jit.cpp:202–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200}
201
202TEST_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
219static auto check_target(const std::string& arch)
220{

Callers

nothing calls this directly

Calls 15

compile_hip_srcFunction · 0.85
to_gpuFunction · 0.85
from_gpuFunction · 0.85
check_targetFunction · 0.85
hip_has_flagsFunction · 0.85
generate_literalFunction · 0.85
make_targetFunction · 0.85
allocate_gpuFunction · 0.85
compile_hip_code_objectFunction · 0.85
containsFunction · 0.85
par_forFunction · 0.85
interpolate_stringFunction · 0.85

Tested by

no test coverage detected