()
| 31 | |
| 32 | |
| 33 | def test_add_op(): |
| 34 | p = migraphx.program() |
| 35 | mm = p.get_main_module() |
| 36 | x = mm.add_literal(create_buffer('f', [1.0] * 9, (3, 3))) |
| 37 | y = mm.add_literal(create_buffer('f', [2.0] * 9, (3, 3))) |
| 38 | add_op = mm.add_instruction(migraphx.op("add"), [x, y]) |
| 39 | mm.add_return([add_op]) |
| 40 | p.compile(migraphx.get_target("ref")) |
| 41 | params = {} |
| 42 | output = p.run(params)[-1].tolist() |
| 43 | assert output == list([3.0] * 9) |
| 44 | |
| 45 | |
| 46 | def test_if_then_else(): |
no test coverage detected