Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Migrate matmul test suite to iree-test-suites. #18291

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 35 additions & 2 deletions .github/workflows/pkgci_test_amd_mi250.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ jobs:
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV

- name: Build tests
- name: Build in-tree tests
run: ./build_tools/pkgci/build_tests_using_package.sh ${VENV_DIR}/bin
- name: Run GPU tests
- name: Run in-tree GPU tests
env:
CTEST_PARALLEL_LEVEL: 2
IREE_CTEST_LABEL_REGEX: ^requires-gpu|^driver=hip$
Expand All @@ -67,3 +67,36 @@ jobs:
IREE_NVIDIA_SM80_TESTS_DISABLE: 1
IREE_MULTI_DEVICE_TESTS_DISABLE: 0
run: ./build_tools/cmake/ctest_all.sh ${BUILD_DIR}

- name: Checkout test suites repository
uses: actions/checkout@v4.1.7
with:
repository: ScottTodd/iree-test-suites
ref: dc027ded6175dbd753ac08d6d76ba7be36494730
path: iree-test-suites
- name: Configure out-of-tree test suite CMake project
run: |
source ${VENV_DIR}/bin/activate
cmake -G Ninja -S iree-test-suites/matmul -B build/ \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DIREE_USE_LOCAL_REPO=ON \
-DIREE_LOCAL_REPO_PATH=${GITHUB_WORKSPACE} \
-DIREE_HOST_BIN_DIR=${VENV_DIR}/bin \
-DIREE_HAL_DRIVER_LOCAL_SYNC=OFF \
-DIREE_HAL_DRIVER_LOCAL_TASK=OFF \
-DIREE_HAL_DRIVER_HIP=ON \
-DIREE_HAL_DRIVER_VULKAN=OFF \
-DIREE_HAL_DRIVER_METAL=OFF \
-DIREE_HAL_DRIVER_CUDA=OFF \
-DIREE_HIP_TEST_TARGET_CHIP=gfx90a
- name: Build out-of-tree test suite CMake project
run: cmake --build build/ --target iree-test-suites-matmul-deps
- name: CTest out-of-tree test suite CMake project
run: |
ctest \
--test-dir build/ -R iree-test-suites \
--timeout 900 \
--output-on-failure \
--no-tests=error \
--label-regex "^requires-gpu|^driver=hip$" \
--label-exclude "(^nodocker$|^driver=vulkan$|^driver=metal$|^driver=cuda$|^vulkan_uses_vk_khr_shader_float16_int8$|^requires-gpu-sm80$|^requires-gpu-rdna3$)"
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,6 @@ include(iree_lit_test)
include(iree_llvm)
include(iree_add_all_subdirs)
include(iree_check_test)
include(iree_e2e_generated_runner_test)
include(iree_native_test)
include(iree_cc_binary_benchmark)
include(iree_hal_cts_test_suite)
Expand Down
252 changes: 0 additions & 252 deletions build_tools/bazel/iree_e2e_generated_runner_test.bzl

This file was deleted.

65 changes: 0 additions & 65 deletions build_tools/bazel_to_cmake/bazel_to_cmake_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -858,71 +858,6 @@ def iree_check_test_suite(
f")\n\n"
)

def iree_generated_e2e_runner_test(
self,
name,
test_type,
generator,
generator_args=None,
test_runner=None,
target_backends_and_drivers=None,
compiler_flags=None,
runner_args=None,
tags=None,
target_cpu_features_variants=None,
**kwargs,
):
if self._should_skip_target(tags=tags, **kwargs):
return
target_backends = None
drivers = None
if target_backends_and_drivers is not None:
target_backends = [it[0] for it in target_backends_and_drivers]
drivers = [it[1] for it in target_backends_and_drivers]

name_block = self._convert_string_arg_block("NAME", name, quote=False)
test_type_block = self._convert_string_arg_block(
"TEST_TYPE", test_type, quote=False
)
# For now we assume that the generator target is a py_binary with a single
# source .py file named like it.
generator_py = f"{generator.split(':')[-1]}.py"
generator_block = self._convert_string_arg_block(
"GENERATOR", generator_py, quote=True
)
generator_args_block = self._convert_string_list_block(
"GENERATOR_ARGS", generator_args
)
test_runner_block = self._convert_target_block("TEST_RUNNER", test_runner)
target_backends_block = self._convert_string_list_block(
"TARGET_BACKENDS", target_backends
)
drivers_block = self._convert_string_list_block("DRIVERS", drivers)
compiler_flags_block = self._convert_string_list_block(
"COMPILER_FLAGS", compiler_flags
)
runner_args_block = self._convert_string_list_block("RUNNER_ARGS", runner_args)
labels_block = self._convert_string_list_block("LABELS", tags)
target_cpu_features_variants_block = self._convert_string_list_block(
"TARGET_CPU_FEATURES_VARIANTS", target_cpu_features_variants
)

self._converter.body += (
f"iree_generated_e2e_runner_test(\n"
f"{name_block}"
f"{test_type_block}"
f"{generator_block}"
f"{generator_args_block}"
f"{test_runner_block}"
f"{target_backends_block}"
f"{drivers_block}"
f"{compiler_flags_block}"
f"{runner_args_block}"
f"{labels_block}"
f"{target_cpu_features_variants_block}"
f")\n\n"
)

def native_test(self, name, src, args=None, data=None, tags=None, timeout=None):
if self._should_skip_target(tags=tags):
return
Expand Down
Loading
Loading