diff --git a/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp b/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp index 9a123923da..61104b461a 100644 --- a/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp +++ b/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp @@ -71,6 +71,10 @@ static HsaDeviceId getHsaDeviceId(hsa_agent_t device, uint32_t& pci_id) { } uint gfxipVersion = atoi(&agent_name[3]); + if (gfxipVersion < 900 && GPU_VEGA10_ONLY) { + return HSA_INVALID_DEVICE_ID; + } + switch (gfxipVersion) { case 701: return HSA_HAWAII_ID; diff --git a/projects/clr/rocclr/runtime/utils/flags.hpp b/projects/clr/rocclr/runtime/utils/flags.hpp index ad6e938979..94b5215150 100644 --- a/projects/clr/rocclr/runtime/utils/flags.hpp +++ b/projects/clr/rocclr/runtime/utils/flags.hpp @@ -207,6 +207,8 @@ release(bool, OCL_CODE_CACHE_ENABLE, false, \ "1 = Enable compiler code cache") \ release(bool, OCL_CODE_CACHE_RESET, false, \ "1 = Reset the compiler code cache storage") \ +release(bool, GPU_VEGA10_ONLY, VEGA10_ONLY, \ + "1 = Report vega10 only on OCL/ROCR") \ namespace amd {