Skip to content

Commit 2d28503

Browse files
committed
[CI] Automatically detect AMD architecture
Signed-off-by: Sarnie, Nick <[email protected]>
1 parent f9c4aaf commit 2d28503

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

.github/workflows/sycl-linux-run-tests.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -284,11 +284,8 @@ jobs:
284284
echo "opts=$CMAKE_EXTRA_ARGS" >> $GITHUB_OUTPUT
285285
else
286286
if [ "${{ contains(inputs.target_devices, 'ext_oneapi_hip') }}" == "true" ]; then
287-
if [ "${{ runner.name }}" == "cp-amd-runner" ]; then
288-
echo 'opts=-DHIP_PLATFORM="AMD" -DAMD_ARCH="gfx1030"' >> $GITHUB_OUTPUT
289-
else
290-
echo 'opts=-DHIP_PLATFORM="AMD" -DAMD_ARCH="gfx1031"' >> $GITHUB_OUTPUT
291-
fi
287+
amd_arch="$( env ONEAPI_DEVICE_SELECTOR=hip:gpu sycl-ls --verbose 2>&1 | grep 'Architecture:' | sed 's|\s*Architecture: amd_gpu_||g' )"
288+
echo 'opts=-DHIP_PLATFORM="AMD" -DAMD_ARCH='$amd_arch'' >> $GITHUB_OUTPUT
292289
else
293290
echo 'opts=' >> $GITHUB_OUTPUT
294291
fi

0 commit comments

Comments
 (0)