From 7489641521d7f4abad22acccae1b32bea5781d80 Mon Sep 17 00:00:00 2001 From: Saiyedul Islam Date: Mon, 3 Aug 2026 13:16:36 -0500 Subject: [PATCH] [test] Add gfx1250/gfx1251 support and strip xnack target features gfx1250 and gfx1251 always operate with xnack enabled and the compiler rejects explicit :xnack+/:xnack- target features. Add these GPUs to the supported list and remove any requested xnack feature from AOMP_TARGET_FEATURES in both Makefile.defs and Makefile.rules so tests that hard-code features still build and run. --- test/Makefile.defs | 16 +++++++++++++++- test/smoke/Makefile.rules | 13 +++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/test/Makefile.defs b/test/Makefile.defs index 438685ac48..48fbeb5d90 100644 --- a/test/Makefile.defs +++ b/test/Makefile.defs @@ -37,7 +37,9 @@ else gfx1010, gfx1010:xnack+\ gfx1011, gfx1011:xnack+\ gfx1012, gfx1012:xnack+\ - gfx1013, gfx1013:xnack+ + gfx1013, gfx1013:xnack+\ + gfx1250,\ + gfx1251 endif @@ -276,6 +278,18 @@ ifeq ($(AOMP_SANITIZER),1) ASAN_UNSUPPORTED = ASAN_COMPILE ASAN_RUNTIME endif +# gfx1250 and gfx1251 always operate with xnack enabled and the compiler +# rejects an explicit xnack target feature (e.g. :xnack+) on these +# architectures. Drop any requested xnack feature so tests that hard-code +# AOMP_TARGET_FEATURES still build and run. All other architectures keep the +# existing behavior. +ifneq (,$(findstring gfx1250,$(AOMP_GPU))) + AOMP_TARGET_FEATURES := $(subst :xnack-,,$(subst :xnack+,,$(AOMP_TARGET_FEATURES))) +endif +ifneq (,$(findstring gfx1251,$(AOMP_GPU))) + AOMP_TARGET_FEATURES := $(subst :xnack-,,$(subst :xnack+,,$(AOMP_TARGET_FEATURES))) +endif + ifeq ($(AOMP_TARGET_FEATURES),) GPU_W_FEATURES = $(AOMP_GPU) else diff --git a/test/smoke/Makefile.rules b/test/smoke/Makefile.rules index c4ed7625de..8210d0eb99 100644 --- a/test/smoke/Makefile.rules +++ b/test/smoke/Makefile.rules @@ -28,6 +28,19 @@ prerequisites: @echo ">>> $(SCRIPT_INIT) >>>" endif +# gfx1250 and gfx1251 always operate with xnack enabled and the compiler +# rejects an explicit xnack target feature (e.g. :xnack+) on these +# architectures. Individual tests set AOMP_TARGET_FEATURES after including +# Makefile.defs, so strip any requested xnack feature here (Makefile.rules is +# included last) to keep it off the compile line and out of the SUPPORTED +# matching. All other architectures keep the existing behavior. +ifneq (,$(findstring gfx1250,$(AOMP_GPU))) + AOMP_TARGET_FEATURES := $(subst :xnack-,,$(subst :xnack+,,$(AOMP_TARGET_FEATURES))) +endif +ifneq (,$(findstring gfx1251,$(AOMP_GPU))) + AOMP_TARGET_FEATURES := $(subst :xnack-,,$(subst :xnack+,,$(AOMP_TARGET_FEATURES))) +endif + # ----- If SUPPORTED is empty then it means that there is no # restriction for the test and the test can be compiled and run # on the current GPU architecture.