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

Commit

Permalink
[PAL] Allow overriding reported asic revision
Browse files Browse the repository at this point in the history
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
  • Loading branch information
vsytch committed Oct 13, 2020
1 parent 9b0f694 commit 5cefcaf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion device/pal/paldevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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::AsicRevision>(PAL_FORCE_ASIC_REVISION);

// XNACK flag should be set for PageMigration | IOMMUv2 Support
// Note: Navi2x should have a fix in HW
Expand Down
4 changes: 3 additions & 1 deletion utils/flags.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down

0 comments on commit 5cefcaf

Please sign in to comment.