Skip to content

Commit

Permalink
Only include conv tests in winograd test suites. (iree-org#15626)
Browse files Browse the repository at this point in the history
It is a follow-up for
iree-org#15539 (comment)

We notice that the test suite has a preprocessing about convolution. We
should only test convolutions with the suite. Otherwise, we have
duplicated tests.
  • Loading branch information
hanhanW authored Nov 16, 2023
1 parent ef8982c commit 847cbbd
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 24 deletions.
26 changes: 15 additions & 11 deletions tests/e2e/linalg/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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\\)\\)",
],
Expand Down
24 changes: 11 additions & 13 deletions tests/e2e/linalg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,47 +37,45 @@ 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(
NAME
check_winograd_vulkan-spirv_vulkan
SRCS
"conv2d.mlir"
"i4_to_f32.mlir"
TARGET_BACKEND
"vulkan-spirv"
DRIVER
Expand Down

0 comments on commit 847cbbd

Please sign in to comment.