if AOMP points to trunk build, get rocm_agent_enumerator from /opt/rocm/bin.   This change allow smoke tests to run with AOMP pointing to the trunk on systems with rocm installed.
@@ -70,7 +70,12 @@ else
INSTALLED_GPU = $(shell $(AOMP)/bin/offload-arch -c | grep -oP gfx.+?\(?=:\))
# Default to rocm_agent_enumerator. Returns first GPU in list.
else
+ ifneq ("$(wildcard $(AOMP)/bin/rocm_agent_enumerator)","")
INSTALLED_GPU = $(shell $(AOMP)/bin/rocm_agent_enumerator | grep -m 1 -E gfx[^0]{1}.{2})
+ else
+ # in case AOMP is trunk build without rocm_agent_enumerator, try /opt/rocm/bin
+ INSTALLED_GPU = $(shell /opt/rocm/bin/rocm_agent_enumerator | grep -m 1 -E gfx[^0]{1}.{2})
+ endif
endif
endif
endif
