fix: obtain hw ip version from kmd in wsl mode

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2023-06-07 14:38:53 +02:00
committed by Compute-Runtime-Automation
parent 5fe9d70066
commit 0c7a36bc8f
8 changed files with 61 additions and 18 deletions

View File

@@ -64,7 +64,7 @@ Wddm::Wddm(std::unique_ptr<HwDeviceIdWddm> &&hwDeviceIdIn, RootDeviceEnvironment
featureTable.reset(new FeatureTable());
workaroundTable.reset(new WorkaroundTable());
gtSystemInfo.reset(new GT_SYSTEM_INFO);
gfxPlatform.reset(new PLATFORM);
gfxPlatform.reset(new PLATFORM_KMD);
memset(gtSystemInfo.get(), 0, sizeof(*gtSystemInfo));
memset(gfxPlatform.get(), 0, sizeof(*gfxPlatform));
this->enablePreemptionRegValue = NEO::readEnablePreemptionRegKey();
@@ -262,7 +262,7 @@ bool Wddm::queryAdapterInfo() {
// translate
if (status == STATUS_SUCCESS) {
memcpy_s(gtSystemInfo.get(), sizeof(GT_SYSTEM_INFO), &adapterInfo.SystemInfo, sizeof(GT_SYSTEM_INFO));
memcpy_s(gfxPlatform.get(), sizeof(PLATFORM), &adapterInfo.GfxPlatform, sizeof(PLATFORM));
memcpy_s(gfxPlatform.get(), sizeof(PLATFORM_KMD), &adapterInfo.GfxPlatform, sizeof(PLATFORM_KMD));
SkuInfoReceiver::receiveFtrTableFromAdapterInfo(featureTable.get(), &adapterInfo);
SkuInfoReceiver::receiveWaTableFromAdapterInfo(workaroundTable.get(), &adapterInfo);
@@ -1236,4 +1236,12 @@ PhysicalDevicePciSpeedInfo Wddm::getPciSpeedInfo() const {
return speedInfo;
}
void Wddm::populateIpVersion(HardwareInfo &hwInfo) {
hwInfo.ipVersion.value = gfxPlatform->sRenderBlockID.Value;
if (hwInfo.ipVersion.value == 0) {
auto &compilerProductHelper = rootDeviceEnvironment.getHelper<CompilerProductHelper>();
hwInfo.ipVersion.value = compilerProductHelper.getHwIpVersion(hwInfo);
}
}
} // namespace NEO

View File

@@ -240,7 +240,7 @@ class Wddm : public DriverModel {
uint64_t dedicatedVideoMemory = 0;
// Adapter information
std::unique_ptr<PLATFORM> gfxPlatform;
std::unique_ptr<PLATFORM_KMD> gfxPlatform;
std::unique_ptr<GT_SYSTEM_INFO> gtSystemInfo;
std::unique_ptr<FeatureTable> featureTable;
std::unique_ptr<WorkaroundTable> workaroundTable;

View File

@@ -5,17 +5,10 @@
*
*/
#include "shared/source/execution_environment/root_device_environment.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/hw_info.h"
#include "shared/source/os_interface/windows/wddm/wddm.h"
namespace NEO {
void Wddm::populateAdditionalAdapterInfoOptions(const ADAPTER_INFO_KMD &adapterInfo) {
}
void Wddm::populateIpVersion(HardwareInfo &hwInfo) {
auto &compilerProductHelper = rootDeviceEnvironment.getHelper<CompilerProductHelper>();
hwInfo.ipVersion.value = compilerProductHelper.getHwIpVersion(hwInfo);
}
} // namespace NEO