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

E2e gpu convolution test #18125

Draft
wants to merge 3 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
173 changes: 173 additions & 0 deletions tests/e2e/convolution/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -323,3 +323,176 @@ iree_generated_e2e_runner_test(
)

### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE ###

# To distinguish between CDNA(gfx9) and RDNA3(gfx11)
if(IREE_HIP_TEST_TARGET_CHIP MATCHES "^gfx9")

unset(IREE_HIP_TEST_COMPILER_FLAGS)
list(APPEND IREE_HIP_TEST_COMPILER_FLAGS
"--iree-rocm-target-chip=${IREE_HIP_TEST_TARGET_CHIP}"
)
Comment on lines 325 to +333
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI I made it possible for some of this logic to be handled in the BUILD.bazel file in #17843. I didn't look specifically at folders like tests/e2e/matmul though. Generally speaking, while still using Bazel and CMake for tests, we should avoid using the BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE escape hatch if possible.


iree_generated_e2e_runner_test(
NAME
e2e_conv2d_rocm_f16_f16_f32_large_cdna3
TEST_TYPE
conv2d
GENERATOR
"generate_e2e_conv2d_tests.py"
GENERATOR_ARGS
"--input_type=f16"
"--input_layout=nhwc"
"--kernel_type=f16"
"--kernel_layout=hwcf"
"--acc_type=f32"
"--shapes=gpu_large"
"--compilation_info=LLVMGPUVectorDistributeMFMA"
TEST_RUNNER
iree_tools_testing_e2e_iree-e2e-conv2d-test
TARGET_BACKENDS
"rocm"
DRIVERS
"hip"
COMPILER_FLAGS
${IREE_HIP_TEST_COMPILER_FLAGS}
LABELS
"noasan"
"nomsan"
"notsan"
"noubsan"
"requires-gpu-cdna3"
)

iree_generated_e2e_runner_test(
NAME
e2e_conv2d_rocm_f16_f16_f32_large_gpu_vectorize_cdna3
TEST_TYPE
conv2d
GENERATOR
"generate_e2e_conv2d_tests.py"
GENERATOR_ARGS
"--input_type=f16"
"--input_layout=nhwc"
"--kernel_type=f16"
"--kernel_layout=hwcf"
"--acc_type=f32"
"--shapes=gpu_large"
"--compilation_info=LLVMGPUVectorizeCDNA"
TEST_RUNNER
iree_tools_testing_e2e_iree-e2e-conv2d-test
TARGET_BACKENDS
"rocm"
DRIVERS
"hip"
COMPILER_FLAGS
${IREE_HIP_TEST_COMPILER_FLAGS}
LABELS
"noasan"
"nomsan"
"notsan"
"noubsan"
"requires-gpu-cdna3"
)

iree_generated_e2e_runner_test(
NAME
e2e_conv2d_rocm_nchw_f16_f16_f32_large_gpu_vectorize_cdna3
TEST_TYPE
conv2d
GENERATOR
"generate_e2e_conv2d_tests.py"
GENERATOR_ARGS
"--input_type=f16"
"--input_layout=nchw"
"--kernel_type=f16"
"--kernel_layout=fchw"
"--acc_type=f32"
"--shapes=gpu_large"
"--compilation_info=LLVMGPUVectorizeCDNA"
TEST_RUNNER
iree_tools_testing_e2e_iree-e2e-conv2d-test
TARGET_BACKENDS
"rocm"
DRIVERS
"hip"
COMPILER_FLAGS
${IREE_HIP_TEST_COMPILER_FLAGS}
LABELS
"noasan"
"nomsan"
"notsan"
"noubsan"
"requires-gpu-cdna3"
)


iree_generated_e2e_runner_test(
NAME
e2e_conv2d_rocm_i8_large_cdna3
TEST_TYPE
conv2d
GENERATOR
"generate_e2e_conv2d_tests.py"
GENERATOR_ARGS
"--input_type=i8"
"--input_layout=nhwc"
"--kernel_type=i8"
"--kernel_layout=hwcf"
"--acc_type=i32"
"--shapes=gpu_large"
"--compilation_info=LLVMGPUVectorDistributeMFMA"
TEST_RUNNER
iree_tools_testing_e2e_iree-e2e-conv2d-test
TARGET_BACKENDS
"rocm"
DRIVERS
"hip"
COMPILER_FLAGS
${IREE_HIP_TEST_COMPILER_FLAGS}
LABELS
"noasan"
"nomsan"
"notsan"
"noubsan"
"requires-gpu-cdna3"
)

elseif(IREE_HIP_TEST_TARGET_CHIP MATCHES "^gfx11")

unset(IREE_HIP_TEST_COMPILER_FLAGS)
list(APPEND IREE_HIP_TEST_COMPILER_FLAGS
"--iree-rocm-target-chip=${IREE_HIP_TEST_TARGET_CHIP}"
)

iree_generated_e2e_runner_test(
NAME
e2e_conv2d_rocm_f16_f16_f32_large_cdna3
TEST_TYPE
conv2d
GENERATOR
"generate_e2e_conv2d_tests.py"
GENERATOR_ARGS
"--input_type=f16"
"--input_layout=nhwc"
"--kernel_type=f16"
"--kernel_layout=hwcf"
"--acc_type=f32"
"--shapes=gpu_large"
"--compilation_info=LLVMGPUVectorDistributeWMMA"
TEST_RUNNER
iree_tools_testing_e2e_iree-e2e-conv2d-test
TARGET_BACKENDS
"rocm"
DRIVERS
"hip"
COMPILER_FLAGS
${IREE_HIP_TEST_COMPILER_FLAGS}
LABELS
"noasan"
"nomsan"
"notsan"
"noubsan"
"requires-gpu-rdna3"
)

endif()
Loading
Loading