From 2d28503b72d51c627e796f3508fdb3dfe96e3097 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Tue, 12 Nov 2024 10:20:14 -0800 Subject: [PATCH] [CI] Automatically detect AMD architecture Signed-off-by: Sarnie, Nick --- .github/workflows/sycl-linux-run-tests.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/sycl-linux-run-tests.yml b/.github/workflows/sycl-linux-run-tests.yml index bfe958448e759..d6d3463fc3926 100644 --- a/.github/workflows/sycl-linux-run-tests.yml +++ b/.github/workflows/sycl-linux-run-tests.yml @@ -284,11 +284,8 @@ jobs: echo "opts=$CMAKE_EXTRA_ARGS" >> $GITHUB_OUTPUT else if [ "${{ contains(inputs.target_devices, 'ext_oneapi_hip') }}" == "true" ]; then - if [ "${{ runner.name }}" == "cp-amd-runner" ]; then - echo 'opts=-DHIP_PLATFORM="AMD" -DAMD_ARCH="gfx1030"' >> $GITHUB_OUTPUT - else - echo 'opts=-DHIP_PLATFORM="AMD" -DAMD_ARCH="gfx1031"' >> $GITHUB_OUTPUT - fi + amd_arch="$( env ONEAPI_DEVICE_SELECTOR=hip:gpu sycl-ls --verbose 2>&1 | grep 'Architecture:' | sed 's|\s*Architecture: amd_gpu_||g' )" + echo 'opts=-DHIP_PLATFORM="AMD" -DAMD_ARCH='$amd_arch'' >> $GITHUB_OUTPUT else echo 'opts=' >> $GITHUB_OUTPUT fi