From 011ebc94325c690bce03b6a0c2543c18e2d2d17d Mon Sep 17 00:00:00 2001 From: Chris Sidebottom Date: Tue, 13 Jul 2021 18:18:48 +0100 Subject: [PATCH] Use testing new testing infra from external codegen After introducing the new testing infrastructure into the external codegen I didn't copy it into the target hooks which meant it started failing. --- tests/python/relay/test_additional_target_hooks.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/python/relay/test_additional_target_hooks.py b/tests/python/relay/test_additional_target_hooks.py index 8ec8658c8b2a1..256a25fce3295 100644 --- a/tests/python/relay/test_additional_target_hooks.py +++ b/tests/python/relay/test_additional_target_hooks.py @@ -24,10 +24,15 @@ import tvm.relay.transform from tvm import relay -from test_external_codegen import set_external_func_attr, check_result +from test_external_codegen import ( + set_external_func_attr, + check_vm_result, + check_aot_executor_result, + check_graph_executor_result, +) -def translate_relay_add_to_tir_subtract(relay_func): +def translate_relay_add_to_tir_subtract(): """A transform to test Relay -> TIR with""" ib = tvm.tir.ir_builder.create() A = tvm.tir.decl_buffer( @@ -58,7 +63,10 @@ def translate_relay_add_to_tir_subtract(relay_func): return ir -def test_tir_external_generation(): +@pytest.mark.parametrize( + "check_result", [check_vm_result, check_graph_executor_result, check_aot_executor_result] +) +def test_tir_external_generation(check_result): @tvm.register_func("target.test.tir_lowering") def relay_to_tir(expr, target): return translate_relay_add_to_tir_subtract(expr)