From 847cbbd56b654793c68bf935c277a297bc73fea5 Mon Sep 17 00:00:00 2001 From: Han-Chung Wang Date: Thu, 16 Nov 2023 15:30:23 -0800 Subject: [PATCH] Only include conv tests in winograd test suites. (#15626) It is a follow-up for https://github.com/openxla/iree/pull/15539#discussion_r1390041147 We notice that the test suite has a preprocessing about convolution. We should only test convolutions with the suite. Otherwise, we have duplicated tests. --- tests/e2e/linalg/BUILD.bazel | 26 +++++++++++++++----------- tests/e2e/linalg/CMakeLists.txt | 24 +++++++++++------------- 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/tests/e2e/linalg/BUILD.bazel b/tests/e2e/linalg/BUILD.bazel index fa856fd7d18d..72e76b37450e 100644 --- a/tests/e2e/linalg/BUILD.bazel +++ b/tests/e2e/linalg/BUILD.bazel @@ -53,16 +53,6 @@ iree_check_single_backend_test_suite( target_backend = "llvm-cpu", ) -iree_check_single_backend_test_suite( - name = "check_winograd_llvm-cpu_local-task", - srcs = LLVM_SRCS, - compiler_flags = [ - "--iree-preprocessing-pass-pipeline=builtin.module\\(func.func\\(iree-linalg-ext-convert-conv2d-to-winograd\\)\\)", - ], - driver = "local-task", - target_backend = "llvm-cpu", -) - VMVX_SRCS = enforce_glob( [ "conv2d.mlir", @@ -101,9 +91,23 @@ iree_check_single_backend_test_suite( target_backend = "vulkan-spirv", ) +WINOGRAD_CONV_SRCS = [ + "conv2d.mlir", +] + +iree_check_single_backend_test_suite( + name = "check_winograd_llvm-cpu_local-task", + srcs = WINOGRAD_CONV_SRCS, + compiler_flags = [ + "--iree-preprocessing-pass-pipeline=builtin.module\\(func.func\\(iree-linalg-ext-convert-conv2d-to-winograd\\)\\)", + ], + driver = "local-task", + target_backend = "llvm-cpu", +) + iree_check_single_backend_test_suite( name = "check_winograd_vulkan-spirv_vulkan", - srcs = VULKAN_SRCS, + srcs = WINOGRAD_CONV_SRCS, compiler_flags = [ "--iree-preprocessing-pass-pipeline=builtin.module\\(func.func\\(iree-linalg-ext-convert-conv2d-to-winograd\\)\\)", ], diff --git a/tests/e2e/linalg/CMakeLists.txt b/tests/e2e/linalg/CMakeLists.txt index 6d837541afbf..c290cfff2422 100644 --- a/tests/e2e/linalg/CMakeLists.txt +++ b/tests/e2e/linalg/CMakeLists.txt @@ -37,39 +37,38 @@ iree_check_single_backend_test_suite( iree_check_single_backend_test_suite( NAME - check_winograd_llvm-cpu_local-task + check_vmvx_local-task SRCS "conv2d.mlir" - "i4_to_f32.mlir" TARGET_BACKEND - "llvm-cpu" + "vmvx" DRIVER "local-task" - COMPILER_FLAGS - "--iree-preprocessing-pass-pipeline=builtin.module\(func.func\(iree-linalg-ext-convert-conv2d-to-winograd\)\)" ) iree_check_single_backend_test_suite( NAME - check_vmvx_local-task + check_vulkan-spirv_vulkan SRCS "conv2d.mlir" + "i4_to_f32.mlir" TARGET_BACKEND - "vmvx" + "vulkan-spirv" DRIVER - "local-task" + "vulkan" ) iree_check_single_backend_test_suite( NAME - check_vulkan-spirv_vulkan + check_winograd_llvm-cpu_local-task SRCS "conv2d.mlir" - "i4_to_f32.mlir" TARGET_BACKEND - "vulkan-spirv" + "llvm-cpu" DRIVER - "vulkan" + "local-task" + COMPILER_FLAGS + "--iree-preprocessing-pass-pipeline=builtin.module\(func.func\(iree-linalg-ext-convert-conv2d-to-winograd\)\)" ) iree_check_single_backend_test_suite( @@ -77,7 +76,6 @@ iree_check_single_backend_test_suite( check_winograd_vulkan-spirv_vulkan SRCS "conv2d.mlir" - "i4_to_f32.mlir" TARGET_BACKEND "vulkan-spirv" DRIVER