remove dependency on mygpu utility
@@ -41,7 +41,15 @@ endif
ifeq (opt,$(findstring opt,$(AOMP)))
INSTALLED_GPU = $(shell $(AOMP)/../bin/rocm_agent_enumerator | grep -m 1 -E gfx[^0]{1}.{2})
else
- INSTALLED_GPU = $(shell $(AOMP)/bin/mygpu -d gfx900)# Default AOMP_GPU is gfx900 which is vega
+ # If AOMP not pointing to rocm, then assume neither offload-arch nor mygpu utilities exist.
+ # So use lspci to search for volta and if not then use standalone rocm_agent_enumerator
+ # to autodetect which GPU is active.
+ ISVOLTA = $(shell /usr/bin/lspci -n | grep 10de:1db4)
+ ifeq (10de,$(findstring 10de,$(ISVOLTA)))
+ INSTALLED_GPU = sm_70
+ else
+ INSTALLED_GPU = $(shell $(AOMP)/bin/rocm_agent_enumerator | grep -m 1 -E gfx[^0]{1}.{2})
+ endif
endif
AOMP_GPU ?= $(INSTALLED_GPU)
