Skip to content

Commit

Permalink
Add HIP Backend test support for attention FP16 (#18333)
Browse files Browse the repository at this point in the history
Add HIP Backend test support for attention FP16.
It is based on this test suite:
#18320

---------

Signed-off-by: erman-gurses <[email protected]>
  • Loading branch information
erman-gurses committed Aug 27, 2024
1 parent 1b12b5e commit 7e8691d
Showing 1 changed file with 93 additions and 0 deletions.
93 changes: 93 additions & 0 deletions tests/e2e/attention/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,96 @@ iree_generated_e2e_runner_test(
TARGET_CPU_FEATURES_VARIANTS
"default"
)

# 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-hip-target=${IREE_HIP_TEST_TARGET_CHIP}"
)

iree_generated_e2e_runner_test(
NAME
e2e_attention_gpu_cdna3_f16_f16_f16_small
TEST_TYPE
attention
GENERATOR
"generate_e2e_attention_tests.py"
GENERATOR_ARGS
"--query_type=f16"
"--key_type=f16"
"--value_type=f16"
"--shapes=small"
TEST_RUNNER
iree_tools_testing_e2e_iree-e2e-attention-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_attention_gpu_cdna3_f16_f16_f16_medium
TEST_TYPE
attention
GENERATOR
"generate_e2e_attention_tests.py"
GENERATOR_ARGS
"--query_type=f16"
"--key_type=f16"
"--value_type=f16"
"--shapes=medium"
TEST_RUNNER
iree_tools_testing_e2e_iree-e2e-attention-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_attention_gpu_cdna3_f16_f16_f16_large
TEST_TYPE
attention
GENERATOR
"generate_e2e_attention_tests.py"
GENERATOR_ARGS
"--query_type=f16"
"--key_type=f16"
"--value_type=f16"
"--shapes=large"
TEST_RUNNER
iree_tools_testing_e2e_iree-e2e-attention-test
TARGET_BACKENDS
"rocm"
DRIVERS
"hip"
COMPILER_FLAGS
${IREE_HIP_TEST_COMPILER_FLAGS}
LABELS
"noasan"
"nomsan"
"notsan"
"noubsan"
"requires-gpu-cdna3"
)
endif()

0 comments on commit 7e8691d

Please sign in to comment.