From f4c4323f8efa8fb40926f3caafbcdc87636cb42a Mon Sep 17 00:00:00 2001 From: Jason Tang Date: Thu, 12 Nov 2020 10:35:26 -0500 Subject: [PATCH] SWDEV-260376 - [PAL] Fix Windows build Change-Id: I788198b5980a46981de4b2e7aaa6a495e6e98cad [ROCm/clr commit: 2ee2392f63953c988c3a6c5ea04598185a5a01bc] --- projects/clr/rocclr/device/pal/paldefs.hpp | 2 +- projects/clr/rocclr/device/pal/paldevice.cpp | 4 ++-- projects/clr/rocclr/device/pal/paldevice.hpp | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/projects/clr/rocclr/device/pal/paldefs.hpp b/projects/clr/rocclr/device/pal/paldefs.hpp index 1511a3e9a3..9dcc92c61f 100644 --- a/projects/clr/rocclr/device/pal/paldefs.hpp +++ b/projects/clr/rocclr/device/pal/paldefs.hpp @@ -141,7 +141,7 @@ struct AMDDeviceInfo { uint gfxipVersionLC_; //!< The core engine GFXIP version for LC uint gfxipVersion_; //!< The core engine GFXIP version bool xnackEnabled_; //!< Enable XNACK feature - Pal::AsicRevision asicRevision_; //!< PAL GpuId + Pal::AsicRevision asicRevision_; //!< PAL AsicRevision }; static constexpr AMDDeviceInfo UnknownDevice = {"", "", 16, 256, 32, 0, 0, false}; diff --git a/projects/clr/rocclr/device/pal/paldevice.cpp b/projects/clr/rocclr/device/pal/paldevice.cpp index 7e6319e940..b688a60856 100644 --- a/projects/clr/rocclr/device/pal/paldevice.cpp +++ b/projects/clr/rocclr/device/pal/paldevice.cpp @@ -295,7 +295,7 @@ bool NullDevice::init() { bool NullDevice::create(Pal::AsicRevision asicRevision, Pal::GfxIpLevel ipLevel, - uint xNACKSupported) { + bool xNACKSupported) { if (amd::IS_HIP && IS_MAINLINE && (asicRevision != Pal::AsicRevision::Vega20)) { return false; @@ -931,7 +931,7 @@ bool Device::create(Pal::IDevice* device) { // XNACK flag should be set for PageMigration | IOMMUv2 Support // Note: Navi2x should have a fix in HW - uint isXNACKSupported = (ipLevel_ <= Pal::GfxIpLevel::GfxIp10_1) && + bool isXNACKSupported = (ipLevel_ <= Pal::GfxIpLevel::GfxIp10_1) && (static_cast(properties_.gpuMemoryProperties.flags.pageMigrationEnabled || properties_.gpuMemoryProperties.flags.iommuv2Support)); diff --git a/projects/clr/rocclr/device/pal/paldevice.hpp b/projects/clr/rocclr/device/pal/paldevice.hpp index 127c6de6f9..a602467b94 100644 --- a/projects/clr/rocclr/device/pal/paldevice.hpp +++ b/projects/clr/rocclr/device/pal/paldevice.hpp @@ -66,7 +66,7 @@ class NullDevice : public amd::Device { //! Creates an offline device with the specified target bool create(Pal::AsicRevision asicRevision, //!< GPU ASIC revision Pal::GfxIpLevel ipLevel, //!< GPU ip level - uint xNACKSupported = 0 //!< GPU xNACKSupported + bool xNACKSupported = false //!< GPU xNACKSupported ); //! Instantiate a new virtual device @@ -431,9 +431,9 @@ class Device : public NullDevice { } //! Returns the number of available compute rings - uint numExclusiveComputeEngines() const { + uint numExclusiveComputeEngines() const { return exclusiveComputeEnginesId_.size() + - ((exclusiveComputeEnginesId().find(ExclusiveQueueType::RealTime1) == + ((exclusiveComputeEnginesId().find(ExclusiveQueueType::RealTime1) == exclusiveComputeEnginesId().end()) ? 1 : 0); } //! Returns the map of available exclusive compute rings with the engine index