From: Tianqi Chen Date: Sun, 15 Mar 2020 04:40:50 +0000 (-0700) Subject: [TESTS] Triage the testcases to fit the the new namespaces (#5071) X-Git-Tag: upstream/0.7.0~1112 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f7488ccfd0dd187a3e427bd049d139486d565b51;p=platform%2Fupstream%2Ftvm.git [TESTS] Triage the testcases to fit the the new namespaces (#5071) * [TESTS] Triage the testcases to fit the naming convention of the new namespaces * Remove multiple usage of system lib to avoid test problems --- diff --git a/tests/python/unittest/test_graph_tuner_core.py b/tests/python/unittest/test_autotvm_graph_tuner_core.py similarity index 100% rename from tests/python/unittest/test_graph_tuner_core.py rename to tests/python/unittest/test_autotvm_graph_tuner_core.py diff --git a/tests/python/unittest/test_graph_tuner_utils.py b/tests/python/unittest/test_autotvm_graph_tuner_utils.py similarity index 100% rename from tests/python/unittest/test_graph_tuner_utils.py rename to tests/python/unittest/test_autotvm_graph_tuner_utils.py diff --git a/tests/python/unittest/test_lang_container.py b/tests/python/unittest/test_ir_container.py similarity index 100% rename from tests/python/unittest/test_lang_container.py rename to tests/python/unittest/test_ir_container.py diff --git a/tests/python/unittest/test_container.py b/tests/python/unittest/test_runtime_container.py similarity index 100% rename from tests/python/unittest/test_container.py rename to tests/python/unittest/test_runtime_container.py diff --git a/tests/python/unittest/test_codegen_arm.py b/tests/python/unittest/test_target_codegen_arm.py similarity index 100% rename from tests/python/unittest/test_codegen_arm.py rename to tests/python/unittest/test_target_codegen_arm.py diff --git a/tests/python/unittest/test_codegen_blob.py b/tests/python/unittest/test_target_codegen_blob.py similarity index 93% rename from tests/python/unittest/test_codegen_blob.py rename to tests/python/unittest/test_target_codegen_blob.py index 62043e3..719ddfe 100644 --- a/tests/python/unittest/test_codegen_blob.py +++ b/tests/python/unittest/test_target_codegen_blob.py @@ -68,7 +68,7 @@ def test_resnet18(): tvm.testing.assert_allclose(out, verify(data), atol=1e-5) -def test_system_lib(): +def test_cuda_lib(): ctx = tvm.gpu(0) for device in ["llvm", "cuda"]: if not tvm.runtime.enabled(device): @@ -85,15 +85,10 @@ def test_system_lib(): from tvm.contrib import util temp = util.tempdir() - fn_add = tvm.build(s, [A, B], target="cuda", target_host="llvm -system-lib", name="add") - path_obj = temp.relpath("add.o") + fn_add = tvm.build(s, [A, B], target="cuda", target_host="llvm", name="add") path_lib = temp.relpath("deploy_lib.so") - fn_add.save(path_obj) fn_add.export_library(path_lib) - # Load dll, will trigger system library registration - dll = ctypes.CDLL(path_lib) - # Load the system wide library - m = tvm.runtime.system_lib() + m = tvm.runtime.load_module(path_lib) a = tvm.nd.array(np.random.uniform(size=nn).astype(A.dtype), ctx) b = tvm.nd.array(np.zeros(nn, dtype=A.dtype), ctx) m['add'](a, b) diff --git a/tests/python/unittest/test_codegen_bool.py b/tests/python/unittest/test_target_codegen_bool.py similarity index 100% rename from tests/python/unittest/test_codegen_bool.py rename to tests/python/unittest/test_target_codegen_bool.py diff --git a/tests/python/unittest/test_codegen_c_host.py b/tests/python/unittest/test_target_codegen_c_host.py similarity index 100% rename from tests/python/unittest/test_codegen_c_host.py rename to tests/python/unittest/test_target_codegen_c_host.py diff --git a/tests/python/unittest/test_codegen_cross_llvm.py b/tests/python/unittest/test_target_codegen_cross_llvm.py similarity index 100% rename from tests/python/unittest/test_codegen_cross_llvm.py rename to tests/python/unittest/test_target_codegen_cross_llvm.py diff --git a/tests/python/unittest/test_codegen_cuda.py b/tests/python/unittest/test_target_codegen_cuda.py similarity index 100% rename from tests/python/unittest/test_codegen_cuda.py rename to tests/python/unittest/test_target_codegen_cuda.py diff --git a/tests/python/unittest/test_codegen_device.py b/tests/python/unittest/test_target_codegen_device.py similarity index 100% rename from tests/python/unittest/test_codegen_device.py rename to tests/python/unittest/test_target_codegen_device.py diff --git a/tests/python/unittest/test_codegen_extern.py b/tests/python/unittest/test_target_codegen_extern.py similarity index 100% rename from tests/python/unittest/test_codegen_extern.py rename to tests/python/unittest/test_target_codegen_extern.py diff --git a/tests/python/unittest/test_codegen_llvm.py b/tests/python/unittest/test_target_codegen_llvm.py similarity index 100% rename from tests/python/unittest/test_codegen_llvm.py rename to tests/python/unittest/test_target_codegen_llvm.py diff --git a/tests/python/unittest/test_codegen_opencl.py b/tests/python/unittest/test_target_codegen_opencl.py similarity index 100% rename from tests/python/unittest/test_codegen_opencl.py rename to tests/python/unittest/test_target_codegen_opencl.py diff --git a/tests/python/unittest/test_codegen_rocm.py b/tests/python/unittest/test_target_codegen_rocm.py similarity index 100% rename from tests/python/unittest/test_codegen_rocm.py rename to tests/python/unittest/test_target_codegen_rocm.py diff --git a/tests/python/unittest/test_codegen_static_init.py b/tests/python/unittest/test_target_codegen_static_init.py similarity index 100% rename from tests/python/unittest/test_codegen_static_init.py rename to tests/python/unittest/test_target_codegen_static_init.py diff --git a/tests/python/unittest/test_codegen_vm_basic.py b/tests/python/unittest/test_target_codegen_vm_basic.py similarity index 100% rename from tests/python/unittest/test_codegen_vm_basic.py rename to tests/python/unittest/test_target_codegen_vm_basic.py diff --git a/tests/python/unittest/test_codegen_vulkan.py b/tests/python/unittest/test_target_codegen_vulkan.py similarity index 100% rename from tests/python/unittest/test_codegen_vulkan.py rename to tests/python/unittest/test_target_codegen_vulkan.py diff --git a/tests/python/unittest/test_codegen_x86.py b/tests/python/unittest/test_target_codegen_x86.py similarity index 100% rename from tests/python/unittest/test_codegen_x86.py rename to tests/python/unittest/test_target_codegen_x86.py diff --git a/tests/python/unittest/test_custom_datatypes_mybfloat16.py b/tests/python/unittest/test_target_custom_datatypes.py similarity index 100% rename from tests/python/unittest/test_custom_datatypes_mybfloat16.py rename to tests/python/unittest/test_target_custom_datatypes.py diff --git a/tests/python/unittest/test_lang_target.py b/tests/python/unittest/test_target_target.py similarity index 100% rename from tests/python/unittest/test_lang_target.py rename to tests/python/unittest/test_target_target.py diff --git a/tests/python/unittest/test_build_lower.py b/tests/python/unittest/test_te_build_lower.py similarity index 100% rename from tests/python/unittest/test_build_lower.py rename to tests/python/unittest/test_te_build_lower.py diff --git a/tests/python/unittest/test_lang_group.py b/tests/python/unittest/test_te_group.py similarity index 100% rename from tests/python/unittest/test_lang_group.py rename to tests/python/unittest/test_te_group.py diff --git a/tests/python/unittest/test_lang_schedule.py b/tests/python/unittest/test_te_schedule.py similarity index 100% rename from tests/python/unittest/test_lang_schedule.py rename to tests/python/unittest/test_te_schedule.py diff --git a/tests/python/unittest/test_schedule_bound_inference.py b/tests/python/unittest/test_te_schedule_bound_inference.py similarity index 100% rename from tests/python/unittest/test_schedule_bound_inference.py rename to tests/python/unittest/test_te_schedule_bound_inference.py diff --git a/tests/python/unittest/test_schedule_graph.py b/tests/python/unittest/test_te_schedule_graph.py similarity index 100% rename from tests/python/unittest/test_schedule_graph.py rename to tests/python/unittest/test_te_schedule_graph.py diff --git a/tests/python/unittest/test_schedule_lstm.py b/tests/python/unittest/test_te_schedule_lstm.py similarity index 100% rename from tests/python/unittest/test_schedule_lstm.py rename to tests/python/unittest/test_te_schedule_lstm.py diff --git a/tests/python/unittest/test_schedule_schedule_ops.py b/tests/python/unittest/test_te_schedule_ops.py similarity index 100% rename from tests/python/unittest/test_schedule_schedule_ops.py rename to tests/python/unittest/test_te_schedule_ops.py diff --git a/tests/python/unittest/test_schedule_tensor_core.py b/tests/python/unittest/test_te_schedule_tensor_core.py similarity index 100% rename from tests/python/unittest/test_schedule_tensor_core.py rename to tests/python/unittest/test_te_schedule_tensor_core.py diff --git a/tests/python/unittest/test_schedule_tensorize.py b/tests/python/unittest/test_te_schedule_tensorize.py similarity index 100% rename from tests/python/unittest/test_schedule_tensorize.py rename to tests/python/unittest/test_te_schedule_tensorize.py diff --git a/tests/python/unittest/test_lang_tag.py b/tests/python/unittest/test_te_tag.py similarity index 100% rename from tests/python/unittest/test_lang_tag.py rename to tests/python/unittest/test_te_tag.py diff --git a/tests/python/unittest/test_lang_tensor.py b/tests/python/unittest/test_te_tensor.py similarity index 100% rename from tests/python/unittest/test_lang_tensor.py rename to tests/python/unittest/test_te_tensor.py diff --git a/tests/python/unittest/test_lang_tensor_overload_op.py b/tests/python/unittest/test_te_tensor_overload.py similarity index 100% rename from tests/python/unittest/test_lang_tensor_overload_op.py rename to tests/python/unittest/test_te_tensor_overload.py diff --git a/tests/python/unittest/test_lang_verify_compute.py b/tests/python/unittest/test_te_verify_compute.py similarity index 100% rename from tests/python/unittest/test_lang_verify_compute.py rename to tests/python/unittest/test_te_verify_compute.py diff --git a/tests/python/unittest/test_lang_buffer.py b/tests/python/unittest/test_tir_buffer.py similarity index 100% rename from tests/python/unittest/test_lang_buffer.py rename to tests/python/unittest/test_tir_buffer.py diff --git a/tests/python/unittest/test_lang_constructor.py b/tests/python/unittest/test_tir_constructor.py similarity index 100% rename from tests/python/unittest/test_lang_constructor.py rename to tests/python/unittest/test_tir_constructor.py diff --git a/tests/python/unittest/test_lang_data_layout.py b/tests/python/unittest/test_tir_data_layout.py similarity index 100% rename from tests/python/unittest/test_lang_data_layout.py rename to tests/python/unittest/test_tir_data_layout.py diff --git a/tests/python/unittest/test_tvm_intrin.py b/tests/python/unittest/test_tir_intrin.py similarity index 100% rename from tests/python/unittest/test_tvm_intrin.py rename to tests/python/unittest/test_tir_intrin.py diff --git a/tests/python/unittest/test_ir_builder.py b/tests/python/unittest/test_tir_ir_builder.py similarity index 100% rename from tests/python/unittest/test_ir_builder.py rename to tests/python/unittest/test_tir_ir_builder.py diff --git a/tests/python/unittest/test_lang_operator.py b/tests/python/unittest/test_tir_ops.py similarity index 100% rename from tests/python/unittest/test_lang_operator.py rename to tests/python/unittest/test_tir_ops.py diff --git a/tests/python/unittest/test_pass_attrs_hash_equal.py b/tests/python/unittest/test_tir_pass_attrs_hash_equal.py similarity index 100% rename from tests/python/unittest/test_pass_attrs_hash_equal.py rename to tests/python/unittest/test_tir_pass_attrs_hash_equal.py diff --git a/tests/python/unittest/test_pass_basic.py b/tests/python/unittest/test_tir_pass_basic.py similarity index 100% rename from tests/python/unittest/test_pass_basic.py rename to tests/python/unittest/test_tir_pass_basic.py diff --git a/tests/python/unittest/test_pass_bound_checkers.py b/tests/python/unittest/test_tir_pass_bound_checkers.py similarity index 100% rename from tests/python/unittest/test_pass_bound_checkers.py rename to tests/python/unittest/test_tir_pass_bound_checkers.py diff --git a/tests/python/unittest/test_pass_combine_context_call.py b/tests/python/unittest/test_tir_pass_combine_context_call.py similarity index 100% rename from tests/python/unittest/test_pass_combine_context_call.py rename to tests/python/unittest/test_tir_pass_combine_context_call.py diff --git a/tests/python/unittest/test_pass_decorate_device_scope.py b/tests/python/unittest/test_tir_pass_decorate_device_scope.py similarity index 100% rename from tests/python/unittest/test_pass_decorate_device_scope.py rename to tests/python/unittest/test_tir_pass_decorate_device_scope.py diff --git a/tests/python/unittest/test_pass_equal.py b/tests/python/unittest/test_tir_pass_equal.py similarity index 100% rename from tests/python/unittest/test_pass_equal.py rename to tests/python/unittest/test_tir_pass_equal.py diff --git a/tests/python/unittest/test_pass_hoist_if.py b/tests/python/unittest/test_tir_pass_hoist_if.py similarity index 100% rename from tests/python/unittest/test_pass_hoist_if.py rename to tests/python/unittest/test_tir_pass_hoist_if.py diff --git a/tests/python/unittest/test_pass_inject_copy_intrin.py b/tests/python/unittest/test_tir_pass_inject_copy_intrin.py similarity index 100% rename from tests/python/unittest/test_pass_inject_copy_intrin.py rename to tests/python/unittest/test_tir_pass_inject_copy_intrin.py diff --git a/tests/python/unittest/test_pass_inject_double_buffer.py b/tests/python/unittest/test_tir_pass_inject_double_buffer.py similarity index 100% rename from tests/python/unittest/test_pass_inject_double_buffer.py rename to tests/python/unittest/test_tir_pass_inject_double_buffer.py diff --git a/tests/python/unittest/test_pass_inject_vthread.py b/tests/python/unittest/test_tir_pass_inject_vthread.py similarity index 100% rename from tests/python/unittest/test_pass_inject_vthread.py rename to tests/python/unittest/test_tir_pass_inject_vthread.py diff --git a/tests/python/unittest/test_pass_inline.py b/tests/python/unittest/test_tir_pass_inline.py similarity index 100% rename from tests/python/unittest/test_pass_inline.py rename to tests/python/unittest/test_tir_pass_inline.py diff --git a/tests/python/unittest/test_pass_ir_transform.py b/tests/python/unittest/test_tir_pass_ir_transform.py similarity index 100% rename from tests/python/unittest/test_pass_ir_transform.py rename to tests/python/unittest/test_tir_pass_ir_transform.py diff --git a/tests/python/unittest/test_pass_lift_attr_scope.py b/tests/python/unittest/test_tir_pass_lift_attr_scope.py similarity index 100% rename from tests/python/unittest/test_pass_lift_attr_scope.py rename to tests/python/unittest/test_tir_pass_lift_attr_scope.py diff --git a/tests/python/unittest/test_pass_loop_partition.py b/tests/python/unittest/test_tir_pass_loop_partition.py similarity index 100% rename from tests/python/unittest/test_pass_loop_partition.py rename to tests/python/unittest/test_tir_pass_loop_partition.py diff --git a/tests/python/unittest/test_pass_lower_intrin.py b/tests/python/unittest/test_tir_pass_lower_intrin.py similarity index 100% rename from tests/python/unittest/test_pass_lower_intrin.py rename to tests/python/unittest/test_tir_pass_lower_intrin.py diff --git a/tests/python/unittest/test_pass_lower_warp_memory.py b/tests/python/unittest/test_tir_pass_lower_warp_memory.py similarity index 100% rename from tests/python/unittest/test_pass_lower_warp_memory.py rename to tests/python/unittest/test_tir_pass_lower_warp_memory.py diff --git a/tests/python/unittest/test_pass_makeapi.py b/tests/python/unittest/test_tir_pass_makeapi.py similarity index 100% rename from tests/python/unittest/test_pass_makeapi.py rename to tests/python/unittest/test_tir_pass_makeapi.py diff --git a/tests/python/unittest/test_pass_remove_no_op.py b/tests/python/unittest/test_tir_pass_remove_no_op.py similarity index 100% rename from tests/python/unittest/test_pass_remove_no_op.py rename to tests/python/unittest/test_tir_pass_remove_no_op.py diff --git a/tests/python/unittest/test_pass_rewrite_for_tensor_core.py b/tests/python/unittest/test_tir_pass_rewrite_for_tensor_core.py similarity index 100% rename from tests/python/unittest/test_pass_rewrite_for_tensor_core.py rename to tests/python/unittest/test_tir_pass_rewrite_for_tensor_core.py diff --git a/tests/python/unittest/test_pass_rewrite_unsafe_select.py b/tests/python/unittest/test_tir_pass_rewrite_unsafe_select.py similarity index 100% rename from tests/python/unittest/test_pass_rewrite_unsafe_select.py rename to tests/python/unittest/test_tir_pass_rewrite_unsafe_select.py diff --git a/tests/python/unittest/test_pass_split_host_device.py b/tests/python/unittest/test_tir_pass_split_host_device.py similarity index 100% rename from tests/python/unittest/test_pass_split_host_device.py rename to tests/python/unittest/test_tir_pass_split_host_device.py diff --git a/tests/python/unittest/test_pass_storage_flatten.py b/tests/python/unittest/test_tir_pass_storage_flatten.py similarity index 100% rename from tests/python/unittest/test_pass_storage_flatten.py rename to tests/python/unittest/test_tir_pass_storage_flatten.py diff --git a/tests/python/unittest/test_pass_storage_rewrite.py b/tests/python/unittest/test_tir_pass_storage_rewrite.py similarity index 100% rename from tests/python/unittest/test_pass_storage_rewrite.py rename to tests/python/unittest/test_tir_pass_storage_rewrite.py diff --git a/tests/python/unittest/test_pass_storage_sync.py b/tests/python/unittest/test_tir_pass_storage_sync.py similarity index 100% rename from tests/python/unittest/test_pass_storage_sync.py rename to tests/python/unittest/test_tir_pass_storage_sync.py diff --git a/tests/python/unittest/test_pass_unroll.py b/tests/python/unittest/test_tir_pass_unroll.py similarity index 100% rename from tests/python/unittest/test_pass_unroll.py rename to tests/python/unittest/test_tir_pass_unroll.py diff --git a/tests/python/unittest/test_pass_vectorize.py b/tests/python/unittest/test_tir_pass_vectorize.py similarity index 100% rename from tests/python/unittest/test_pass_vectorize.py rename to tests/python/unittest/test_tir_pass_vectorize.py diff --git a/tests/python/unittest/test_pass_verify_gpu_code.py b/tests/python/unittest/test_tir_pass_verify_gpu_code.py similarity index 100% rename from tests/python/unittest/test_pass_verify_gpu_code.py rename to tests/python/unittest/test_tir_pass_verify_gpu_code.py diff --git a/tests/python/unittest/test_pass_verify_memory.py b/tests/python/unittest/test_tir_pass_verify_memory.py similarity index 100% rename from tests/python/unittest/test_pass_verify_memory.py rename to tests/python/unittest/test_tir_pass_verify_memory.py diff --git a/tests/python/unittest/test_pass_virtual_thread.py b/tests/python/unittest/test_tir_pass_virtual_thread.py similarity index 100% rename from tests/python/unittest/test_pass_virtual_thread.py rename to tests/python/unittest/test_tir_pass_virtual_thread.py