From fcae92ce47da11e1ef6091d051de757f00bde5e2 Mon Sep 17 00:00:00 2001 From: Vladislav Sytchenko Date: Mon, 12 Oct 2020 16:15:08 -0400 Subject: [PATCH] [PAL] Allow overriding reported asic revision This is helpfull to do when debugging issues on lowend asics. Navi14 can be emulated as Navi10. So can Navi22 be emulated as Navi21. Change-Id: I693ffd45a5b03657822afdc872781901bc69b65c [ROCm/clr commit: 26d1b28b168abe3a7bd4201e40eb60a3b5cee0ba] --- projects/clr/rocclr/device/pal/paldevice.cpp | 4 +++- projects/clr/rocclr/utils/flags.hpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/projects/clr/rocclr/device/pal/paldevice.cpp b/projects/clr/rocclr/device/pal/paldevice.cpp index 5e27d72105..a6eb57b8e4 100755 --- a/projects/clr/rocclr/device/pal/paldevice.cpp +++ b/projects/clr/rocclr/device/pal/paldevice.cpp @@ -922,7 +922,9 @@ bool Device::create(Pal::IDevice* device) { // Save the IP level for the offline detection ipLevel_ = properties().gfxLevel; - asicRevision_ = properties().revision; + asicRevision_ = flagIsDefault(PAL_FORCE_ASIC_REVISION) ? + properties().revision : + static_cast(PAL_FORCE_ASIC_REVISION); // XNACK flag should be set for PageMigration | IOMMUv2 Support // Note: Navi2x should have a fix in HW diff --git a/projects/clr/rocclr/utils/flags.hpp b/projects/clr/rocclr/utils/flags.hpp index 98c0f432f1..d8c48d31f4 100644 --- a/projects/clr/rocclr/utils/flags.hpp +++ b/projects/clr/rocclr/utils/flags.hpp @@ -243,7 +243,9 @@ release(bool, ROC_ACTIVE_WAIT, false, \ release(bool, ROC_ENABLE_LARGE_BAR, true, \ "Enable Large Bar if supported by the device") \ release(bool, HIP_FORCE_QUEUE_PROFILING, false, \ - "Force command queue profiling by default") + "Force command queue profiling by default") \ +release(uint, PAL_FORCE_ASIC_REVISION, 0, \ + "Force a specific asic revision for all devices") namespace amd {