Skip to content
This repository was archived by the owner on Jan 26, 2024. It is now read-only.

Commit 5cefcaf

Browse files
committed
[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
1 parent 9b0f694 commit 5cefcaf

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

device/pal/paldevice.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,9 @@ bool Device::create(Pal::IDevice* device) {
922922

923923
// Save the IP level for the offline detection
924924
ipLevel_ = properties().gfxLevel;
925-
asicRevision_ = properties().revision;
925+
asicRevision_ = flagIsDefault(PAL_FORCE_ASIC_REVISION) ?
926+
properties().revision :
927+
static_cast<Pal::AsicRevision>(PAL_FORCE_ASIC_REVISION);
926928

927929
// XNACK flag should be set for PageMigration | IOMMUv2 Support
928930
// Note: Navi2x should have a fix in HW

utils/flags.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,9 @@ release(bool, ROC_ACTIVE_WAIT, false, \
243243
release(bool, ROC_ENABLE_LARGE_BAR, true, \
244244
"Enable Large Bar if supported by the device") \
245245
release(bool, HIP_FORCE_QUEUE_PROFILING, false, \
246-
"Force command queue profiling by default")
246+
"Force command queue profiling by default") \
247+
release(uint, PAL_FORCE_ASIC_REVISION, 0, \
248+
"Force a specific asic revision for all devices")
247249

248250
namespace amd {
249251

0 commit comments

Comments
 (0)