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

Function TEST_CASE

test/instruction.cpp:30–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28#include "test.hpp"
29
30TEST_CASE(check_undefined)
31{
32 migraphx::module m;
33 auto und = m.add_instruction(migraphx::make_op("undefined"));
34 auto cov = m.add_instruction(
35 migraphx::make_op("convert", {{"target_type", migraphx::shape::half_type}}), und);
36 auto abs = m.add_instruction(migraphx::make_op("abs"), cov);
37
38 migraphx::shape xs{migraphx::shape::float_type, {2, 3}};
39 std::vector<float> datax = {1, 2, 3, 4, 5, 6};
40
41 auto lit = m.add_literal(migraphx::literal(xs, datax));
42 auto mul = m.add_instruction(migraphx::make_op("mul"), lit, lit);
43
44 EXPECT(und->is_undefined());
45 EXPECT(cov->is_undefined());
46 EXPECT(abs->is_undefined());
47 EXPECT(not lit->is_undefined());
48 EXPECT(not mul->is_undefined());
49}
50
51TEST_CASE(check_replace_shape)
52{

Callers

nothing calls this directly

Calls 14

reachesFunction · 0.85
is_interdependentFunction · 0.85
is_undefinedMethod · 0.80
add_parameterMethod · 0.80
make_opFunction · 0.50
literalClass · 0.50
add_instructionMethod · 0.45
add_literalMethod · 0.45
replaceMethod · 0.45
get_shapeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected