mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 12:23:05 +08:00
Move HardwareInfo ownership to ExecutionEnvironment [1/n]
Change-Id: I5e5b4cc45947a8841282c7d431fb69d9c397a2d4 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
b2aee82f41
commit
bb80d327c7
@@ -237,7 +237,7 @@ int OfflineCompiler::getHardwareInfo(const char *pDeviceName) {
|
||||
if (hardwareInfoTable[productId]) {
|
||||
hwInfo = hardwareInfoTable[productId];
|
||||
familyNameWithType.clear();
|
||||
familyNameWithType.append(familyName[hwInfo->pPlatform->eRenderCoreFamily]);
|
||||
familyNameWithType.append(familyName[hwInfo->pPlatform.eRenderCoreFamily]);
|
||||
familyNameWithType.append(getPlatformType(*hwInfo));
|
||||
retVal = CL_SUCCESS;
|
||||
break;
|
||||
@@ -394,39 +394,39 @@ int OfflineCompiler::initialize(size_t numArgs, const char *const *argv) {
|
||||
if ((igcPlatform == nullptr) || (igcGtSystemInfo == nullptr) || (igcFeWa == nullptr)) {
|
||||
return CL_OUT_OF_HOST_MEMORY;
|
||||
}
|
||||
IGC::PlatformHelper::PopulateInterfaceWith(*igcPlatform.get(), *hwInfo->pPlatform);
|
||||
IGC::GtSysInfoHelper::PopulateInterfaceWith(*igcGtSystemInfo.get(), *hwInfo->pSysInfo);
|
||||
IGC::PlatformHelper::PopulateInterfaceWith(*igcPlatform.get(), hwInfo->pPlatform);
|
||||
IGC::GtSysInfoHelper::PopulateInterfaceWith(*igcGtSystemInfo.get(), hwInfo->pSysInfo);
|
||||
// populate with features
|
||||
igcFeWa.get()->SetFtrDesktop(hwInfo->pSkuTable->ftrDesktop);
|
||||
igcFeWa.get()->SetFtrChannelSwizzlingXOREnabled(hwInfo->pSkuTable->ftrChannelSwizzlingXOREnabled);
|
||||
igcFeWa.get()->SetFtrDesktop(hwInfo->pSkuTable.ftrDesktop);
|
||||
igcFeWa.get()->SetFtrChannelSwizzlingXOREnabled(hwInfo->pSkuTable.ftrChannelSwizzlingXOREnabled);
|
||||
|
||||
igcFeWa.get()->SetFtrGtBigDie(hwInfo->pSkuTable->ftrGtBigDie);
|
||||
igcFeWa.get()->SetFtrGtMediumDie(hwInfo->pSkuTable->ftrGtMediumDie);
|
||||
igcFeWa.get()->SetFtrGtSmallDie(hwInfo->pSkuTable->ftrGtSmallDie);
|
||||
igcFeWa.get()->SetFtrGtBigDie(hwInfo->pSkuTable.ftrGtBigDie);
|
||||
igcFeWa.get()->SetFtrGtMediumDie(hwInfo->pSkuTable.ftrGtMediumDie);
|
||||
igcFeWa.get()->SetFtrGtSmallDie(hwInfo->pSkuTable.ftrGtSmallDie);
|
||||
|
||||
igcFeWa.get()->SetFtrGT1(hwInfo->pSkuTable->ftrGT1);
|
||||
igcFeWa.get()->SetFtrGT1_5(hwInfo->pSkuTable->ftrGT1_5);
|
||||
igcFeWa.get()->SetFtrGT2(hwInfo->pSkuTable->ftrGT2);
|
||||
igcFeWa.get()->SetFtrGT3(hwInfo->pSkuTable->ftrGT3);
|
||||
igcFeWa.get()->SetFtrGT4(hwInfo->pSkuTable->ftrGT4);
|
||||
igcFeWa.get()->SetFtrGT1(hwInfo->pSkuTable.ftrGT1);
|
||||
igcFeWa.get()->SetFtrGT1_5(hwInfo->pSkuTable.ftrGT1_5);
|
||||
igcFeWa.get()->SetFtrGT2(hwInfo->pSkuTable.ftrGT2);
|
||||
igcFeWa.get()->SetFtrGT3(hwInfo->pSkuTable.ftrGT3);
|
||||
igcFeWa.get()->SetFtrGT4(hwInfo->pSkuTable.ftrGT4);
|
||||
|
||||
igcFeWa.get()->SetFtrIVBM0M1Platform(hwInfo->pSkuTable->ftrIVBM0M1Platform);
|
||||
igcFeWa.get()->SetFtrGTL(hwInfo->pSkuTable->ftrGT1);
|
||||
igcFeWa.get()->SetFtrGTM(hwInfo->pSkuTable->ftrGT2);
|
||||
igcFeWa.get()->SetFtrGTH(hwInfo->pSkuTable->ftrGT3);
|
||||
igcFeWa.get()->SetFtrIVBM0M1Platform(hwInfo->pSkuTable.ftrIVBM0M1Platform);
|
||||
igcFeWa.get()->SetFtrGTL(hwInfo->pSkuTable.ftrGT1);
|
||||
igcFeWa.get()->SetFtrGTM(hwInfo->pSkuTable.ftrGT2);
|
||||
igcFeWa.get()->SetFtrGTH(hwInfo->pSkuTable.ftrGT3);
|
||||
|
||||
igcFeWa.get()->SetFtrSGTPVSKUStrapPresent(hwInfo->pSkuTable->ftrSGTPVSKUStrapPresent);
|
||||
igcFeWa.get()->SetFtrGTA(hwInfo->pSkuTable->ftrGTA);
|
||||
igcFeWa.get()->SetFtrGTC(hwInfo->pSkuTable->ftrGTC);
|
||||
igcFeWa.get()->SetFtrGTX(hwInfo->pSkuTable->ftrGTX);
|
||||
igcFeWa.get()->SetFtr5Slice(hwInfo->pSkuTable->ftr5Slice);
|
||||
igcFeWa.get()->SetFtrSGTPVSKUStrapPresent(hwInfo->pSkuTable.ftrSGTPVSKUStrapPresent);
|
||||
igcFeWa.get()->SetFtrGTA(hwInfo->pSkuTable.ftrGTA);
|
||||
igcFeWa.get()->SetFtrGTC(hwInfo->pSkuTable.ftrGTC);
|
||||
igcFeWa.get()->SetFtrGTX(hwInfo->pSkuTable.ftrGTX);
|
||||
igcFeWa.get()->SetFtr5Slice(hwInfo->pSkuTable.ftr5Slice);
|
||||
|
||||
igcFeWa.get()->SetFtrGpGpuMidThreadLevelPreempt(hwInfo->pSkuTable->ftrGpGpuMidThreadLevelPreempt);
|
||||
igcFeWa.get()->SetFtrIoMmuPageFaulting(hwInfo->pSkuTable->ftrIoMmuPageFaulting);
|
||||
igcFeWa.get()->SetFtrWddm2Svm(hwInfo->pSkuTable->ftrWddm2Svm);
|
||||
igcFeWa.get()->SetFtrPooledEuEnabled(hwInfo->pSkuTable->ftrPooledEuEnabled);
|
||||
igcFeWa.get()->SetFtrGpGpuMidThreadLevelPreempt(hwInfo->pSkuTable.ftrGpGpuMidThreadLevelPreempt);
|
||||
igcFeWa.get()->SetFtrIoMmuPageFaulting(hwInfo->pSkuTable.ftrIoMmuPageFaulting);
|
||||
igcFeWa.get()->SetFtrWddm2Svm(hwInfo->pSkuTable.ftrWddm2Svm);
|
||||
igcFeWa.get()->SetFtrPooledEuEnabled(hwInfo->pSkuTable.ftrPooledEuEnabled);
|
||||
|
||||
igcFeWa.get()->SetFtrResourceStreamer(hwInfo->pSkuTable->ftrResourceStreamer);
|
||||
igcFeWa.get()->SetFtrResourceStreamer(hwInfo->pSkuTable.ftrResourceStreamer);
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
@@ -452,7 +452,7 @@ cl_command_queue CL_API_CALL clCreateCommandQueue(cl_context context,
|
||||
pContext->providePerformanceHint(CL_CONTEXT_DIAGNOSTICS_LEVEL_NEUTRAL_INTEL, DRIVER_CALLS_INTERNAL_CL_FLUSH);
|
||||
if (castToObjectOrAbort<CommandQueue>(commandQueue)->isProfilingEnabled()) {
|
||||
pContext->providePerformanceHint(CL_CONTEXT_DIAGNOSTICS_LEVEL_NEUTRAL_INTEL, PROFILING_ENABLED);
|
||||
if (pDevice->getDeviceInfo().preemptionSupported && pDevice->getHardwareInfo().pPlatform->eProductFamily < IGFX_SKYLAKE) {
|
||||
if (pDevice->getDeviceInfo().preemptionSupported && pDevice->getHardwareInfo().pPlatform.eProductFamily < IGFX_SKYLAKE) {
|
||||
pContext->providePerformanceHint(CL_CONTEXT_DIAGNOSTICS_LEVEL_NEUTRAL_INTEL, PROFILING_ENABLED_WITH_DISABLED_PREEMPTION);
|
||||
}
|
||||
}
|
||||
@@ -3894,7 +3894,7 @@ cl_command_queue CL_API_CALL clCreateCommandQueueWithProperties(cl_context conte
|
||||
pContext->providePerformanceHint(CL_CONTEXT_DIAGNOSTICS_LEVEL_NEUTRAL_INTEL, DRIVER_CALLS_INTERNAL_CL_FLUSH);
|
||||
if (castToObjectOrAbort<CommandQueue>(commandQueue)->isProfilingEnabled()) {
|
||||
pContext->providePerformanceHint(CL_CONTEXT_DIAGNOSTICS_LEVEL_NEUTRAL_INTEL, PROFILING_ENABLED);
|
||||
if (pDevice->getDeviceInfo().preemptionSupported && pDevice->getHardwareInfo().pPlatform->eProductFamily < IGFX_SKYLAKE) {
|
||||
if (pDevice->getDeviceInfo().preemptionSupported && pDevice->getHardwareInfo().pPlatform.eProductFamily < IGFX_SKYLAKE) {
|
||||
pContext->providePerformanceHint(CL_CONTEXT_DIAGNOSTICS_LEVEL_NEUTRAL_INTEL, PROFILING_ENABLED_WITH_DISABLED_PREEMPTION);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ AubCenter::AubCenter(const HardwareInfo *pHwInfo, bool localMemoryEnabled, const
|
||||
aub_stream::setTbxServerIp(DebugManager.flags.TbxServer.get());
|
||||
aub_stream::setTbxServerPort(DebugManager.flags.TbxPort.get());
|
||||
|
||||
aubManager.reset(createAubManager(pHwInfo->pPlatform->eProductFamily, devicesCount, memoryBankSize, localMemoryEnabled, aubStreamMode));
|
||||
aubManager.reset(createAubManager(pHwInfo->pPlatform.eProductFamily, devicesCount, memoryBankSize, localMemoryEnabled, aubStreamMode));
|
||||
}
|
||||
addressMapper = std::make_unique<AddressMapper>();
|
||||
streamProvider = std::make_unique<AubFileStreamProvider>();
|
||||
|
||||
@@ -197,7 +197,7 @@ BuiltinResourceT BuiltinsLib::getBuiltinResource(EBuiltInOps builtin, BuiltinCod
|
||||
std::string resourceNameGeneric = createBuiltinResourceName(builtin, BuiltinCode::getExtension(requestedCodeType));
|
||||
std::string resourceNameForPlatformType = createBuiltinResourceName(builtin, BuiltinCode::getExtension(requestedCodeType), device.getFamilyNameWithType());
|
||||
std::string resourceNameForPlatformTypeAndStepping = createBuiltinResourceName(builtin, BuiltinCode::getExtension(requestedCodeType), device.getFamilyNameWithType(),
|
||||
device.getHardwareInfo().pPlatform->usRevId);
|
||||
device.getHardwareInfo().pPlatform.usRevId);
|
||||
|
||||
for (auto &rn : {resourceNameForPlatformTypeAndStepping, resourceNameForPlatformType, resourceNameGeneric}) { // first look for dedicated version, only fallback to generic one
|
||||
for (auto &s : allStorages) {
|
||||
|
||||
@@ -22,10 +22,10 @@ namespace NEO {
|
||||
AubCommandStreamReceiverCreateFunc aubCommandStreamReceiverFactory[IGFX_MAX_CORE] = {};
|
||||
|
||||
std::string AUBCommandStreamReceiver::createFullFilePath(const HardwareInfo &hwInfo, const std::string &filename) {
|
||||
std::string hwPrefix = hardwarePrefix[hwInfo.pPlatform->eProductFamily];
|
||||
std::string hwPrefix = hardwarePrefix[hwInfo.pPlatform.eProductFamily];
|
||||
|
||||
// Generate the full filename
|
||||
const auto >SystemInfo = *hwInfo.pSysInfo;
|
||||
const auto >SystemInfo = hwInfo.pSysInfo;
|
||||
std::stringstream strfilename;
|
||||
uint32_t subSlicesPerSlice = gtSystemInfo.SubSliceCount / gtSystemInfo.SliceCount;
|
||||
strfilename << hwPrefix << "_" << gtSystemInfo.SliceCount << "x" << subSlicesPerSlice << "x" << gtSystemInfo.MaxEuPerSubSlice << "_" << filename << ".aub";
|
||||
@@ -50,12 +50,12 @@ CommandStreamReceiver *AUBCommandStreamReceiver::create(const std::string &baseN
|
||||
filePath.assign(DebugManager.flags.AUBDumpCaptureFileName.get());
|
||||
}
|
||||
|
||||
if (hwInfo->pPlatform->eRenderCoreFamily >= IGFX_MAX_CORE) {
|
||||
if (hwInfo->pPlatform.eRenderCoreFamily >= IGFX_MAX_CORE) {
|
||||
DEBUG_BREAK_IF(!false);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto pCreate = aubCommandStreamReceiverFactory[hwInfo->pPlatform->eRenderCoreFamily];
|
||||
auto pCreate = aubCommandStreamReceiverFactory[hwInfo->pPlatform.eRenderCoreFamily];
|
||||
return pCreate ? pCreate(filePath, standalone, executionEnvironment) : nullptr;
|
||||
}
|
||||
} // namespace NEO
|
||||
|
||||
@@ -42,7 +42,7 @@ template <typename GfxFamily>
|
||||
CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiverHw(ExecutionEnvironment &executionEnvironment)
|
||||
: CommandStreamReceiver(executionEnvironment) {
|
||||
|
||||
auto &hwHelper = HwHelper::get(peekHwInfo().pPlatform->eRenderCoreFamily);
|
||||
auto &hwHelper = HwHelper::get(peekHwInfo().pPlatform.eRenderCoreFamily);
|
||||
localMemoryEnabled = hwHelper.getEnableLocalMemory(peekHwInfo());
|
||||
|
||||
requiredThreadArbitrationPolicy = PreambleHelper<GfxFamily>::getDefaultThreadArbitrationPolicy();
|
||||
@@ -390,7 +390,7 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
|
||||
makeResident(*preemptionCsrAllocation);
|
||||
|
||||
if (dispatchFlags.preemptionMode == PreemptionMode::MidThread || device.isSourceLevelDebuggerActive()) {
|
||||
auto sipType = SipKernel::getSipKernelType(device.getHardwareInfo().pPlatform->eRenderCoreFamily, device.isSourceLevelDebuggerActive());
|
||||
auto sipType = SipKernel::getSipKernelType(device.getHardwareInfo().pPlatform.eRenderCoreFamily, device.isSourceLevelDebuggerActive());
|
||||
makeResident(*device.getExecutionEnvironment()->getBuiltIns()->getSipKernel(sipType, device).getSipAllocation());
|
||||
if (debugSurface) {
|
||||
makeResident(*debugSurface);
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace NEO {
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE];
|
||||
|
||||
CommandStreamReceiver *createCommandStreamImpl(ExecutionEnvironment &executionEnvironment) {
|
||||
auto funcCreate = commandStreamReceiverFactory[executionEnvironment.getHardwareInfo()->pPlatform->eRenderCoreFamily];
|
||||
auto funcCreate = commandStreamReceiverFactory[executionEnvironment.getHardwareInfo()->pPlatform.eRenderCoreFamily];
|
||||
if (funcCreate == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
@@ -49,7 +49,7 @@ CommandStreamReceiver *createCommandStreamImpl(ExecutionEnvironment &executionEn
|
||||
return commandStreamReceiver;
|
||||
}
|
||||
|
||||
bool getDevicesImpl(HardwareInfo **hwInfo, size_t &numDevicesReturned, ExecutionEnvironment &executionEnvironment) {
|
||||
bool getDevicesImpl(size_t &numDevicesReturned, ExecutionEnvironment &executionEnvironment) {
|
||||
bool result;
|
||||
int32_t csr = DebugManager.flags.SetCommandStreamReceiver.get();
|
||||
if (csr < 0) {
|
||||
@@ -57,15 +57,15 @@ bool getDevicesImpl(HardwareInfo **hwInfo, size_t &numDevicesReturned, Execution
|
||||
}
|
||||
switch (csr) {
|
||||
case CSR_HW:
|
||||
result = DeviceFactory::getDevices(hwInfo, numDevicesReturned, executionEnvironment);
|
||||
DEBUG_BREAK_IF(result && (hwInfo == nullptr));
|
||||
result = DeviceFactory::getDevices(numDevicesReturned, executionEnvironment);
|
||||
DEBUG_BREAK_IF(!result);
|
||||
return result;
|
||||
case CSR_AUB:
|
||||
case CSR_TBX:
|
||||
case CSR_TBX_WITH_AUB:
|
||||
return DeviceFactory::getDevicesForProductFamilyOverride(hwInfo, numDevicesReturned, executionEnvironment);
|
||||
return DeviceFactory::getDevicesForProductFamilyOverride(numDevicesReturned, executionEnvironment);
|
||||
case CSR_HW_WITH_AUB:
|
||||
return DeviceFactory::getDevices(hwInfo, numDevicesReturned, executionEnvironment);
|
||||
return DeviceFactory::getDevices(numDevicesReturned, executionEnvironment);
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -7,10 +7,9 @@
|
||||
|
||||
#pragma once
|
||||
#include "runtime/command_stream/command_stream_receiver.h"
|
||||
#include "runtime/helpers/hw_info.h"
|
||||
|
||||
namespace NEO {
|
||||
class ExecutionEnvironment;
|
||||
extern CommandStreamReceiver *createCommandStreamImpl(ExecutionEnvironment &executionEnvironment);
|
||||
extern bool getDevicesImpl(HardwareInfo **hwInfo, size_t &numDevicesReturned, ExecutionEnvironment &executionEnvironment);
|
||||
extern bool getDevicesImpl(size_t &numDevicesReturned, ExecutionEnvironment &executionEnvironment);
|
||||
} // namespace NEO
|
||||
|
||||
@@ -81,7 +81,7 @@ void PreemptionHelper::programStateSip(LinearStream &preambleCmdStream, Device &
|
||||
if (isMidThreadPreemption || sourceLevelDebuggerActive) {
|
||||
auto sip = reinterpret_cast<STATE_SIP *>(preambleCmdStream.getSpace(sizeof(STATE_SIP)));
|
||||
*sip = GfxFamily::cmdInitStateSip;
|
||||
auto sipType = SipKernel::getSipKernelType(device.getHardwareInfo().pPlatform->eRenderCoreFamily, sourceLevelDebuggerActive);
|
||||
auto sipType = SipKernel::getSipKernelType(device.getHardwareInfo().pPlatform.eRenderCoreFamily, sourceLevelDebuggerActive);
|
||||
sip->setSystemInstructionPointer(device.getExecutionEnvironment()->getBuiltIns()->getSipKernel(sipType, device).getSipAllocation()->getGpuAddressToPatch());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace NEO {
|
||||
ScratchSpaceController::ScratchSpaceController(ExecutionEnvironment &environment, InternalAllocationStorage &allocationStorage)
|
||||
: executionEnvironment(environment), csrAllocationStorage(allocationStorage) {
|
||||
auto hwInfo = executionEnvironment.getHardwareInfo();
|
||||
auto &hwHelper = HwHelper::get(hwInfo->pPlatform->eRenderCoreFamily);
|
||||
auto &hwHelper = HwHelper::get(hwInfo->pPlatform.eRenderCoreFamily);
|
||||
computeUnitsUsedForScratch = hwHelper.getComputeUnitsUsedForScratch(hwInfo);
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ void ScratchSpaceControllerBase::createScratchSpaceAllocation() {
|
||||
}
|
||||
|
||||
uint64_t ScratchSpaceControllerBase::calculateNewGSH() {
|
||||
auto &hwHelper = HwHelper::get(executionEnvironment.getHardwareInfo()->pPlatform->eRenderCoreFamily);
|
||||
auto &hwHelper = HwHelper::get(executionEnvironment.getHardwareInfo()->pPlatform.eRenderCoreFamily);
|
||||
auto scratchSpaceOffsetFor64bit = hwHelper.getScratchSpaceOffsetFor64bit();
|
||||
return scratchAllocation->getGpuAddress() - scratchSpaceOffsetFor64bit;
|
||||
}
|
||||
@@ -61,7 +61,7 @@ uint64_t ScratchSpaceControllerBase::getScratchPatchAddress() {
|
||||
if (scratchAllocation) {
|
||||
scratchAddress = scratchAllocation->getGpuAddressToPatch();
|
||||
if (is64bit && !getMemoryManager()->peekForce32BitAllocations()) {
|
||||
auto &hwHelper = HwHelper::get(executionEnvironment.getHardwareInfo()->pPlatform->eRenderCoreFamily);
|
||||
auto &hwHelper = HwHelper::get(executionEnvironment.getHardwareInfo()->pPlatform.eRenderCoreFamily);
|
||||
auto scratchSpaceOffsetFor64bit = hwHelper.getScratchSpaceOffsetFor64bit();
|
||||
//this is to avoid scractch allocation offset "0"
|
||||
scratchAddress = scratchSpaceOffsetFor64bit;
|
||||
|
||||
@@ -20,12 +20,12 @@ TbxCommandStreamReceiverCreateFunc tbxCommandStreamReceiverFactory[IGFX_MAX_CORE
|
||||
CommandStreamReceiver *TbxCommandStreamReceiver::create(const std::string &baseName, bool withAubDump, ExecutionEnvironment &executionEnvironment) {
|
||||
auto hwInfo = executionEnvironment.getHardwareInfo();
|
||||
|
||||
if (hwInfo->pPlatform->eRenderCoreFamily >= IGFX_MAX_CORE) {
|
||||
if (hwInfo->pPlatform.eRenderCoreFamily >= IGFX_MAX_CORE) {
|
||||
DEBUG_BREAK_IF(!false);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto pCreate = tbxCommandStreamReceiverFactory[hwInfo->pPlatform->eRenderCoreFamily];
|
||||
auto pCreate = tbxCommandStreamReceiverFactory[hwInfo->pPlatform.eRenderCoreFamily];
|
||||
|
||||
return pCreate ? pCreate(baseName, withAubDump, executionEnvironment) : nullptr;
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ CommandStreamReceiver *TbxCommandStreamReceiverHw<GfxFamily>::create(const std::
|
||||
TbxCommandStreamReceiverHw<GfxFamily> *csr;
|
||||
if (withAubDump) {
|
||||
auto hwInfo = executionEnvironment.getHardwareInfo();
|
||||
auto &hwHelper = HwHelper::get(hwInfo->pPlatform->eRenderCoreFamily);
|
||||
auto &hwHelper = HwHelper::get(hwInfo->pPlatform.eRenderCoreFamily);
|
||||
auto localMemoryEnabled = hwHelper.getEnableLocalMemory(*hwInfo);
|
||||
auto fullName = AUBCommandStreamReceiver::createFullFilePath(*hwInfo, baseName);
|
||||
executionEnvironment.initAubCenter(localMemoryEnabled, fullName, CommandStreamReceiverType::CSR_TBX_WITH_AUB);
|
||||
|
||||
@@ -37,11 +37,11 @@ const std::string BinaryCache::getCachedFileName(const HardwareInfo &hwInfo, con
|
||||
hash.update(&*internalOptions.begin(), internalOptions.size());
|
||||
|
||||
hash.update("----", 4);
|
||||
hash.update(reinterpret_cast<const char *>(hwInfo.pPlatform), sizeof(*hwInfo.pPlatform));
|
||||
hash.update(reinterpret_cast<const char *>(&hwInfo.pPlatform), sizeof(hwInfo.pPlatform));
|
||||
hash.update("----", 4);
|
||||
hash.update(reinterpret_cast<const char *>(hwInfo.pSkuTable), sizeof(*hwInfo.pSkuTable));
|
||||
hash.update(reinterpret_cast<const char *>(&hwInfo.pSkuTable), sizeof(hwInfo.pSkuTable));
|
||||
hash.update("----", 4);
|
||||
hash.update(reinterpret_cast<const char *>(hwInfo.pWaTable), sizeof(*hwInfo.pWaTable));
|
||||
hash.update(reinterpret_cast<const char *>(&hwInfo.pWaTable), sizeof(hwInfo.pWaTable));
|
||||
|
||||
auto res = hash.finish();
|
||||
std::stringstream stream;
|
||||
|
||||
@@ -441,39 +441,39 @@ CIF::RAII::UPtr_t<IGC::IgcOclTranslationCtxTagOCL> CompilerInterface::createIgcT
|
||||
if (productFamily != "unk") {
|
||||
getHwInfoForPlatformString(productFamily.c_str(), hwInfo);
|
||||
}
|
||||
IGC::PlatformHelper::PopulateInterfaceWith(*igcPlatform, *hwInfo->pPlatform);
|
||||
IGC::GtSysInfoHelper::PopulateInterfaceWith(*igcGtSystemInfo, *hwInfo->pSysInfo);
|
||||
IGC::PlatformHelper::PopulateInterfaceWith(*igcPlatform, hwInfo->pPlatform);
|
||||
IGC::GtSysInfoHelper::PopulateInterfaceWith(*igcGtSystemInfo, hwInfo->pSysInfo);
|
||||
|
||||
igcFeWa.get()->SetFtrDesktop(device.getHardwareInfo().pSkuTable->ftrDesktop);
|
||||
igcFeWa.get()->SetFtrChannelSwizzlingXOREnabled(device.getHardwareInfo().pSkuTable->ftrChannelSwizzlingXOREnabled);
|
||||
igcFeWa.get()->SetFtrDesktop(device.getHardwareInfo().pSkuTable.ftrDesktop);
|
||||
igcFeWa.get()->SetFtrChannelSwizzlingXOREnabled(device.getHardwareInfo().pSkuTable.ftrChannelSwizzlingXOREnabled);
|
||||
|
||||
igcFeWa.get()->SetFtrGtBigDie(device.getHardwareInfo().pSkuTable->ftrGtBigDie);
|
||||
igcFeWa.get()->SetFtrGtMediumDie(device.getHardwareInfo().pSkuTable->ftrGtMediumDie);
|
||||
igcFeWa.get()->SetFtrGtSmallDie(device.getHardwareInfo().pSkuTable->ftrGtSmallDie);
|
||||
igcFeWa.get()->SetFtrGtBigDie(device.getHardwareInfo().pSkuTable.ftrGtBigDie);
|
||||
igcFeWa.get()->SetFtrGtMediumDie(device.getHardwareInfo().pSkuTable.ftrGtMediumDie);
|
||||
igcFeWa.get()->SetFtrGtSmallDie(device.getHardwareInfo().pSkuTable.ftrGtSmallDie);
|
||||
|
||||
igcFeWa.get()->SetFtrGT1(device.getHardwareInfo().pSkuTable->ftrGT1);
|
||||
igcFeWa.get()->SetFtrGT1_5(device.getHardwareInfo().pSkuTable->ftrGT1_5);
|
||||
igcFeWa.get()->SetFtrGT2(device.getHardwareInfo().pSkuTable->ftrGT2);
|
||||
igcFeWa.get()->SetFtrGT3(device.getHardwareInfo().pSkuTable->ftrGT3);
|
||||
igcFeWa.get()->SetFtrGT4(device.getHardwareInfo().pSkuTable->ftrGT4);
|
||||
igcFeWa.get()->SetFtrGT1(device.getHardwareInfo().pSkuTable.ftrGT1);
|
||||
igcFeWa.get()->SetFtrGT1_5(device.getHardwareInfo().pSkuTable.ftrGT1_5);
|
||||
igcFeWa.get()->SetFtrGT2(device.getHardwareInfo().pSkuTable.ftrGT2);
|
||||
igcFeWa.get()->SetFtrGT3(device.getHardwareInfo().pSkuTable.ftrGT3);
|
||||
igcFeWa.get()->SetFtrGT4(device.getHardwareInfo().pSkuTable.ftrGT4);
|
||||
|
||||
igcFeWa.get()->SetFtrIVBM0M1Platform(device.getHardwareInfo().pSkuTable->ftrIVBM0M1Platform);
|
||||
igcFeWa.get()->SetFtrGTL(device.getHardwareInfo().pSkuTable->ftrGT1);
|
||||
igcFeWa.get()->SetFtrGTM(device.getHardwareInfo().pSkuTable->ftrGT2);
|
||||
igcFeWa.get()->SetFtrGTH(device.getHardwareInfo().pSkuTable->ftrGT3);
|
||||
igcFeWa.get()->SetFtrIVBM0M1Platform(device.getHardwareInfo().pSkuTable.ftrIVBM0M1Platform);
|
||||
igcFeWa.get()->SetFtrGTL(device.getHardwareInfo().pSkuTable.ftrGT1);
|
||||
igcFeWa.get()->SetFtrGTM(device.getHardwareInfo().pSkuTable.ftrGT2);
|
||||
igcFeWa.get()->SetFtrGTH(device.getHardwareInfo().pSkuTable.ftrGT3);
|
||||
|
||||
igcFeWa.get()->SetFtrSGTPVSKUStrapPresent(device.getHardwareInfo().pSkuTable->ftrSGTPVSKUStrapPresent);
|
||||
igcFeWa.get()->SetFtrGTA(device.getHardwareInfo().pSkuTable->ftrGTA);
|
||||
igcFeWa.get()->SetFtrGTC(device.getHardwareInfo().pSkuTable->ftrGTC);
|
||||
igcFeWa.get()->SetFtrGTX(device.getHardwareInfo().pSkuTable->ftrGTX);
|
||||
igcFeWa.get()->SetFtr5Slice(device.getHardwareInfo().pSkuTable->ftr5Slice);
|
||||
igcFeWa.get()->SetFtrSGTPVSKUStrapPresent(device.getHardwareInfo().pSkuTable.ftrSGTPVSKUStrapPresent);
|
||||
igcFeWa.get()->SetFtrGTA(device.getHardwareInfo().pSkuTable.ftrGTA);
|
||||
igcFeWa.get()->SetFtrGTC(device.getHardwareInfo().pSkuTable.ftrGTC);
|
||||
igcFeWa.get()->SetFtrGTX(device.getHardwareInfo().pSkuTable.ftrGTX);
|
||||
igcFeWa.get()->SetFtr5Slice(device.getHardwareInfo().pSkuTable.ftr5Slice);
|
||||
|
||||
igcFeWa.get()->SetFtrGpGpuMidThreadLevelPreempt(device.getHardwareInfo().pSkuTable->ftrGpGpuMidThreadLevelPreempt);
|
||||
igcFeWa.get()->SetFtrIoMmuPageFaulting(device.getHardwareInfo().pSkuTable->ftrIoMmuPageFaulting);
|
||||
igcFeWa.get()->SetFtrWddm2Svm(device.getHardwareInfo().pSkuTable->ftrWddm2Svm);
|
||||
igcFeWa.get()->SetFtrPooledEuEnabled(device.getHardwareInfo().pSkuTable->ftrPooledEuEnabled);
|
||||
igcFeWa.get()->SetFtrGpGpuMidThreadLevelPreempt(device.getHardwareInfo().pSkuTable.ftrGpGpuMidThreadLevelPreempt);
|
||||
igcFeWa.get()->SetFtrIoMmuPageFaulting(device.getHardwareInfo().pSkuTable.ftrIoMmuPageFaulting);
|
||||
igcFeWa.get()->SetFtrWddm2Svm(device.getHardwareInfo().pSkuTable.ftrWddm2Svm);
|
||||
igcFeWa.get()->SetFtrPooledEuEnabled(device.getHardwareInfo().pSkuTable.ftrPooledEuEnabled);
|
||||
|
||||
igcFeWa.get()->SetFtrResourceStreamer(device.getHardwareInfo().pSkuTable->ftrResourceStreamer);
|
||||
igcFeWa.get()->SetFtrResourceStreamer(device.getHardwareInfo().pSkuTable.ftrResourceStreamer);
|
||||
|
||||
igcDeviceContexts[&device] = std::move(newDeviceCtx);
|
||||
return igcDeviceContexts[&device]->CreateTranslationCtx(inType, outType);
|
||||
|
||||
@@ -66,18 +66,19 @@ bool familyEnabled[IGFX_MAX_CORE] = {
|
||||
false,
|
||||
};
|
||||
|
||||
Device::Device(const HardwareInfo &hwInfo, ExecutionEnvironment *executionEnvironment, uint32_t deviceIndex)
|
||||
: hwInfo(hwInfo), executionEnvironment(executionEnvironment), deviceIndex(deviceIndex) {
|
||||
Device::Device(ExecutionEnvironment *executionEnvironment, uint32_t deviceIndex)
|
||||
: executionEnvironment(executionEnvironment), deviceIndex(deviceIndex) {
|
||||
memset(&deviceInfo, 0, sizeof(deviceInfo));
|
||||
deviceExtensions.reserve(1000);
|
||||
name.reserve(100);
|
||||
auto &hwInfo = getHardwareInfo();
|
||||
preemptionMode = PreemptionHelper::getDefaultPreemptionMode(hwInfo);
|
||||
|
||||
if (!getSourceLevelDebugger()) {
|
||||
this->executionEnvironment->initSourceLevelDebugger();
|
||||
}
|
||||
this->executionEnvironment->incRefInternal();
|
||||
auto &hwHelper = HwHelper::get(hwInfo.pPlatform->eRenderCoreFamily);
|
||||
auto &hwHelper = HwHelper::get(hwInfo.pPlatform.eRenderCoreFamily);
|
||||
hwHelper.setupHardwareCapabilities(&this->hardwareCapabilities, hwInfo);
|
||||
}
|
||||
|
||||
@@ -105,10 +106,10 @@ Device::~Device() {
|
||||
executionEnvironment->decRefInternal();
|
||||
}
|
||||
|
||||
bool Device::createDeviceImpl(const HardwareInfo *pHwInfo) {
|
||||
bool Device::createDeviceImpl() {
|
||||
executionEnvironment->initGmm();
|
||||
|
||||
if (!createEngines(pHwInfo)) {
|
||||
if (!createEngines()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -123,10 +124,11 @@ bool Device::createDeviceImpl(const HardwareInfo *pHwInfo) {
|
||||
|
||||
initializeCaps();
|
||||
|
||||
auto &hwInfo = getHardwareInfo();
|
||||
if (osTime->getOSInterface()) {
|
||||
if (pHwInfo->capabilityTable.instrumentationEnabled) {
|
||||
if (hwInfo.capabilityTable.instrumentationEnabled) {
|
||||
performanceCounters = createPerformanceCountersFunc(osTime.get());
|
||||
performanceCounters->initialize(pHwInfo);
|
||||
performanceCounters->initialize(&hwInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,9 +167,10 @@ AllocationProperties Device::getAllocationPropertiesForPreemption() const {
|
||||
properties.alignment = 256 * MemoryConstants::kiloByte;
|
||||
return properties;
|
||||
}
|
||||
bool Device::createEngines(const HardwareInfo *pHwInfo) {
|
||||
auto defaultEngineType = getChosenEngineType(*pHwInfo);
|
||||
auto &gpgpuEngines = HwHelper::get(pHwInfo->pPlatform->eRenderCoreFamily).getGpgpuEngineInstances();
|
||||
bool Device::createEngines() {
|
||||
auto &hwInfo = getHardwareInfo();
|
||||
auto defaultEngineType = getChosenEngineType(hwInfo);
|
||||
auto &gpgpuEngines = HwHelper::get(hwInfo.pPlatform.eRenderCoreFamily).getGpgpuEngineInstances();
|
||||
|
||||
for (uint32_t deviceCsrIndex = 0; deviceCsrIndex < gpgpuEngines.size(); deviceCsrIndex++) {
|
||||
if (!executionEnvironment->initializeCommandStreamReceiver(getDeviceIndex(), deviceCsrIndex)) {
|
||||
@@ -196,13 +199,9 @@ bool Device::createEngines(const HardwareInfo *pHwInfo) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const HardwareInfo *Device::getDeviceInitHwInfo(const HardwareInfo *pHwInfoIn) {
|
||||
return pHwInfoIn ? pHwInfoIn : platformDevices[0];
|
||||
}
|
||||
const HardwareInfo &Device::getHardwareInfo() const { return *executionEnvironment->getHardwareInfo(); }
|
||||
|
||||
const HardwareInfo &Device::getHardwareInfo() const { return hwInfo; }
|
||||
|
||||
const WorkaroundTable *Device::getWaTable() const { return hwInfo.pWaTable; }
|
||||
const WorkaroundTable *Device::getWaTable() const { return &getHardwareInfo().pWaTable; }
|
||||
|
||||
const DeviceInfo &Device::getDeviceInfo() const {
|
||||
return deviceInfo;
|
||||
@@ -224,21 +223,22 @@ void Device::prepareSLMWindow() {
|
||||
}
|
||||
|
||||
const char *Device::getProductAbbrev() const {
|
||||
return hardwarePrefix[hwInfo.pPlatform->eProductFamily];
|
||||
return hardwarePrefix[executionEnvironment->getHardwareInfo()->pPlatform.eProductFamily];
|
||||
}
|
||||
|
||||
const std::string Device::getFamilyNameWithType() const {
|
||||
std::string platformName = familyName[hwInfo.pPlatform->eRenderCoreFamily];
|
||||
auto &hwInfo = getHardwareInfo();
|
||||
std::string platformName = familyName[hwInfo.pPlatform.eRenderCoreFamily];
|
||||
platformName.append(getPlatformType(hwInfo));
|
||||
return platformName;
|
||||
}
|
||||
|
||||
double Device::getProfilingTimerResolution() {
|
||||
return osTime->getDynamicDeviceTimerResolution(hwInfo);
|
||||
return osTime->getDynamicDeviceTimerResolution(getHardwareInfo());
|
||||
}
|
||||
|
||||
unsigned int Device::getSupportedClVersion() const {
|
||||
return hwInfo.capabilityTable.clVersionSupport;
|
||||
return getHardwareInfo().capabilityTable.clVersionSupport;
|
||||
}
|
||||
|
||||
/* We hide the retain and release function of BaseObject. */
|
||||
@@ -252,11 +252,13 @@ unique_ptr_if_unused<Device> Device::release() {
|
||||
}
|
||||
|
||||
bool Device::isSimulation() const {
|
||||
bool simulation = hwInfo.capabilityTable.isSimulation(hwInfo.pPlatform->usDeviceID);
|
||||
auto &hwInfo = getHardwareInfo();
|
||||
|
||||
bool simulation = hwInfo.capabilityTable.isSimulation(hwInfo.pPlatform.usDeviceID);
|
||||
if (engines[0].commandStreamReceiver->getType() != CommandStreamReceiverType::CSR_HW) {
|
||||
simulation = true;
|
||||
}
|
||||
if (hwInfo.pSkuTable->ftrSimulationMode) {
|
||||
if (hwInfo.pSkuTable.ftrSimulationMode) {
|
||||
simulation = true;
|
||||
}
|
||||
return simulation;
|
||||
@@ -268,7 +270,7 @@ double Device::getPlatformHostTimerResolution() const {
|
||||
return 0.0;
|
||||
}
|
||||
GFXCORE_FAMILY Device::getRenderCoreFamily() const {
|
||||
return this->getHardwareInfo().pPlatform->eRenderCoreFamily;
|
||||
return this->getHardwareInfo().pPlatform.eRenderCoreFamily;
|
||||
}
|
||||
|
||||
bool Device::isSourceLevelDebuggerActive() const {
|
||||
|
||||
@@ -39,10 +39,9 @@ class Device : public BaseObject<_cl_device_id> {
|
||||
static const cl_ulong objectMagic = 0x8055832341AC8D08LL;
|
||||
|
||||
template <typename T>
|
||||
static T *create(const HardwareInfo *pHwInfo, ExecutionEnvironment *execEnv, uint32_t deviceIndex) {
|
||||
pHwInfo = getDeviceInitHwInfo(pHwInfo);
|
||||
T *device = new T(*pHwInfo, execEnv, deviceIndex);
|
||||
return createDeviceInternals(pHwInfo, device);
|
||||
static T *create(ExecutionEnvironment *execEnv, uint32_t deviceIndex) {
|
||||
T *device = new T(execEnv, deviceIndex);
|
||||
return createDeviceInternals(device);
|
||||
}
|
||||
|
||||
Device &operator=(const Device &) = delete;
|
||||
@@ -106,7 +105,7 @@ class Device : public BaseObject<_cl_device_id> {
|
||||
static decltype(&PerformanceCounters::create) createPerformanceCountersFunc;
|
||||
PreemptionMode getPreemptionMode() const { return preemptionMode; }
|
||||
GraphicsAllocation *getPreemptionAllocation() const { return preemptionAllocation; }
|
||||
MOCKABLE_VIRTUAL const WhitelistedRegisters &getWhitelistedRegisters() { return hwInfo.capabilityTable.whitelistedRegisters; }
|
||||
MOCKABLE_VIRTUAL const WhitelistedRegisters &getWhitelistedRegisters() { return getHardwareInfo().capabilityTable.whitelistedRegisters; }
|
||||
std::vector<unsigned int> simultaneousInterops;
|
||||
std::string deviceExtensions;
|
||||
std::string name;
|
||||
@@ -121,20 +120,20 @@ class Device : public BaseObject<_cl_device_id> {
|
||||
|
||||
protected:
|
||||
Device() = delete;
|
||||
Device(const HardwareInfo &hwInfo, ExecutionEnvironment *executionEnvironment, uint32_t deviceIndex);
|
||||
Device(ExecutionEnvironment *executionEnvironment, uint32_t deviceIndex);
|
||||
|
||||
template <typename T>
|
||||
static T *createDeviceInternals(const HardwareInfo *pHwInfo, T *device) {
|
||||
if (false == device->createDeviceImpl(pHwInfo)) {
|
||||
static T *createDeviceInternals(T *device) {
|
||||
if (false == device->createDeviceImpl()) {
|
||||
delete device;
|
||||
return nullptr;
|
||||
}
|
||||
return device;
|
||||
}
|
||||
|
||||
bool createDeviceImpl(const HardwareInfo *pHwInfo);
|
||||
bool createEngines(const HardwareInfo *pHwInfo);
|
||||
static const HardwareInfo *getDeviceInitHwInfo(const HardwareInfo *pHwInfoIn);
|
||||
bool createDeviceImpl();
|
||||
bool createEngines();
|
||||
|
||||
MOCKABLE_VIRTUAL void initializeCaps();
|
||||
void setupFp64Flags();
|
||||
void appendOSExtensions(std::string &deviceExtensions);
|
||||
@@ -142,7 +141,6 @@ class Device : public BaseObject<_cl_device_id> {
|
||||
|
||||
unsigned int enabledClVersion = 0u;
|
||||
|
||||
const HardwareInfo &hwInfo;
|
||||
HardwareCapabilities hardwareCapabilities = {};
|
||||
DeviceInfo deviceInfo;
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ static constexpr cl_device_fp_config defaultFpFlags = static_cast<cl_device_fp_c
|
||||
CL_FP_FMA);
|
||||
|
||||
void Device::setupFp64Flags() {
|
||||
auto &hwInfo = getHardwareInfo();
|
||||
if (DebugManager.flags.OverrideDefaultFP64Settings.get() == -1) {
|
||||
if (hwInfo.capabilityTable.ftrSupportsFP64) {
|
||||
deviceExtensions += "cl_khr_fp64 ";
|
||||
@@ -66,6 +67,7 @@ void Device::setupFp64Flags() {
|
||||
}
|
||||
|
||||
void Device::initializeCaps() {
|
||||
auto &hwInfo = getHardwareInfo();
|
||||
deviceExtensions.clear();
|
||||
deviceExtensions.append(deviceExtensionsList);
|
||||
// Add our graphics family name to the device name
|
||||
@@ -77,7 +79,7 @@ void Device::initializeCaps() {
|
||||
driverVersion = TOSTR(NEO_DRIVER_VERSION);
|
||||
|
||||
name += "Intel(R) ";
|
||||
name += familyName[hwInfo.pPlatform->eRenderCoreFamily];
|
||||
name += familyName[hwInfo.pPlatform.eRenderCoreFamily];
|
||||
name += " HD Graphics NEO";
|
||||
|
||||
if (driverInfo) {
|
||||
@@ -85,7 +87,7 @@ void Device::initializeCaps() {
|
||||
driverVersion.assign(driverInfo.get()->getVersion(driverVersion).c_str());
|
||||
}
|
||||
|
||||
auto &hwHelper = HwHelper::get(hwInfo.pPlatform->eRenderCoreFamily);
|
||||
auto &hwHelper = HwHelper::get(hwInfo.pPlatform.eRenderCoreFamily);
|
||||
|
||||
deviceInfo.name = name.c_str();
|
||||
deviceInfo.driverVersion = driverVersion.c_str();
|
||||
@@ -203,7 +205,7 @@ void Device::initializeCaps() {
|
||||
deviceInfo.addressBits = 64;
|
||||
|
||||
//copy system info to prevent misaligned reads
|
||||
const auto systemInfo = *hwInfo.pSysInfo;
|
||||
const auto systemInfo = hwInfo.pSysInfo;
|
||||
|
||||
deviceInfo.globalMemCachelineSize = 64;
|
||||
deviceInfo.globalMemCacheSize = systemInfo.L3BankCount * 128 * KB;
|
||||
@@ -251,7 +253,7 @@ void Device::initializeCaps() {
|
||||
deviceInfo.numThreadsPerEU = 0;
|
||||
auto simdSizeUsed = DebugManager.flags.UseMaxSimdSizeToDeduceMaxWorkgroupSize.get() ? 32 : 8;
|
||||
|
||||
deviceInfo.maxNumEUsPerSubSlice = (systemInfo.EuCountPerPoolMin == 0 || hwInfo.pSkuTable->ftrPooledEuEnabled == 0)
|
||||
deviceInfo.maxNumEUsPerSubSlice = (systemInfo.EuCountPerPoolMin == 0 || hwInfo.pSkuTable.ftrPooledEuEnabled == 0)
|
||||
? (systemInfo.EUCount / systemInfo.SubSliceCount)
|
||||
: systemInfo.EuCountPerPoolMin;
|
||||
deviceInfo.numThreadsPerEU = systemInfo.ThreadCount / systemInfo.EUCount;
|
||||
|
||||
@@ -206,7 +206,7 @@ cl_int Device::getDeviceInfo(cl_device_info paramName,
|
||||
getCap<CL_DEVICE_PLANAR_YUV_MAX_HEIGHT_INTEL>(src, srcSize, retSize);
|
||||
break;
|
||||
default:
|
||||
DeviceHelper::getExtraDeviceInfo(hwInfo, paramName, param, src, srcSize, retSize);
|
||||
DeviceHelper::getExtraDeviceInfo(getHardwareInfo(), paramName, param, src, srcSize, retSize);
|
||||
}
|
||||
|
||||
retVal = ::getInfo(paramValue, paramValueSize, src, srcSize);
|
||||
@@ -222,7 +222,7 @@ bool Device::getDeviceAndHostTimer(uint64_t *deviceTimestamp, uint64_t *hostTime
|
||||
TimeStampData queueTimeStamp;
|
||||
bool retVal = getOSTime()->getCpuGpuTime(&queueTimeStamp);
|
||||
if (retVal) {
|
||||
uint64_t resolution = (uint64_t)getOSTime()->getDynamicDeviceTimerResolution(this->hwInfo);
|
||||
uint64_t resolution = (uint64_t)getOSTime()->getDynamicDeviceTimerResolution(getHardwareInfo());
|
||||
*deviceTimestamp = queueTimeStamp.GPUTimeStamp * resolution;
|
||||
}
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ void DeviceQueue::allocateResources() {
|
||||
queueStorageBuffer = device->getMemoryManager()->allocateGraphicsMemoryWithProperties({queueStorageSize, GraphicsAllocation::AllocationType::DEVICE_QUEUE_BUFFER});
|
||||
memset(queueStorageBuffer->getUnderlyingBuffer(), 0, queueStorageBuffer->getUnderlyingBufferSize());
|
||||
|
||||
auto &hwHelper = HwHelper::get(device->getHardwareInfo().pPlatform->eRenderCoreFamily);
|
||||
auto &hwHelper = HwHelper::get(device->getHardwareInfo().pPlatform.eRenderCoreFamily);
|
||||
const size_t IDTSize = numberOfIDTables * interfaceDescriptorEntries * hwHelper.getInterfaceDescriptorDataSize();
|
||||
|
||||
// Additional padding of PAGE_SIZE for PageFaults just after DSH to satisfy hw requirements
|
||||
|
||||
@@ -7,13 +7,12 @@
|
||||
|
||||
#include "runtime/command_stream/create_command_stream_impl.h"
|
||||
#include "runtime/execution_environment/execution_environment.h"
|
||||
#include "runtime/helpers/hw_info.h"
|
||||
#include "runtime/os_interface/device_factory.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
bool getDevices(HardwareInfo **hwInfo, size_t &numDevicesReturned, ExecutionEnvironment &executionEnviornment) {
|
||||
return getDevicesImpl(hwInfo, numDevicesReturned, executionEnviornment);
|
||||
bool getDevices(size_t &numDevicesReturned, ExecutionEnvironment &executionEnviornment) {
|
||||
return getDevicesImpl(numDevicesReturned, executionEnviornment);
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -180,13 +180,13 @@ Drm *Drm::create(int32_t deviceOrdinal) {
|
||||
if (ret != 0) {
|
||||
// turbo patch not present, we are not on custom Kernel, switch to simplified Mocs selection
|
||||
// do this only for GEN9+
|
||||
if (device->pHwInfo->pPlatform->eRenderCoreFamily >= IGFX_GEN9_CORE) {
|
||||
if (device->pHwInfo->pPlatform.eRenderCoreFamily >= IGFX_GEN9_CORE) {
|
||||
drmObject->setSimplifiedMocsTableUsage(true);
|
||||
}
|
||||
printDebugString(DebugManager.flags.PrintDebugMessages.get(), stderr, "%s", "WARNING: Failed to request OCL Turbo Boost\n");
|
||||
}
|
||||
|
||||
if (HwHelper::get(device->pHwInfo->pPlatform->eRenderCoreFamily).getEnableLocalMemory(*device->pHwInfo)) {
|
||||
if (HwHelper::get(device->pHwInfo->pPlatform.eRenderCoreFamily).getEnableLocalMemory(*device->pHwInfo)) {
|
||||
drmObject->queryMemoryInfo();
|
||||
}
|
||||
|
||||
|
||||
@@ -21,22 +21,25 @@
|
||||
#include "runtime/source_level_debugger/source_level_debugger.h"
|
||||
|
||||
namespace NEO {
|
||||
ExecutionEnvironment::ExecutionEnvironment() = default;
|
||||
ExecutionEnvironment::ExecutionEnvironment() {
|
||||
hwInfo = std::make_unique<HardwareInfo>(*platformDevices[0]);
|
||||
};
|
||||
|
||||
ExecutionEnvironment::~ExecutionEnvironment() = default;
|
||||
extern CommandStreamReceiver *createCommandStream(ExecutionEnvironment &executionEnvironment);
|
||||
|
||||
void ExecutionEnvironment::initAubCenter(bool localMemoryEnabled, const std::string &aubFileName, CommandStreamReceiverType csrType) {
|
||||
if (!aubCenter) {
|
||||
aubCenter.reset(new AubCenter(this->hwInfo, localMemoryEnabled, aubFileName, csrType));
|
||||
aubCenter.reset(new AubCenter(hwInfo.get(), localMemoryEnabled, aubFileName, csrType));
|
||||
}
|
||||
}
|
||||
void ExecutionEnvironment::initGmm() {
|
||||
if (!gmmHelper) {
|
||||
gmmHelper.reset(new GmmHelper(this->hwInfo));
|
||||
gmmHelper.reset(new GmmHelper(hwInfo.get()));
|
||||
}
|
||||
}
|
||||
void ExecutionEnvironment::setHwInfo(const HardwareInfo *hwInfo) {
|
||||
this->hwInfo = hwInfo;
|
||||
*this->hwInfo = *hwInfo;
|
||||
}
|
||||
bool ExecutionEnvironment::initializeCommandStreamReceiver(uint32_t deviceIndex, uint32_t deviceCsrIndex) {
|
||||
if (deviceIndex + 1 > commandStreamReceivers.size()) {
|
||||
@@ -53,7 +56,7 @@ bool ExecutionEnvironment::initializeCommandStreamReceiver(uint32_t deviceIndex,
|
||||
if (!commandStreamReceiver) {
|
||||
return false;
|
||||
}
|
||||
if (HwHelper::get(this->hwInfo->pPlatform->eRenderCoreFamily).isPageTableManagerSupported(*this->hwInfo)) {
|
||||
if (HwHelper::get(hwInfo->pPlatform.eRenderCoreFamily).isPageTableManagerSupported(*hwInfo)) {
|
||||
commandStreamReceiver->createPageTableManager();
|
||||
}
|
||||
commandStreamReceiver->setDeviceIndex(deviceIndex);
|
||||
@@ -87,11 +90,11 @@ void ExecutionEnvironment::initializeMemoryManager() {
|
||||
DEBUG_BREAK_IF(!this->memoryManager);
|
||||
}
|
||||
void ExecutionEnvironment::initSourceLevelDebugger() {
|
||||
if (this->hwInfo->capabilityTable.sourceLevelDebuggerSupported) {
|
||||
if (hwInfo->capabilityTable.sourceLevelDebuggerSupported) {
|
||||
sourceLevelDebugger.reset(SourceLevelDebugger::create());
|
||||
}
|
||||
if (sourceLevelDebugger) {
|
||||
bool localMemorySipAvailable = (SipKernelType::DbgCsrLocal == SipKernel::getSipKernelType(this->hwInfo->pPlatform->eRenderCoreFamily, true));
|
||||
bool localMemorySipAvailable = (SipKernelType::DbgCsrLocal == SipKernel::getSipKernelType(hwInfo->pPlatform.eRenderCoreFamily, true));
|
||||
sourceLevelDebugger->initialize(localMemorySipAvailable);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ class ExecutionEnvironment : public ReferenceTrackedObject<ExecutionEnvironment>
|
||||
|
||||
protected:
|
||||
std::unique_ptr<GmmHelper> gmmHelper;
|
||||
const HardwareInfo *hwInfo = nullptr;
|
||||
std::unique_ptr<HardwareInfo> hwInfo;
|
||||
|
||||
public:
|
||||
ExecutionEnvironment();
|
||||
@@ -51,9 +51,8 @@ class ExecutionEnvironment : public ReferenceTrackedObject<ExecutionEnvironment>
|
||||
void initializeMemoryManager();
|
||||
void initSourceLevelDebugger();
|
||||
void setHwInfo(const HardwareInfo *hwInfo);
|
||||
const HardwareInfo *getHardwareInfo() const {
|
||||
return this->hwInfo;
|
||||
}
|
||||
const HardwareInfo *getHardwareInfo() const { return hwInfo.get(); }
|
||||
HardwareInfo *getMutableHardwareInfo() const { return hwInfo.get(); }
|
||||
bool isFullRangeSvm() const {
|
||||
return hwInfo->capabilityTable.gpuAddressSpace == MemoryConstants::max48BitAddress;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ typedef CNLFamily Family;
|
||||
|
||||
template <>
|
||||
void HwHelperHw<Family>::setCapabilityCoherencyFlag(const HardwareInfo *pHwInfo, bool &coherencyFlag) {
|
||||
if (pHwInfo->pPlatform->usRevId < 0x4) {
|
||||
if (pHwInfo->pPlatform.usRevId < 0x4) {
|
||||
coherencyFlag = false;
|
||||
} else {
|
||||
coherencyFlag = true;
|
||||
|
||||
@@ -75,8 +75,8 @@ WorkaroundTable CNL::workaroundTable = {};
|
||||
FeatureTable CNL::featureTable = {};
|
||||
|
||||
void CNL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
|
||||
FeatureTable *pSkuTable = const_cast<FeatureTable *>(hwInfo->pSkuTable);
|
||||
WorkaroundTable *pWaTable = const_cast<WorkaroundTable *>(hwInfo->pWaTable);
|
||||
FeatureTable *pSkuTable = &hwInfo->pSkuTable;
|
||||
WorkaroundTable *pWaTable = &hwInfo->pWaTable;
|
||||
|
||||
pSkuTable->ftrL3IACoherency = true;
|
||||
pSkuTable->ftrGpGpuMidBatchPreempt = true;
|
||||
@@ -107,10 +107,10 @@ void CNL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
|
||||
pWaTable->waReportPerfCountUseGlobalContextID = true;
|
||||
pWaTable->waSamplerCacheFlushBetweenRedescribedSurfaceReads = true;
|
||||
|
||||
if ((1 << hwInfo->pPlatform->usRevId) & 0x3) {
|
||||
if ((1 << hwInfo->pPlatform.usRevId) & 0x3) {
|
||||
pWaTable->waFbcLinearSurfaceStride = true;
|
||||
}
|
||||
if ((1 << hwInfo->pPlatform->usRevId) & 0x1) {
|
||||
if ((1 << hwInfo->pPlatform.usRevId) & 0x1) {
|
||||
pWaTable->waEncryptedEdramOnlyPartials = true;
|
||||
}
|
||||
}
|
||||
@@ -123,7 +123,7 @@ const HardwareInfo CNL_2x5x8::hwInfo = {
|
||||
};
|
||||
GT_SYSTEM_INFO CNL_2x5x8::gtSystemInfo = {0};
|
||||
void CNL_2x5x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 39;
|
||||
gtSysInfo->ThreadCount = 39 * CNL::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 2;
|
||||
@@ -155,7 +155,7 @@ const HardwareInfo CNL_2x4x8::hwInfo = {
|
||||
};
|
||||
GT_SYSTEM_INFO CNL_2x4x8::gtSystemInfo = {0};
|
||||
void CNL_2x4x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 31;
|
||||
gtSysInfo->ThreadCount = 31 * CNL::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 2;
|
||||
@@ -187,7 +187,7 @@ const HardwareInfo CNL_1x3x8::hwInfo = {
|
||||
};
|
||||
GT_SYSTEM_INFO CNL_1x3x8::gtSystemInfo = {0};
|
||||
void CNL_1x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 23;
|
||||
gtSysInfo->ThreadCount = 23 * CNL::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 1;
|
||||
@@ -219,7 +219,7 @@ const HardwareInfo CNL_1x2x8::hwInfo = {
|
||||
};
|
||||
GT_SYSTEM_INFO CNL_1x2x8::gtSystemInfo = {0};
|
||||
void CNL_1x2x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 15;
|
||||
gtSysInfo->ThreadCount = 15 * CNL::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 1;
|
||||
@@ -251,7 +251,7 @@ const HardwareInfo CNL_4x9x8::hwInfo = {
|
||||
};
|
||||
GT_SYSTEM_INFO CNL_4x9x8::gtSystemInfo = {0};
|
||||
void CNL_4x9x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 71;
|
||||
gtSysInfo->ThreadCount = 71 * CNL::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 4;
|
||||
|
||||
@@ -15,7 +15,7 @@ int HwInfoConfigHw<IGFX_CANNONLAKE>::configureHardwareCustom(HardwareInfo *hwInf
|
||||
if (nullptr == osIface) {
|
||||
return 0;
|
||||
}
|
||||
GT_SYSTEM_INFO *pSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *pSysInfo = &hwInfo->pSysInfo;
|
||||
|
||||
if (pSysInfo->SubSliceCount == 9) {
|
||||
pSysInfo->SliceCount = 4;
|
||||
|
||||
@@ -15,7 +15,7 @@ template <>
|
||||
uint32_t PreambleHelper<CNLFamily>::getL3Config(const HardwareInfo &hwInfo, bool useSLM) {
|
||||
uint32_t l3Config = 0;
|
||||
|
||||
switch (hwInfo.pPlatform->eProductFamily) {
|
||||
switch (hwInfo.pPlatform.eProductFamily) {
|
||||
case IGFX_CANNONLAKE:
|
||||
l3Config = getL3ConfigHelper<IGFX_CANNONLAKE>(useSLM);
|
||||
break;
|
||||
@@ -60,7 +60,7 @@ void PreambleHelper<CNLFamily>::addPipeControlBeforeVfeCmd(LinearStream *pComman
|
||||
auto pipeControl = pCommandStream->getSpaceForCmd<PIPE_CONTROL>();
|
||||
*pipeControl = PIPE_CONTROL::sInit();
|
||||
pipeControl->setCommandStreamerStallEnable(true);
|
||||
if (hwInfo->pWaTable->waSendMIFLUSHBeforeVFE) {
|
||||
if (hwInfo->pWaTable.waSendMIFLUSHBeforeVFE) {
|
||||
pipeControl->setRenderTargetCacheFlushEnable(true);
|
||||
pipeControl->setDepthCacheFlushEnable(true);
|
||||
pipeControl->setDcFlushEnable(true);
|
||||
|
||||
@@ -36,7 +36,7 @@ template <>
|
||||
void CommandStreamReceiverHw<Family>::programMediaSampler(LinearStream &stream, DispatchFlags &dispatchFlags) {
|
||||
using PWR_CLK_STATE_REGISTER = Family::PWR_CLK_STATE_REGISTER;
|
||||
|
||||
if (peekHwInfo().pPlatform->eProductFamily == IGFX_ICELAKE_LP) {
|
||||
if (peekHwInfo().pPlatform.eProductFamily == IGFX_ICELAKE_LP) {
|
||||
if (dispatchFlags.mediaSamplerRequired) {
|
||||
if (!lastVmeSubslicesConfig) {
|
||||
auto pc = addPipeControlCmd(stream);
|
||||
@@ -49,13 +49,13 @@ void CommandStreamReceiverHw<Family>::programMediaSampler(LinearStream &stream,
|
||||
pc->setConstantCacheInvalidationEnable(true);
|
||||
pc->setStateCacheInvalidationEnable(true);
|
||||
|
||||
uint32_t numSubslices = peekHwInfo().pSysInfo->SubSliceCount;
|
||||
uint32_t numSubslices = peekHwInfo().pSysInfo.SubSliceCount;
|
||||
uint32_t numSubslicesWithVme = numSubslices / 2; // 1 VME unit per DSS
|
||||
uint32_t numSlicesForPowerGating = 1; // power gating supported only if #Slices = 1
|
||||
|
||||
PWR_CLK_STATE_REGISTER reg = Family::cmdInitPwrClkStateRegister;
|
||||
reg.TheStructure.Common.EUmin = peekHwInfo().pSysInfo->MaxEuPerSubSlice;
|
||||
reg.TheStructure.Common.EUmax = peekHwInfo().pSysInfo->MaxEuPerSubSlice;
|
||||
reg.TheStructure.Common.EUmin = peekHwInfo().pSysInfo.MaxEuPerSubSlice;
|
||||
reg.TheStructure.Common.EUmax = peekHwInfo().pSysInfo.MaxEuPerSubSlice;
|
||||
reg.TheStructure.Common.SSCountEn = 1; // Enable SScount
|
||||
reg.TheStructure.Common.SScount = numSubslicesWithVme;
|
||||
reg.TheStructure.Common.EnableSliceCountRequest = 1; // Enable SliceCountRequest
|
||||
@@ -84,13 +84,13 @@ void CommandStreamReceiverHw<Family>::programMediaSampler(LinearStream &stream,
|
||||
// In Gen11-LP, software programs this register as if GT consists of
|
||||
// 2 slices with 4 subslices in each slice. Hardware maps this to the
|
||||
// LP 1 slice/8-subslice physical layout
|
||||
uint32_t numSubslices = peekHwInfo().pSysInfo->SubSliceCount;
|
||||
uint32_t numSubslices = peekHwInfo().pSysInfo.SubSliceCount;
|
||||
uint32_t numSubslicesMapped = numSubslices / 2;
|
||||
uint32_t numSlicesMapped = peekHwInfo().pSysInfo->SliceCount * 2;
|
||||
uint32_t numSlicesMapped = peekHwInfo().pSysInfo.SliceCount * 2;
|
||||
|
||||
PWR_CLK_STATE_REGISTER reg = Family::cmdInitPwrClkStateRegister;
|
||||
reg.TheStructure.Common.EUmin = peekHwInfo().pSysInfo->MaxEuPerSubSlice;
|
||||
reg.TheStructure.Common.EUmax = peekHwInfo().pSysInfo->MaxEuPerSubSlice;
|
||||
reg.TheStructure.Common.EUmin = peekHwInfo().pSysInfo.MaxEuPerSubSlice;
|
||||
reg.TheStructure.Common.EUmax = peekHwInfo().pSysInfo.MaxEuPerSubSlice;
|
||||
reg.TheStructure.Common.SSCountEn = 1; // Enable SScount
|
||||
reg.TheStructure.Common.SScount = numSubslicesMapped;
|
||||
reg.TheStructure.Common.EnableSliceCountRequest = 1; // Enable SliceCountRequest
|
||||
@@ -107,7 +107,7 @@ void CommandStreamReceiverHw<Family>::programMediaSampler(LinearStream &stream,
|
||||
template <>
|
||||
bool CommandStreamReceiverHw<Family>::detectInitProgrammingFlagsRequired(const DispatchFlags &dispatchFlags) const {
|
||||
bool flag = DebugManager.flags.ForceCsrReprogramming.get();
|
||||
if (peekHwInfo().pPlatform->eProductFamily == IGFX_ICELAKE_LP) {
|
||||
if (peekHwInfo().pPlatform.eProductFamily == IGFX_ICELAKE_LP) {
|
||||
if (!dispatchFlags.mediaSamplerRequired) {
|
||||
if (lastVmeSubslicesConfig) {
|
||||
flag = true;
|
||||
@@ -122,7 +122,7 @@ size_t CommandStreamReceiverHw<Family>::getCmdSizeForMediaSampler(bool mediaSamp
|
||||
typedef typename Family::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM;
|
||||
typedef typename Family::PIPE_CONTROL PIPE_CONTROL;
|
||||
|
||||
if (peekHwInfo().pPlatform->eProductFamily == IGFX_ICELAKE_LP) {
|
||||
if (peekHwInfo().pPlatform.eProductFamily == IGFX_ICELAKE_LP) {
|
||||
if (mediaSamplerRequired) {
|
||||
if (!lastVmeSubslicesConfig) {
|
||||
return sizeof(MI_LOAD_REGISTER_IMM) + 2 * sizeof(PIPE_CONTROL);
|
||||
|
||||
@@ -16,7 +16,7 @@ typedef ICLFamily Family;
|
||||
|
||||
template <>
|
||||
uint32_t HwHelperHw<Family>::getComputeUnitsUsedForScratch(const HardwareInfo *pHwInfo) const {
|
||||
return pHwInfo->pSysInfo->MaxSubSlicesSupported * pHwInfo->pSysInfo->MaxEuPerSubSlice * 8;
|
||||
return pHwInfo->pSysInfo.MaxSubSlicesSupported * pHwInfo->pSysInfo.MaxEuPerSubSlice * 8;
|
||||
}
|
||||
|
||||
template class AubHelperHw<Family>;
|
||||
|
||||
@@ -72,8 +72,8 @@ WorkaroundTable ICLLP::workaroundTable = {};
|
||||
FeatureTable ICLLP::featureTable = {};
|
||||
|
||||
void ICLLP::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
|
||||
FeatureTable *pSkuTable = const_cast<FeatureTable *>(hwInfo->pSkuTable);
|
||||
WorkaroundTable *pWaTable = const_cast<WorkaroundTable *>(hwInfo->pWaTable);
|
||||
FeatureTable *pSkuTable = &hwInfo->pSkuTable;
|
||||
WorkaroundTable *pWaTable = &hwInfo->pWaTable;
|
||||
|
||||
pSkuTable->ftrL3IACoherency = true;
|
||||
pSkuTable->ftrPPGTT = true;
|
||||
@@ -116,7 +116,7 @@ const HardwareInfo ICLLP_1x8x8::hwInfo = {
|
||||
|
||||
GT_SYSTEM_INFO ICLLP_1x8x8::gtSystemInfo = {0};
|
||||
void ICLLP_1x8x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 63;
|
||||
gtSysInfo->ThreadCount = 63 * ICLLP::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 1;
|
||||
@@ -150,7 +150,7 @@ const HardwareInfo ICLLP_1x4x8::hwInfo = {
|
||||
|
||||
GT_SYSTEM_INFO ICLLP_1x4x8::gtSystemInfo = {0};
|
||||
void ICLLP_1x4x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 31;
|
||||
gtSysInfo->ThreadCount = 31 * ICLLP::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 1;
|
||||
@@ -183,7 +183,7 @@ const HardwareInfo ICLLP_1x6x8::hwInfo = {
|
||||
|
||||
GT_SYSTEM_INFO ICLLP_1x6x8::gtSystemInfo = {0};
|
||||
void ICLLP_1x6x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 47;
|
||||
gtSysInfo->ThreadCount = 47 * ICLLP::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 1;
|
||||
@@ -216,7 +216,7 @@ const HardwareInfo ICLLP_1x1x8::hwInfo = {
|
||||
};
|
||||
GT_SYSTEM_INFO ICLLP_1x1x8::gtSystemInfo = {0};
|
||||
void ICLLP_1x1x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 8;
|
||||
gtSysInfo->ThreadCount = 8 * ICLLP::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 1;
|
||||
|
||||
@@ -71,8 +71,8 @@ WorkaroundTable LKF::workaroundTable = {};
|
||||
FeatureTable LKF::featureTable = {};
|
||||
|
||||
void LKF::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
|
||||
FeatureTable *pSkuTable = const_cast<FeatureTable *>(hwInfo->pSkuTable);
|
||||
WorkaroundTable *pWaTable = const_cast<WorkaroundTable *>(hwInfo->pWaTable);
|
||||
FeatureTable *pSkuTable = &hwInfo->pSkuTable;
|
||||
WorkaroundTable *pWaTable = &hwInfo->pWaTable;
|
||||
|
||||
pSkuTable->ftrL3IACoherency = true;
|
||||
pSkuTable->ftrPPGTT = true;
|
||||
@@ -114,7 +114,7 @@ const HardwareInfo LKF_1x8x8::hwInfo = {
|
||||
};
|
||||
GT_SYSTEM_INFO LKF_1x8x8::gtSystemInfo = {0};
|
||||
void LKF_1x8x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 64;
|
||||
gtSysInfo->ThreadCount = 64 * LKF::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 1;
|
||||
|
||||
@@ -16,7 +16,7 @@ int HwInfoConfigHw<IGFX_ICELAKE_LP>::configureHardwareCustom(HardwareInfo *hwInf
|
||||
return 0;
|
||||
}
|
||||
|
||||
GT_SYSTEM_INFO *pSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *pSysInfo = &hwInfo->pSysInfo;
|
||||
|
||||
pSysInfo->SliceCount = 1;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ int HwInfoConfigHw<IGFX_LAKEFIELD>::configureHardwareCustom(HardwareInfo *hwInfo
|
||||
return 0;
|
||||
}
|
||||
|
||||
GT_SYSTEM_INFO *pSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *pSysInfo = &hwInfo->pSysInfo;
|
||||
|
||||
pSysInfo->SliceCount = 1;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ template <>
|
||||
uint32_t PreambleHelper<ICLFamily>::getL3Config(const HardwareInfo &hwInfo, bool useSLM) {
|
||||
uint32_t l3Config = 0;
|
||||
|
||||
switch (hwInfo.pPlatform->eProductFamily) {
|
||||
switch (hwInfo.pPlatform.eProductFamily) {
|
||||
case IGFX_ICELAKE_LP:
|
||||
l3Config = getL3ConfigHelper<IGFX_ICELAKE_LP>(useSLM);
|
||||
break;
|
||||
@@ -46,7 +46,7 @@ void PreambleHelper<ICLFamily>::addPipeControlBeforeVfeCmd(LinearStream *pComman
|
||||
auto pipeControl = pCommandStream->getSpaceForCmd<PIPE_CONTROL>();
|
||||
*pipeControl = ICLFamily::cmdInitPipeControl;
|
||||
pipeControl->setCommandStreamerStallEnable(true);
|
||||
if (hwInfo->pWaTable->waSendMIFLUSHBeforeVFE) {
|
||||
if (hwInfo->pWaTable.waSendMIFLUSHBeforeVFE) {
|
||||
pipeControl->setRenderTargetCacheFlushEnable(true);
|
||||
pipeControl->setDepthCacheFlushEnable(true);
|
||||
pipeControl->setDcFlushEnable(true);
|
||||
|
||||
@@ -76,8 +76,8 @@ WorkaroundTable BDW::workaroundTable = {};
|
||||
FeatureTable BDW::featureTable = {};
|
||||
|
||||
void BDW::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
|
||||
FeatureTable *pSkuTable = const_cast<FeatureTable *>(hwInfo->pSkuTable);
|
||||
WorkaroundTable *pWaTable = const_cast<WorkaroundTable *>(hwInfo->pWaTable);
|
||||
FeatureTable *pSkuTable = &hwInfo->pSkuTable;
|
||||
WorkaroundTable *pWaTable = &hwInfo->pWaTable;
|
||||
|
||||
pSkuTable->ftrL3IACoherency = true;
|
||||
pSkuTable->ftrPPGTT = true;
|
||||
@@ -106,7 +106,7 @@ const HardwareInfo BDW_1x2x6::hwInfo = {
|
||||
|
||||
GT_SYSTEM_INFO BDW_1x2x6::gtSystemInfo = {0};
|
||||
void BDW_1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 12;
|
||||
gtSysInfo->ThreadCount = 12 * BDW::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 1;
|
||||
@@ -139,7 +139,7 @@ const HardwareInfo BDW_1x3x6::hwInfo = {
|
||||
};
|
||||
GT_SYSTEM_INFO BDW_1x3x6::gtSystemInfo = {0};
|
||||
void BDW_1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 18;
|
||||
gtSysInfo->ThreadCount = 18 * BDW::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 1;
|
||||
@@ -172,7 +172,7 @@ const HardwareInfo BDW_1x3x8::hwInfo = {
|
||||
};
|
||||
GT_SYSTEM_INFO BDW_1x3x8::gtSystemInfo = {0};
|
||||
void BDW_1x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 23;
|
||||
gtSysInfo->ThreadCount = 23 * BDW::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 1;
|
||||
@@ -205,7 +205,7 @@ const HardwareInfo BDW_2x3x8::hwInfo = {
|
||||
};
|
||||
GT_SYSTEM_INFO BDW_2x3x8::gtSystemInfo = {0};
|
||||
void BDW_2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 47;
|
||||
gtSysInfo->ThreadCount = 47 * BDW::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 2;
|
||||
|
||||
@@ -15,7 +15,7 @@ int HwInfoConfigHw<IGFX_BROADWELL>::configureHardwareCustom(HardwareInfo *hwInfo
|
||||
if (nullptr == osIface) {
|
||||
return 0;
|
||||
}
|
||||
GT_SYSTEM_INFO *pSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *pSysInfo = &hwInfo->pSysInfo;
|
||||
|
||||
// There is no interface to read total slice count from drm/i915, so we
|
||||
// derive this from the number of EUs and subslices.
|
||||
@@ -26,8 +26,8 @@ int HwInfoConfigHw<IGFX_BROADWELL>::configureHardwareCustom(HardwareInfo *hwInfo
|
||||
pSysInfo->SliceCount = 1;
|
||||
}
|
||||
|
||||
if (hwInfo->pPlatform->usDeviceID == IBDW_GT3_HALO_MOBL_DEVICE_F0_ID ||
|
||||
hwInfo->pPlatform->usDeviceID == IBDW_GT3_SERV_DEVICE_F0_ID) {
|
||||
if (hwInfo->pPlatform.usDeviceID == IBDW_GT3_HALO_MOBL_DEVICE_F0_ID ||
|
||||
hwInfo->pPlatform.usDeviceID == IBDW_GT3_SERV_DEVICE_F0_ID) {
|
||||
pSysInfo->EdramSizeInKb = 128 * 1024;
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -21,7 +21,7 @@ template <>
|
||||
uint32_t PreambleHelper<BDWFamily>::getL3Config(const HardwareInfo &hwInfo, bool useSLM) {
|
||||
uint32_t l3Config = 0;
|
||||
|
||||
switch (hwInfo.pPlatform->eProductFamily) {
|
||||
switch (hwInfo.pPlatform.eProductFamily) {
|
||||
case IGFX_BROADWELL:
|
||||
l3Config = getL3ConfigHelper<IGFX_BROADWELL>(useSLM);
|
||||
break;
|
||||
|
||||
@@ -73,9 +73,9 @@ WorkaroundTable BXT::workaroundTable = {};
|
||||
FeatureTable BXT::featureTable = {};
|
||||
|
||||
void BXT::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
|
||||
PLATFORM *pPlatform = const_cast<PLATFORM *>(hwInfo->pPlatform);
|
||||
FeatureTable *pSkuTable = const_cast<FeatureTable *>(hwInfo->pSkuTable);
|
||||
WorkaroundTable *pWaTable = const_cast<WorkaroundTable *>(hwInfo->pWaTable);
|
||||
PLATFORM *pPlatform = &hwInfo->pPlatform;
|
||||
FeatureTable *pSkuTable = &hwInfo->pSkuTable;
|
||||
WorkaroundTable *pWaTable = &hwInfo->pWaTable;
|
||||
|
||||
pSkuTable->ftrGpGpuMidBatchPreempt = true;
|
||||
pSkuTable->ftrGpGpuThreadGroupLevelPreempt = true;
|
||||
@@ -123,7 +123,7 @@ const HardwareInfo BXT_1x2x6::hwInfo = {
|
||||
};
|
||||
GT_SYSTEM_INFO BXT_1x2x6::gtSystemInfo = {0};
|
||||
void BXT_1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 12;
|
||||
gtSysInfo->ThreadCount = 12 * BXT::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 1;
|
||||
@@ -156,7 +156,7 @@ const HardwareInfo BXT_1x3x6::hwInfo = {
|
||||
};
|
||||
GT_SYSTEM_INFO BXT_1x3x6::gtSystemInfo = {0};
|
||||
void BXT_1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 18;
|
||||
gtSysInfo->ThreadCount = 18 * BXT::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 1;
|
||||
|
||||
@@ -68,8 +68,8 @@ WorkaroundTable CFL::workaroundTable = {};
|
||||
FeatureTable CFL::featureTable = {};
|
||||
|
||||
void CFL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
|
||||
FeatureTable *pSkuTable = const_cast<FeatureTable *>(hwInfo->pSkuTable);
|
||||
WorkaroundTable *pWaTable = const_cast<WorkaroundTable *>(hwInfo->pWaTable);
|
||||
FeatureTable *pSkuTable = &hwInfo->pSkuTable;
|
||||
WorkaroundTable *pWaTable = &hwInfo->pWaTable;
|
||||
|
||||
pSkuTable->ftrGpGpuMidBatchPreempt = true;
|
||||
pSkuTable->ftrGpGpuThreadGroupLevelPreempt = true;
|
||||
@@ -111,7 +111,7 @@ const HardwareInfo CFL_1x2x6::hwInfo = {
|
||||
};
|
||||
GT_SYSTEM_INFO CFL_1x2x6::gtSystemInfo = {0};
|
||||
void CFL_1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 11;
|
||||
gtSysInfo->ThreadCount = 11 * CFL::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 1;
|
||||
@@ -144,7 +144,7 @@ const HardwareInfo CFL_1x3x6::hwInfo = {
|
||||
};
|
||||
GT_SYSTEM_INFO CFL_1x3x6::gtSystemInfo = {0};
|
||||
void CFL_1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 17;
|
||||
gtSysInfo->ThreadCount = 17 * CFL::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 1;
|
||||
@@ -177,7 +177,7 @@ const HardwareInfo CFL_1x3x8::hwInfo = {
|
||||
};
|
||||
GT_SYSTEM_INFO CFL_1x3x8::gtSystemInfo = {0};
|
||||
void CFL_1x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 23;
|
||||
gtSysInfo->ThreadCount = 23 * CFL::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 1;
|
||||
@@ -210,7 +210,7 @@ const HardwareInfo CFL_2x3x8::hwInfo = {
|
||||
};
|
||||
GT_SYSTEM_INFO CFL_2x3x8::gtSystemInfo = {0};
|
||||
void CFL_2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 47;
|
||||
gtSysInfo->ThreadCount = 47 * CFL::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 2;
|
||||
@@ -243,7 +243,7 @@ const HardwareInfo CFL_3x3x8::hwInfo = {
|
||||
};
|
||||
GT_SYSTEM_INFO CFL_3x3x8::gtSystemInfo = {0};
|
||||
void CFL_3x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 71;
|
||||
gtSysInfo->ThreadCount = 71 * CFL::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 3;
|
||||
|
||||
@@ -68,8 +68,8 @@ WorkaroundTable GLK::workaroundTable = {};
|
||||
FeatureTable GLK::featureTable = {};
|
||||
|
||||
void GLK::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
|
||||
FeatureTable *pSkuTable = const_cast<FeatureTable *>(hwInfo->pSkuTable);
|
||||
WorkaroundTable *pWaTable = const_cast<WorkaroundTable *>(hwInfo->pWaTable);
|
||||
FeatureTable *pSkuTable = &hwInfo->pSkuTable;
|
||||
WorkaroundTable *pWaTable = &hwInfo->pWaTable;
|
||||
|
||||
pSkuTable->ftrGpGpuMidBatchPreempt = true;
|
||||
pSkuTable->ftrGpGpuThreadGroupLevelPreempt = true;
|
||||
@@ -111,7 +111,7 @@ const HardwareInfo GLK_1x3x6::hwInfo = {
|
||||
|
||||
GT_SYSTEM_INFO GLK_1x3x6::gtSystemInfo = {0};
|
||||
void GLK_1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 18;
|
||||
gtSysInfo->ThreadCount = 18 * GLK::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 1;
|
||||
@@ -144,7 +144,7 @@ const HardwareInfo GLK_1x2x6::hwInfo = {
|
||||
};
|
||||
GT_SYSTEM_INFO GLK_1x2x6::gtSystemInfo = {0};
|
||||
void GLK_1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 12;
|
||||
gtSysInfo->ThreadCount = 12 * GLK::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 1;
|
||||
|
||||
@@ -68,9 +68,9 @@ WorkaroundTable KBL::workaroundTable = {};
|
||||
FeatureTable KBL::featureTable = {};
|
||||
|
||||
void KBL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
|
||||
PLATFORM *pPlatform = const_cast<PLATFORM *>(hwInfo->pPlatform);
|
||||
FeatureTable *pSkuTable = const_cast<FeatureTable *>(hwInfo->pSkuTable);
|
||||
WorkaroundTable *pWaTable = const_cast<WorkaroundTable *>(hwInfo->pWaTable);
|
||||
PLATFORM *pPlatform = &hwInfo->pPlatform;
|
||||
FeatureTable *pSkuTable = &hwInfo->pSkuTable;
|
||||
WorkaroundTable *pWaTable = &hwInfo->pWaTable;
|
||||
|
||||
pSkuTable->ftrGpGpuMidBatchPreempt = true;
|
||||
pSkuTable->ftrGpGpuThreadGroupLevelPreempt = true;
|
||||
@@ -120,7 +120,7 @@ const HardwareInfo KBL_1x2x6::hwInfo = {
|
||||
};
|
||||
GT_SYSTEM_INFO KBL_1x2x6::gtSystemInfo = {0};
|
||||
void KBL_1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 11;
|
||||
gtSysInfo->ThreadCount = 11 * KBL::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 1;
|
||||
@@ -154,7 +154,7 @@ const HardwareInfo KBL_1x3x6::hwInfo = {
|
||||
|
||||
GT_SYSTEM_INFO KBL_1x3x6::gtSystemInfo = {0};
|
||||
void KBL_1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 17;
|
||||
gtSysInfo->ThreadCount = 17 * KBL::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 1;
|
||||
@@ -187,7 +187,7 @@ const HardwareInfo KBL_1x3x8::hwInfo = {
|
||||
};
|
||||
GT_SYSTEM_INFO KBL_1x3x8::gtSystemInfo = {0};
|
||||
void KBL_1x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 23;
|
||||
gtSysInfo->ThreadCount = 23 * KBL::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 1;
|
||||
@@ -220,7 +220,7 @@ const HardwareInfo KBL_2x3x8::hwInfo = {
|
||||
};
|
||||
GT_SYSTEM_INFO KBL_2x3x8::gtSystemInfo = {0};
|
||||
void KBL_2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 47;
|
||||
gtSysInfo->ThreadCount = 47 * KBL::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 2;
|
||||
@@ -253,7 +253,7 @@ const HardwareInfo KBL_3x3x8::hwInfo = {
|
||||
};
|
||||
GT_SYSTEM_INFO KBL_3x3x8::gtSystemInfo = {0};
|
||||
void KBL_3x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 71;
|
||||
gtSysInfo->ThreadCount = 71 * KBL::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 3;
|
||||
|
||||
@@ -74,8 +74,8 @@ const RuntimeCapabilityTable SKL::capabilityTable{
|
||||
WorkaroundTable SKL::workaroundTable = {};
|
||||
FeatureTable SKL::featureTable = {};
|
||||
void SKL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
|
||||
FeatureTable *pSkuTable = const_cast<FeatureTable *>(hwInfo->pSkuTable);
|
||||
WorkaroundTable *pWaTable = const_cast<WorkaroundTable *>(hwInfo->pWaTable);
|
||||
FeatureTable *pSkuTable = &hwInfo->pSkuTable;
|
||||
WorkaroundTable *pWaTable = &hwInfo->pWaTable;
|
||||
|
||||
pSkuTable->ftrGpGpuMidBatchPreempt = true;
|
||||
pSkuTable->ftrGpGpuThreadGroupLevelPreempt = true;
|
||||
@@ -113,14 +113,14 @@ void SKL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
|
||||
pWaTable->waForcePcBbFullCfgRestore = true;
|
||||
pWaTable->waSamplerCacheFlushBetweenRedescribedSurfaceReads = true;
|
||||
|
||||
if ((1 << hwInfo->pPlatform->usRevId) & 0x0eu) {
|
||||
if ((1 << hwInfo->pPlatform.usRevId) & 0x0eu) {
|
||||
pWaTable->waCompressedResourceRequiresConstVA21 = true;
|
||||
}
|
||||
if ((1 << hwInfo->pPlatform->usRevId) & 0x0fu) {
|
||||
if ((1 << hwInfo->pPlatform.usRevId) & 0x0fu) {
|
||||
pWaTable->waDisablePerCtxtPreemptionGranularityControl = true;
|
||||
pWaTable->waModifyVFEStateAfterGPGPUPreemption = true;
|
||||
}
|
||||
if ((1 << hwInfo->pPlatform->usRevId) & 0x3f) {
|
||||
if ((1 << hwInfo->pPlatform.usRevId) & 0x3f) {
|
||||
pWaTable->waCSRUncachable = true;
|
||||
}
|
||||
}
|
||||
@@ -133,7 +133,7 @@ const HardwareInfo SKL_1x2x6::hwInfo = {
|
||||
};
|
||||
GT_SYSTEM_INFO SKL_1x2x6::gtSystemInfo = {0};
|
||||
void SKL_1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 11;
|
||||
gtSysInfo->ThreadCount = 11 * SKL::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 1;
|
||||
@@ -166,7 +166,7 @@ const HardwareInfo SKL_1x3x6::hwInfo = {
|
||||
};
|
||||
GT_SYSTEM_INFO SKL_1x3x6::gtSystemInfo = {0};
|
||||
void SKL_1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 17;
|
||||
gtSysInfo->ThreadCount = 17 * SKL::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 1;
|
||||
@@ -199,7 +199,7 @@ const HardwareInfo SKL_1x3x8::hwInfo = {
|
||||
};
|
||||
GT_SYSTEM_INFO SKL_1x3x8::gtSystemInfo = {0};
|
||||
void SKL_1x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 23;
|
||||
gtSysInfo->ThreadCount = 23 * SKL::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 1;
|
||||
@@ -232,7 +232,7 @@ const HardwareInfo SKL_2x3x8::hwInfo = {
|
||||
};
|
||||
GT_SYSTEM_INFO SKL_2x3x8::gtSystemInfo = {0};
|
||||
void SKL_2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 47;
|
||||
gtSysInfo->ThreadCount = 47 * SKL::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 2;
|
||||
@@ -265,7 +265,7 @@ const HardwareInfo SKL_3x3x8::hwInfo = {
|
||||
};
|
||||
GT_SYSTEM_INFO SKL_3x3x8::gtSystemInfo = {0};
|
||||
void SKL_3x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->pSysInfo;
|
||||
gtSysInfo->EUCount = 71;
|
||||
gtSysInfo->ThreadCount = 71 * SKL::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 3;
|
||||
|
||||
@@ -19,8 +19,8 @@ int HwInfoConfigHw<IGFX_BROXTON>::configureHardwareCustom(HardwareInfo *hwInfo,
|
||||
}
|
||||
|
||||
Drm *drm = osIface->get()->getDrm();
|
||||
FeatureTable *pSkuTable = const_cast<FeatureTable *>(hwInfo->pSkuTable);
|
||||
GT_SYSTEM_INFO *pSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
FeatureTable *pSkuTable = &hwInfo->pSkuTable;
|
||||
GT_SYSTEM_INFO *pSysInfo = &hwInfo->pSysInfo;
|
||||
|
||||
pSysInfo->SliceCount = 1;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ int HwInfoConfigHw<IGFX_COFFEELAKE>::configureHardwareCustom(HardwareInfo *hwInf
|
||||
if (nullptr == osIface) {
|
||||
return 0;
|
||||
}
|
||||
GT_SYSTEM_INFO *pSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *pSysInfo = &hwInfo->pSysInfo;
|
||||
|
||||
if (pSysInfo->SubSliceCount > 3) {
|
||||
pSysInfo->SliceCount = 2;
|
||||
@@ -26,8 +26,8 @@ int HwInfoConfigHw<IGFX_COFFEELAKE>::configureHardwareCustom(HardwareInfo *hwInf
|
||||
pSysInfo->VEBoxInfo.Instances.Bits.VEBox0Enabled = true;
|
||||
pSysInfo->VEBoxInfo.IsValid = true;
|
||||
|
||||
if (hwInfo->pPlatform->usDeviceID == ICFL_GT3_ULT_28W_DEVICE_F0_ID ||
|
||||
hwInfo->pPlatform->usDeviceID == ICFL_GT3_ULT_15W_DEVICE_F0_ID) {
|
||||
if (hwInfo->pPlatform.usDeviceID == ICFL_GT3_ULT_28W_DEVICE_F0_ID ||
|
||||
hwInfo->pPlatform.usDeviceID == ICFL_GT3_ULT_15W_DEVICE_F0_ID) {
|
||||
pSysInfo->EdramSizeInKb = 64 * 1024;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ int HwInfoConfigHw<IGFX_GEMINILAKE>::configureHardwareCustom(HardwareInfo *hwInf
|
||||
}
|
||||
|
||||
Drm *drm = osIface->get()->getDrm();
|
||||
FeatureTable *pSkuTable = const_cast<FeatureTable *>(hwInfo->pSkuTable);
|
||||
GT_SYSTEM_INFO *pSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
FeatureTable *pSkuTable = &hwInfo->pSkuTable;
|
||||
GT_SYSTEM_INFO *pSysInfo = &hwInfo->pSysInfo;
|
||||
|
||||
pSysInfo->VEBoxInfo.Instances.Bits.VEBox0Enabled = 1;
|
||||
pSysInfo->VEBoxInfo.IsValid = true;
|
||||
|
||||
@@ -15,7 +15,7 @@ int HwInfoConfigHw<IGFX_KABYLAKE>::configureHardwareCustom(HardwareInfo *hwInfo,
|
||||
if (nullptr == osIface) {
|
||||
return 0;
|
||||
}
|
||||
GT_SYSTEM_INFO *pSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *pSysInfo = &hwInfo->pSysInfo;
|
||||
|
||||
if (pSysInfo->SubSliceCount > 3) {
|
||||
pSysInfo->SliceCount = 2;
|
||||
@@ -26,8 +26,8 @@ int HwInfoConfigHw<IGFX_KABYLAKE>::configureHardwareCustom(HardwareInfo *hwInfo,
|
||||
pSysInfo->VEBoxInfo.Instances.Bits.VEBox0Enabled = 1;
|
||||
pSysInfo->VEBoxInfo.IsValid = true;
|
||||
|
||||
if (hwInfo->pPlatform->usDeviceID == IKBL_GT3_28W_ULT_DEVICE_F0_ID ||
|
||||
hwInfo->pPlatform->usDeviceID == IKBL_GT3_15W_ULT_DEVICE_F0_ID) {
|
||||
if (hwInfo->pPlatform.usDeviceID == IKBL_GT3_28W_ULT_DEVICE_F0_ID ||
|
||||
hwInfo->pPlatform.usDeviceID == IKBL_GT3_15W_ULT_DEVICE_F0_ID) {
|
||||
pSysInfo->EdramSizeInKb = 64 * 1024;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ int HwInfoConfigHw<IGFX_SKYLAKE>::configureHardwareCustom(HardwareInfo *hwInfo,
|
||||
if (nullptr == osIface) {
|
||||
return 0;
|
||||
}
|
||||
GT_SYSTEM_INFO *pSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *pSysInfo = &hwInfo->pSysInfo;
|
||||
|
||||
if (pSysInfo->SubSliceCount > 3) {
|
||||
pSysInfo->SliceCount = 2;
|
||||
@@ -29,14 +29,14 @@ int HwInfoConfigHw<IGFX_SKYLAKE>::configureHardwareCustom(HardwareInfo *hwInfo,
|
||||
pSysInfo->VEBoxInfo.IsValid = true;
|
||||
pSysInfo->VDBoxInfo.IsValid = true;
|
||||
|
||||
if (hwInfo->pPlatform->usDeviceID == ISKL_GT3e_ULT_DEVICE_F0_ID_540 ||
|
||||
hwInfo->pPlatform->usDeviceID == ISKL_GT3e_ULT_DEVICE_F0_ID_550 ||
|
||||
hwInfo->pPlatform->usDeviceID == ISKL_GT3_MEDIA_SERV_DEVICE_F0_ID) {
|
||||
if (hwInfo->pPlatform.usDeviceID == ISKL_GT3e_ULT_DEVICE_F0_ID_540 ||
|
||||
hwInfo->pPlatform.usDeviceID == ISKL_GT3e_ULT_DEVICE_F0_ID_550 ||
|
||||
hwInfo->pPlatform.usDeviceID == ISKL_GT3_MEDIA_SERV_DEVICE_F0_ID) {
|
||||
pSysInfo->EdramSizeInKb = 64 * 1024;
|
||||
}
|
||||
|
||||
if (hwInfo->pPlatform->usDeviceID == ISKL_GT4_HALO_MOBL_DEVICE_F0_ID ||
|
||||
hwInfo->pPlatform->usDeviceID == ISKL_GT4_WRK_DEVICE_F0_ID) {
|
||||
if (hwInfo->pPlatform.usDeviceID == ISKL_GT4_HALO_MOBL_DEVICE_F0_ID ||
|
||||
hwInfo->pPlatform.usDeviceID == ISKL_GT4_WRK_DEVICE_F0_ID) {
|
||||
pSysInfo->EdramSizeInKb = 128 * 1024;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ template <>
|
||||
uint32_t PreambleHelper<SKLFamily>::getL3Config(const HardwareInfo &hwInfo, bool useSLM) {
|
||||
uint32_t l3Config = 0;
|
||||
|
||||
switch (hwInfo.pPlatform->eProductFamily) {
|
||||
switch (hwInfo.pPlatform.eProductFamily) {
|
||||
case IGFX_SKYLAKE:
|
||||
l3Config = getL3ConfigHelper<IGFX_SKYLAKE>(useSLM);
|
||||
break;
|
||||
@@ -45,7 +45,7 @@ void PreambleHelper<SKLFamily>::addPipeControlBeforeVfeCmd(LinearStream *pComman
|
||||
auto pipeControl = pCommandStream->getSpaceForCmd<PIPE_CONTROL>();
|
||||
*pipeControl = SKLFamily::cmdInitPipeControl;
|
||||
pipeControl->setCommandStreamerStallEnable(true);
|
||||
if (hwInfo->pWaTable->waSendMIFLUSHBeforeVFE) {
|
||||
if (hwInfo->pWaTable.waSendMIFLUSHBeforeVFE) {
|
||||
pipeControl->setRenderTargetCacheFlushEnable(true);
|
||||
pipeControl->setDepthCacheFlushEnable(true);
|
||||
pipeControl->setDcFlushEnable(true);
|
||||
|
||||
@@ -131,7 +131,7 @@ void Gmm::setupImageResourceParams(ImageInfo &imgInfo) {
|
||||
}
|
||||
|
||||
applyAuxFlagsForImage(imgInfo);
|
||||
auto &hwHelper = HwHelper::get(GmmHelper::getInstance()->getHardwareInfo()->pPlatform->eRenderCoreFamily);
|
||||
auto &hwHelper = HwHelper::get(GmmHelper::getInstance()->getHardwareInfo()->pPlatform.eRenderCoreFamily);
|
||||
if (!hwHelper.supportsYTiling() && resourceParams.Flags.Info.TiledY == 1) {
|
||||
resourceParams.Flags.Info.Linear = 0;
|
||||
resourceParams.Flags.Info.TiledY = 0;
|
||||
@@ -194,7 +194,7 @@ void Gmm::queryImageParams(ImageInfo &imgInfo) {
|
||||
}
|
||||
|
||||
uint32_t Gmm::queryQPitch(GMM_RESOURCE_TYPE resType) {
|
||||
if (GmmHelper::getInstance()->getHardwareInfo()->pPlatform->eRenderCoreFamily == IGFX_GEN8_CORE && resType == GMM_RESOURCE_TYPE::RESOURCE_3D) {
|
||||
if (GmmHelper::getInstance()->getHardwareInfo()->pPlatform.eRenderCoreFamily == IGFX_GEN8_CORE && resType == GMM_RESOURCE_TYPE::RESOURCE_3D) {
|
||||
return 0;
|
||||
}
|
||||
return gmmResourceInfo->getQPitch();
|
||||
|
||||
@@ -143,7 +143,7 @@ GMM_YUV_PLANE GmmHelper::convertPlane(OCLPlane oclPlane) {
|
||||
return GMM_NO_PLANE;
|
||||
}
|
||||
GmmHelper::GmmHelper(const HardwareInfo *pHwInfo) : hwInfo(pHwInfo) {
|
||||
initContext(pHwInfo->pPlatform, pHwInfo->pSkuTable, pHwInfo->pWaTable, pHwInfo->pSysInfo);
|
||||
initContext(&pHwInfo->pPlatform, &pHwInfo->pSkuTable, &pHwInfo->pWaTable, &pHwInfo->pSysInfo);
|
||||
}
|
||||
GmmHelper::~GmmHelper() {
|
||||
gmmEntries.pfnDestroySingletonContext();
|
||||
|
||||
@@ -43,10 +43,10 @@ void gtpinNotifyContextCreate(cl_context context) {
|
||||
platform_info_t gtpinPlatformInfo;
|
||||
auto pPlatform = platform();
|
||||
auto pDevice = pPlatform->getDevice(0);
|
||||
GFXCORE_FAMILY genFamily = pDevice->getHardwareInfo().pPlatform->eRenderCoreFamily;
|
||||
GFXCORE_FAMILY genFamily = pDevice->getHardwareInfo().pPlatform.eRenderCoreFamily;
|
||||
GTPinHwHelper >pinHelper = GTPinHwHelper::get(genFamily);
|
||||
gtpinPlatformInfo.gen_version = (gtpin::GTPIN_GEN_VERSION)gtpinHelper.getGenVersion();
|
||||
gtpinPlatformInfo.device_id = static_cast<uint32_t>(pDevice->getHardwareInfo().pPlatform->usDeviceID);
|
||||
gtpinPlatformInfo.device_id = static_cast<uint32_t>(pDevice->getHardwareInfo().pPlatform.usDeviceID);
|
||||
(*GTPinCallbacks.onContextCreate)((context_handle_t)context, >pinPlatformInfo, &pIgcInit);
|
||||
}
|
||||
}
|
||||
@@ -64,7 +64,7 @@ void gtpinNotifyKernelCreate(cl_kernel kernel) {
|
||||
// Enlarge local copy of SSH by 1 SS
|
||||
auto pPlatform = platform();
|
||||
auto pDevice = pPlatform->getDevice(0);
|
||||
GFXCORE_FAMILY genFamily = pDevice->getHardwareInfo().pPlatform->eRenderCoreFamily;
|
||||
GFXCORE_FAMILY genFamily = pDevice->getHardwareInfo().pPlatform.eRenderCoreFamily;
|
||||
GTPinHwHelper >pinHelper = GTPinHwHelper::get(genFamily);
|
||||
if (!gtpinHelper.addSurfaceState(pKernel)) {
|
||||
// Kernel with no SSH or Kernel EM, not supported
|
||||
@@ -132,7 +132,7 @@ void gtpinNotifyKernelSubmit(cl_kernel kernel, void *pCmdQueue) {
|
||||
}
|
||||
auto pPlatform = platform();
|
||||
auto pDevice = pPlatform->getDevice(0);
|
||||
GFXCORE_FAMILY genFamily = pDevice->getHardwareInfo().pPlatform->eRenderCoreFamily;
|
||||
GFXCORE_FAMILY genFamily = pDevice->getHardwareInfo().pPlatform.eRenderCoreFamily;
|
||||
GTPinHwHelper >pinHelper = GTPinHwHelper::get(genFamily);
|
||||
size_t gtpinBTI = pKernel->getNumberOfBindingTableStates() - 1;
|
||||
void *pSurfaceState = gtpinHelper.getSurfaceState(pKernel, gtpinBTI);
|
||||
|
||||
@@ -50,8 +50,8 @@ void HwHelperHw<Family>::setupHardwareCapabilities(HardwareCapabilities *caps, c
|
||||
|
||||
template <typename Family>
|
||||
uint32_t HwHelperHw<Family>::getComputeUnitsUsedForScratch(const HardwareInfo *pHwInfo) const {
|
||||
return pHwInfo->pSysInfo->MaxSubSlicesSupported * pHwInfo->pSysInfo->MaxEuPerSubSlice *
|
||||
pHwInfo->pSysInfo->ThreadCount / pHwInfo->pSysInfo->EUCount;
|
||||
return pHwInfo->pSysInfo.MaxSubSlicesSupported * pHwInfo->pSysInfo.MaxEuPerSubSlice *
|
||||
pHwInfo->pSysInfo.ThreadCount / pHwInfo->pSysInfo.EUCount;
|
||||
}
|
||||
|
||||
template <typename Family>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
namespace NEO {
|
||||
HardwareInfo::HardwareInfo(const PLATFORM *platform, const FeatureTable *skuTable, const WorkaroundTable *waTable,
|
||||
const GT_SYSTEM_INFO *sysInfo, const RuntimeCapabilityTable &capabilityTable)
|
||||
: pPlatform(platform), pSkuTable(skuTable), pWaTable(waTable), pSysInfo(sysInfo), capabilityTable(capabilityTable) {
|
||||
: pPlatform(*platform), pSkuTable(*skuTable), pWaTable(*waTable), pSysInfo(*sysInfo), capabilityTable(capabilityTable) {
|
||||
}
|
||||
|
||||
const HardwareInfo *hardwareInfoTable[IGFX_MAX_PRODUCT] = {};
|
||||
|
||||
@@ -68,10 +68,10 @@ struct HardwareInfo {
|
||||
HardwareInfo(const PLATFORM *platform, const FeatureTable *skuTable, const WorkaroundTable *waTable,
|
||||
const GT_SYSTEM_INFO *sysInfo, const RuntimeCapabilityTable &capabilityTable);
|
||||
|
||||
const PLATFORM *pPlatform = nullptr;
|
||||
const FeatureTable *pSkuTable = nullptr;
|
||||
const WorkaroundTable *pWaTable = nullptr;
|
||||
const GT_SYSTEM_INFO *pSysInfo = nullptr;
|
||||
PLATFORM pPlatform = {};
|
||||
FeatureTable pSkuTable = {};
|
||||
WorkaroundTable pWaTable = {};
|
||||
GT_SYSTEM_INFO pSysInfo = {};
|
||||
|
||||
RuntimeCapabilityTable capabilityTable = {};
|
||||
};
|
||||
|
||||
@@ -117,8 +117,8 @@ size_t PreambleHelper<GfxFamily>::getKernelDebuggingCommandsSize(bool debuggingA
|
||||
|
||||
template <typename GfxFamily>
|
||||
uint32_t PreambleHelper<GfxFamily>::getMaxThreadsForVfe(const HardwareInfo &hwInfo) {
|
||||
uint32_t threadsPerEU = (hwInfo.pSysInfo->ThreadCount / hwInfo.pSysInfo->EUCount) + hwInfo.capabilityTable.extraQuantityThreadsPerEU;
|
||||
return hwInfo.pSysInfo->EUCount * threadsPerEU;
|
||||
uint32_t threadsPerEU = (hwInfo.pSysInfo.ThreadCount / hwInfo.pSysInfo.EUCount) + hwInfo.capabilityTable.extraQuantityThreadsPerEU;
|
||||
return hwInfo.pSysInfo.EUCount * threadsPerEU;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1460,7 +1460,7 @@ void Kernel::unsetArg(uint32_t argIndex) {
|
||||
void Kernel::createReflectionSurface() {
|
||||
if (this->isParentKernel && kernelReflectionSurface == nullptr) {
|
||||
auto &hwInfo = device.getHardwareInfo();
|
||||
auto &hwHelper = HwHelper::get(hwInfo.pPlatform->eRenderCoreFamily);
|
||||
auto &hwHelper = HwHelper::get(hwInfo.pPlatform.eRenderCoreFamily);
|
||||
BlockKernelManager *blockManager = program->getBlockKernelManager();
|
||||
uint32_t blockCount = static_cast<uint32_t>(blockManager->getCount());
|
||||
|
||||
@@ -1706,7 +1706,7 @@ void Kernel::ReflectionSurfaceHelper::getCurbeParams(std::vector<IGIL_KernelCurb
|
||||
tokenMask |= ((uint64_t)1 << 50);
|
||||
|
||||
if (kernelInfo.patchInfo.bindingTableState) {
|
||||
auto &hwHelper = HwHelper::get(hwInfo.pPlatform->eRenderCoreFamily);
|
||||
auto &hwHelper = HwHelper::get(hwInfo.pPlatform.eRenderCoreFamily);
|
||||
void *ssh = static_cast<char *>(kernelInfo.heapInfo.pSsh) + kernelInfo.patchInfo.bindingTableState->Offset;
|
||||
|
||||
for (uint32_t i = 0; i < kernelInfo.patchInfo.bindingTableState->Count; i++) {
|
||||
@@ -1880,7 +1880,7 @@ void Kernel::ReflectionSurfaceHelper::setKernelAddressData(void *reflectionSurfa
|
||||
uint32_t sshTokensOffset, uint32_t btOffset, const KernelInfo &kernelInfo, const HardwareInfo &hwInfo) {
|
||||
IGIL_KernelAddressData *kernelAddressData = reinterpret_cast<IGIL_KernelAddressData *>(ptrOffset(reflectionSurface, offset));
|
||||
|
||||
auto &hwHelper = HwHelper::get(hwInfo.pPlatform->eRenderCoreFamily);
|
||||
auto &hwHelper = HwHelper::get(hwInfo.pPlatform.eRenderCoreFamily);
|
||||
|
||||
kernelAddressData->m_KernelDataOffset = kernelDataOffset;
|
||||
kernelAddressData->m_SamplerHeapOffset = samplerHeapOffset;
|
||||
@@ -2139,7 +2139,7 @@ void Kernel::resolveArgs() {
|
||||
}
|
||||
|
||||
bool Kernel::canTransformImages() const {
|
||||
return device.getHardwareInfo().pPlatform->eRenderCoreFamily >= IGFX_GEN9_CORE;
|
||||
return device.getHardwareInfo().pPlatform.eRenderCoreFamily >= IGFX_GEN9_CORE;
|
||||
}
|
||||
|
||||
void Kernel::fillWithBuffersForAuxTranslation(MemObjsForAuxTranslation &memObjsForAuxTranslation) {
|
||||
|
||||
@@ -144,7 +144,7 @@ Buffer *Buffer::create(Context *context,
|
||||
context->peekContextType(),
|
||||
HwHelper::renderCompressedBuffersSupported(context->getDevice(0)->getHardwareInfo()),
|
||||
memoryManager->isLocalMemorySupported(),
|
||||
HwHelper::get(context->getDevice(0)->getHardwareInfo().pPlatform->eRenderCoreFamily).obtainRenderBufferCompressionPreference(size));
|
||||
HwHelper::get(context->getDevice(0)->getHardwareInfo().pPlatform.eRenderCoreFamily).obtainRenderBufferCompressionPreference(size));
|
||||
|
||||
checkMemory(properties.flags, size, hostPtr, errcodeRet, alignementSatisfied, copyMemoryFromHostPtr, memoryManager);
|
||||
|
||||
@@ -482,7 +482,7 @@ Buffer *Buffer::createBufferHw(Context *context,
|
||||
const auto device = context->getDevice(0);
|
||||
const auto &hwInfo = device->getHardwareInfo();
|
||||
|
||||
auto funcCreate = bufferFactory[hwInfo.pPlatform->eRenderCoreFamily].createBufferFunction;
|
||||
auto funcCreate = bufferFactory[hwInfo.pPlatform.eRenderCoreFamily].createBufferFunction;
|
||||
DEBUG_BREAK_IF(nullptr == funcCreate);
|
||||
auto pBuffer = funcCreate(context, properties, size, memoryStorage, hostPtr, gfxAllocation,
|
||||
zeroCopy, isHostPtrSVM, isImageRedescribed);
|
||||
@@ -505,7 +505,7 @@ Buffer *Buffer::createBufferHwFromDevice(const Device *device,
|
||||
|
||||
const auto &hwInfo = device->getHardwareInfo();
|
||||
|
||||
auto funcCreate = bufferFactory[hwInfo.pPlatform->eRenderCoreFamily].createBufferFunction;
|
||||
auto funcCreate = bufferFactory[hwInfo.pPlatform.eRenderCoreFamily].createBufferFunction;
|
||||
DEBUG_BREAK_IF(nullptr == funcCreate);
|
||||
auto pBuffer = funcCreate(nullptr, flags, size, memoryStorage, hostPtr, gfxAllocation,
|
||||
zeroCopy, isHostPtrSVM, isImageRedescribed);
|
||||
|
||||
@@ -188,7 +188,7 @@ Image *Image::create(Context *context,
|
||||
bool transferNeeded = false;
|
||||
if (((imageDesc->image_type == CL_MEM_OBJECT_IMAGE1D_BUFFER) || (imageDesc->image_type == CL_MEM_OBJECT_IMAGE2D)) && (parentBuffer != nullptr)) {
|
||||
|
||||
HwHelper::get(context->getDevice(0)->getHardwareInfo().pPlatform->eRenderCoreFamily).checkResourceCompatibility(parentBuffer, errcodeRet);
|
||||
HwHelper::get(context->getDevice(0)->getHardwareInfo().pPlatform.eRenderCoreFamily).checkResourceCompatibility(parentBuffer, errcodeRet);
|
||||
|
||||
if (errcodeRet != CL_SUCCESS) {
|
||||
return nullptr;
|
||||
@@ -378,7 +378,7 @@ Image *Image::createImageHw(Context *context, cl_mem_flags flags, size_t size, v
|
||||
const auto device = context->getDevice(0);
|
||||
const auto &hwInfo = device->getHardwareInfo();
|
||||
|
||||
auto funcCreate = imageFactory[hwInfo.pPlatform->eRenderCoreFamily].createImageFunction;
|
||||
auto funcCreate = imageFactory[hwInfo.pPlatform.eRenderCoreFamily].createImageFunction;
|
||||
DEBUG_BREAK_IF(nullptr == funcCreate);
|
||||
auto image = funcCreate(context, flags, size, hostPtr, imageFormat, imageDesc,
|
||||
zeroCopy, graphicsAllocation, isObjectRedescribed, createTiledImage, baseMipLevel, mipCount, surfaceFormatInfo, nullptr);
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace NEO {
|
||||
MemoryManager::MemoryManager(ExecutionEnvironment &executionEnvironment) : executionEnvironment(executionEnvironment), hostPtrManager(std::make_unique<HostPtrManager>()),
|
||||
multiContextResourceDestructor(std::make_unique<DeferredDeleter>()), allocator32Bit(nullptr) {
|
||||
auto hwInfo = executionEnvironment.getHardwareInfo();
|
||||
this->localMemorySupported = HwHelper::get(hwInfo->pPlatform->eRenderCoreFamily).getEnableLocalMemory(*hwInfo);
|
||||
this->localMemorySupported = HwHelper::get(hwInfo->pPlatform.eRenderCoreFamily).getEnableLocalMemory(*hwInfo);
|
||||
this->enable64kbpages = OSInterface::osEnabled64kbPages && hwInfo->capabilityTable.ftr64KBpages;
|
||||
if (DebugManager.flags.Enable64kbpages.get() > -1) {
|
||||
this->enable64kbpages = DebugManager.flags.Enable64kbpages.get() != 0;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
bool DeviceFactory::getDevicesForProductFamilyOverride(HardwareInfo **pHWInfos, size_t &numDevices, ExecutionEnvironment &executionEnvironment) {
|
||||
bool DeviceFactory::getDevicesForProductFamilyOverride(size_t &numDevices, ExecutionEnvironment &executionEnvironment) {
|
||||
auto totalDeviceCount = 1u;
|
||||
if (DebugManager.flags.CreateMultipleDevices.get()) {
|
||||
totalDeviceCount = DebugManager.flags.CreateMultipleDevices.get();
|
||||
@@ -24,23 +24,16 @@ bool DeviceFactory::getDevicesForProductFamilyOverride(HardwareInfo **pHWInfos,
|
||||
std::string hwInfoConfig;
|
||||
DebugManager.getHardwareInfoOverride(hwInfoConfig);
|
||||
|
||||
auto hardwareInfo = std::make_unique<HardwareInfo>();
|
||||
hardwareInfo->pPlatform = new PLATFORM(*hwInfoConst->pPlatform);
|
||||
hardwareInfo->pSkuTable = new FeatureTable(*hwInfoConst->pSkuTable);
|
||||
hardwareInfo->pWaTable = new WorkaroundTable(*hwInfoConst->pWaTable);
|
||||
hardwareInfo->pSysInfo = new GT_SYSTEM_INFO(*hwInfoConst->pSysInfo);
|
||||
hardwareInfo->capabilityTable = hwInfoConst->capabilityTable;
|
||||
hardwareInfoSetup[hwInfoConst->pPlatform->eProductFamily](hardwareInfo.get(), true, hwInfoConfig);
|
||||
auto hardwareInfo = executionEnvironment.getMutableHardwareInfo();
|
||||
*hardwareInfo = *hwInfoConst;
|
||||
|
||||
HwInfoConfig *hwConfig = HwInfoConfig::get(hardwareInfo->pPlatform->eProductFamily);
|
||||
hwConfig->configureHardwareCustom(hardwareInfo.get(), nullptr);
|
||||
hardwareInfoSetup[hwInfoConst->pPlatform.eProductFamily](hardwareInfo, true, hwInfoConfig);
|
||||
|
||||
*pHWInfos = hardwareInfo.release();
|
||||
HwInfoConfig *hwConfig = HwInfoConfig::get(hardwareInfo->pPlatform.eProductFamily);
|
||||
hwConfig->configureHardwareCustom(hardwareInfo, nullptr);
|
||||
|
||||
executionEnvironment.setHwInfo(*pHWInfos);
|
||||
numDevices = totalDeviceCount;
|
||||
DeviceFactory::numDevices = numDevices;
|
||||
DeviceFactory::hwInfo = *pHWInfos;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -10,18 +10,16 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
struct HardwareInfo;
|
||||
class ExecutionEnvironment;
|
||||
|
||||
class DeviceFactory {
|
||||
public:
|
||||
static bool getDevices(HardwareInfo **pHWInfos, size_t &numDevices, ExecutionEnvironment &executionEnvironment);
|
||||
static bool getDevicesForProductFamilyOverride(HardwareInfo **pHWInfos, size_t &numDevices, ExecutionEnvironment &executionEnvironment);
|
||||
static bool getDevices(size_t &numDevices, ExecutionEnvironment &executionEnvironment);
|
||||
static bool getDevicesForProductFamilyOverride(size_t &numDevices, ExecutionEnvironment &executionEnvironment);
|
||||
static void releaseDevices();
|
||||
|
||||
protected:
|
||||
static size_t numDevices;
|
||||
static HardwareInfo *hwInfo;
|
||||
};
|
||||
|
||||
class DeviceFactoryCleaner {
|
||||
|
||||
@@ -21,9 +21,8 @@
|
||||
|
||||
namespace NEO {
|
||||
size_t DeviceFactory::numDevices = 0;
|
||||
HardwareInfo *DeviceFactory::hwInfo = nullptr;
|
||||
|
||||
bool DeviceFactory::getDevices(HardwareInfo **pHWInfos, size_t &numDevices, ExecutionEnvironment &executionEnvironment) {
|
||||
bool DeviceFactory::getDevices(size_t &numDevices, ExecutionEnvironment &executionEnvironment) {
|
||||
unsigned int devNum = 0;
|
||||
size_t requiredDeviceCount = 1;
|
||||
|
||||
@@ -39,19 +38,16 @@ bool DeviceFactory::getDevices(HardwareInfo **pHWInfos, size_t &numDevices, Exec
|
||||
executionEnvironment.osInterface.reset(new OSInterface());
|
||||
executionEnvironment.osInterface->get()->setDrm(drm);
|
||||
|
||||
auto hardwareInfo = std::make_unique<HardwareInfo>();
|
||||
auto hardwareInfo = executionEnvironment.getMutableHardwareInfo();
|
||||
const HardwareInfo *pCurrDevice = platformDevices[devNum];
|
||||
HwInfoConfig *hwConfig = HwInfoConfig::get(pCurrDevice->pPlatform->eProductFamily);
|
||||
if (hwConfig->configureHwInfo(pCurrDevice, hardwareInfo.get(), executionEnvironment.osInterface.get())) {
|
||||
HwInfoConfig *hwConfig = HwInfoConfig::get(pCurrDevice->pPlatform.eProductFamily);
|
||||
if (hwConfig->configureHwInfo(pCurrDevice, hardwareInfo, executionEnvironment.osInterface.get())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
numDevices = requiredDeviceCount;
|
||||
*pHWInfos = hardwareInfo.release();
|
||||
executionEnvironment.setHwInfo(*pHWInfos);
|
||||
|
||||
DeviceFactory::numDevices = numDevices;
|
||||
DeviceFactory::hwInfo = *pHWInfos;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -61,13 +57,7 @@ void DeviceFactory::releaseDevices() {
|
||||
for (unsigned int i = 0; i < DeviceFactory::numDevices; ++i) {
|
||||
Drm::closeDevice(i);
|
||||
}
|
||||
delete hwInfo->pSysInfo;
|
||||
delete hwInfo->pSkuTable;
|
||||
delete hwInfo->pWaTable;
|
||||
delete hwInfo->pPlatform;
|
||||
delete hwInfo;
|
||||
}
|
||||
DeviceFactory::hwInfo = nullptr;
|
||||
DeviceFactory::numDevices = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ uint32_t bitExact(uint32_t value, uint32_t highBit, uint32_t lowBit) {
|
||||
}
|
||||
|
||||
int configureCacheInfo(HardwareInfo *hwInfo) {
|
||||
GT_SYSTEM_INFO *pSysInfo = const_cast<GT_SYSTEM_INFO *>(hwInfo->pSysInfo);
|
||||
GT_SYSTEM_INFO *pSysInfo = &hwInfo->pSysInfo;
|
||||
|
||||
uint32_t type = 0;
|
||||
uint32_t subleaf = 0;
|
||||
@@ -70,20 +70,10 @@ int HwInfoConfig::configureHwInfo(const HardwareInfo *inHwInfo, HardwareInfo *ou
|
||||
int ret = 0;
|
||||
Drm *drm = osIface->get()->getDrm();
|
||||
|
||||
auto pPlatform = std::unique_ptr<PLATFORM>(new PLATFORM);
|
||||
*pPlatform = *(inHwInfo->pPlatform);
|
||||
auto pSysInfo = std::unique_ptr<GT_SYSTEM_INFO>(new GT_SYSTEM_INFO);
|
||||
*(pSysInfo) = *(inHwInfo->pSysInfo);
|
||||
auto pSkuTable = std::unique_ptr<FeatureTable>(new FeatureTable);
|
||||
*pSkuTable = *(inHwInfo->pSkuTable);
|
||||
auto pWaTable = std::unique_ptr<WorkaroundTable>(new WorkaroundTable);
|
||||
*pWaTable = *(inHwInfo->pWaTable);
|
||||
|
||||
outHwInfo->pPlatform = pPlatform.get();
|
||||
outHwInfo->pSysInfo = pSysInfo.get();
|
||||
outHwInfo->pSkuTable = pSkuTable.get();
|
||||
outHwInfo->pWaTable = pWaTable.get();
|
||||
outHwInfo->capabilityTable = inHwInfo->capabilityTable;
|
||||
*outHwInfo = *inHwInfo;
|
||||
auto pPlatform = &outHwInfo->pPlatform;
|
||||
auto pSysInfo = &outHwInfo->pSysInfo;
|
||||
auto pSkuTable = &outHwInfo->pSkuTable;
|
||||
|
||||
int val = 0;
|
||||
ret = drm->getDeviceID(val);
|
||||
@@ -163,10 +153,10 @@ int HwInfoConfig::configureHwInfo(const HardwareInfo *inHwInfo, HardwareInfo *ou
|
||||
bool preemption = drm->isPreemptionSupported();
|
||||
preemption = hwHelper.setupPreemptionRegisters(outHwInfo, preemption);
|
||||
PreemptionHelper::adjustDefaultPreemptionMode(outHwInfo->capabilityTable,
|
||||
static_cast<bool>(outHwInfo->pSkuTable->ftrGpGpuMidThreadLevelPreempt) && preemption,
|
||||
static_cast<bool>(outHwInfo->pSkuTable->ftrGpGpuThreadGroupLevelPreempt) && preemption,
|
||||
static_cast<bool>(outHwInfo->pSkuTable->ftrGpGpuMidBatchPreempt) && preemption);
|
||||
outHwInfo->capabilityTable.requiredPreemptionSurfaceSize = outHwInfo->pSysInfo->CsrSizeInMb * MemoryConstants::megaByte;
|
||||
static_cast<bool>(outHwInfo->pSkuTable.ftrGpGpuMidThreadLevelPreempt) && preemption,
|
||||
static_cast<bool>(outHwInfo->pSkuTable.ftrGpGpuThreadGroupLevelPreempt) && preemption,
|
||||
static_cast<bool>(outHwInfo->pSkuTable.ftrGpGpuMidBatchPreempt) && preemption);
|
||||
outHwInfo->capabilityTable.requiredPreemptionSurfaceSize = outHwInfo->pSysInfo.CsrSizeInMb * MemoryConstants::megaByte;
|
||||
|
||||
auto &kmdNotifyProperties = outHwInfo->capabilityTable.kmdNotifyProperties;
|
||||
KmdNotifyHelper::overrideFromDebugVariable(DebugManager.flags.OverrideEnableKmdNotify.get(), kmdNotifyProperties.enableKmdNotify);
|
||||
@@ -176,11 +166,6 @@ int HwInfoConfig::configureHwInfo(const HardwareInfo *inHwInfo, HardwareInfo *ou
|
||||
KmdNotifyHelper::overrideFromDebugVariable(DebugManager.flags.OverrideEnableQuickKmdSleepForSporadicWaits.get(), kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits);
|
||||
KmdNotifyHelper::overrideFromDebugVariable(DebugManager.flags.OverrideDelayQuickKmdSleepForSporadicWaitsMicroseconds.get(), kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds);
|
||||
|
||||
pPlatform.release();
|
||||
pSkuTable.release();
|
||||
pWaTable.release();
|
||||
pSysInfo.release();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ void PerformanceCountersLinux::initialize(const HardwareInfo *hwInfo) {
|
||||
if (mdLibHandle) {
|
||||
perfmonLoadConfigFunc = reinterpret_cast<perfmonLoadConfig_t>(dlsymFunc(mdLibHandle, "drm_intel_perfmon_load_config"));
|
||||
}
|
||||
setPlatformInfoFunc(hwInfo->pPlatform->eProductFamily, (void *)(hwInfo->pSkuTable));
|
||||
setPlatformInfoFunc(hwInfo->pPlatform.eProductFamily, (void *)(&hwInfo->pSkuTable));
|
||||
}
|
||||
|
||||
void PerformanceCountersLinux::enableImpl() {
|
||||
|
||||
@@ -58,8 +58,8 @@ void PerformanceCounters::shutdown() {
|
||||
}
|
||||
|
||||
void PerformanceCounters::initialize(const HardwareInfo *hwInfo) {
|
||||
useMIRPC = !(hwInfo->pWaTable->waDoNotUseMIReportPerfCount);
|
||||
gfxFamily = hwInfo->pPlatform->eRenderCoreFamily;
|
||||
useMIRPC = !(hwInfo->pWaTable.waDoNotUseMIReportPerfCount);
|
||||
gfxFamily = hwInfo->pPlatform.eRenderCoreFamily;
|
||||
|
||||
if (getPerfCountersQueryDataFactory[gfxFamily] != nullptr) {
|
||||
getPerfCountersQueryDataFunc = getPerfCountersQueryDataFactory[gfxFamily];
|
||||
|
||||
@@ -21,35 +21,31 @@ namespace NEO {
|
||||
extern const HardwareInfo *hardwareInfoTable[IGFX_MAX_PRODUCT];
|
||||
|
||||
size_t DeviceFactory::numDevices = 0;
|
||||
HardwareInfo *DeviceFactory::hwInfo = nullptr;
|
||||
|
||||
bool DeviceFactory::getDevices(HardwareInfo **pHWInfos, size_t &numDevices, ExecutionEnvironment &executionEnvironment) {
|
||||
bool DeviceFactory::getDevices(size_t &numDevices, ExecutionEnvironment &executionEnvironment) {
|
||||
numDevices = 0;
|
||||
|
||||
auto hardwareInfo = std::make_unique<HardwareInfo>();
|
||||
auto hardwareInfo = executionEnvironment.getMutableHardwareInfo();
|
||||
std::unique_ptr<Wddm> wddm(Wddm::createWddm());
|
||||
if (!wddm->enumAdapters(*hardwareInfo)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
auto totalDeviceCount = DeviceHelper::getDevicesCount(hardwareInfo.get());
|
||||
auto totalDeviceCount = DeviceHelper::getDevicesCount(hardwareInfo);
|
||||
|
||||
executionEnvironment.osInterface.reset(new OSInterface());
|
||||
executionEnvironment.osInterface->get()->setWddm(wddm.release());
|
||||
|
||||
HwInfoConfig *hwConfig = HwInfoConfig::get(hardwareInfo->pPlatform->eProductFamily);
|
||||
if (hwConfig->configureHwInfo(hardwareInfo.get(), hardwareInfo.get(), nullptr)) {
|
||||
HwInfoConfig *hwConfig = HwInfoConfig::get(hardwareInfo->pPlatform.eProductFamily);
|
||||
if (hwConfig->configureHwInfo(hardwareInfo, hardwareInfo, nullptr)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
*pHWInfos = hardwareInfo.release();
|
||||
numDevices = totalDeviceCount;
|
||||
DeviceFactory::numDevices = numDevices;
|
||||
DeviceFactory::hwInfo = *pHWInfos;
|
||||
|
||||
executionEnvironment.setHwInfo(*pHWInfos);
|
||||
executionEnvironment.initGmm();
|
||||
auto preemptionMode = PreemptionHelper::getDefaultPreemptionMode(**pHWInfos);
|
||||
auto preemptionMode = PreemptionHelper::getDefaultPreemptionMode(*hardwareInfo);
|
||||
bool success = executionEnvironment.osInterface->get()->getWddm()->init(preemptionMode);
|
||||
DEBUG_BREAK_IF(!success);
|
||||
|
||||
@@ -57,14 +53,6 @@ bool DeviceFactory::getDevices(HardwareInfo **pHWInfos, size_t &numDevices, Exec
|
||||
}
|
||||
|
||||
void DeviceFactory::releaseDevices() {
|
||||
if (DeviceFactory::numDevices > 0) {
|
||||
delete hwInfo->pPlatform;
|
||||
delete hwInfo->pSkuTable;
|
||||
delete hwInfo->pWaTable;
|
||||
delete hwInfo->pSysInfo;
|
||||
delete hwInfo;
|
||||
}
|
||||
DeviceFactory::hwInfo = nullptr;
|
||||
DeviceFactory::numDevices = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,21 +21,21 @@ namespace NEO {
|
||||
HwInfoConfig *hwInfoConfigFactory[IGFX_MAX_PRODUCT] = {};
|
||||
|
||||
int HwInfoConfig::configureHwInfo(const HardwareInfo *inHwInfo, HardwareInfo *outHwInfo, OSInterface *osIface) {
|
||||
HwHelper &hwHelper = HwHelper::get(outHwInfo->pPlatform->eRenderCoreFamily);
|
||||
HwHelper &hwHelper = HwHelper::get(outHwInfo->pPlatform.eRenderCoreFamily);
|
||||
|
||||
outHwInfo->capabilityTable.ftrSvm = outHwInfo->pSkuTable->ftrSVM;
|
||||
outHwInfo->capabilityTable.ftrSvm = outHwInfo->pSkuTable.ftrSVM;
|
||||
|
||||
hwHelper.adjustDefaultEngineType(outHwInfo);
|
||||
outHwInfo->capabilityTable.defaultEngineType = getChosenEngineType(*outHwInfo);
|
||||
|
||||
hwHelper.setCapabilityCoherencyFlag(outHwInfo, outHwInfo->capabilityTable.ftrSupportsCoherency);
|
||||
|
||||
hwHelper.setupPreemptionRegisters(outHwInfo, outHwInfo->pWaTable->waEnablePreemptionGranularityControlByUMD);
|
||||
hwHelper.setupPreemptionRegisters(outHwInfo, outHwInfo->pWaTable.waEnablePreemptionGranularityControlByUMD);
|
||||
PreemptionHelper::adjustDefaultPreemptionMode(outHwInfo->capabilityTable,
|
||||
static_cast<bool>(outHwInfo->pSkuTable->ftrGpGpuMidThreadLevelPreempt),
|
||||
static_cast<bool>(outHwInfo->pSkuTable->ftrGpGpuThreadGroupLevelPreempt),
|
||||
static_cast<bool>(outHwInfo->pSkuTable->ftrGpGpuMidBatchPreempt));
|
||||
outHwInfo->capabilityTable.requiredPreemptionSurfaceSize = outHwInfo->pSysInfo->CsrSizeInMb * MemoryConstants::megaByte;
|
||||
static_cast<bool>(outHwInfo->pSkuTable.ftrGpGpuMidThreadLevelPreempt),
|
||||
static_cast<bool>(outHwInfo->pSkuTable.ftrGpGpuThreadGroupLevelPreempt),
|
||||
static_cast<bool>(outHwInfo->pSkuTable.ftrGpGpuMidBatchPreempt));
|
||||
outHwInfo->capabilityTable.requiredPreemptionSurfaceSize = outHwInfo->pSysInfo.CsrSizeInMb * MemoryConstants::megaByte;
|
||||
|
||||
outHwInfo->capabilityTable.instrumentationEnabled &= haveInstrumentation;
|
||||
|
||||
|
||||
@@ -74,10 +74,10 @@ bool Wddm::enumAdapters(HardwareInfo &outHardwareInfo) {
|
||||
return false;
|
||||
}
|
||||
|
||||
outHardwareInfo.pPlatform = new PLATFORM(*gfxPlatform);
|
||||
outHardwareInfo.pSkuTable = new FeatureTable(*featureTable);
|
||||
outHardwareInfo.pWaTable = new WorkaroundTable(*waTable);
|
||||
outHardwareInfo.pSysInfo = new GT_SYSTEM_INFO(*gtSystemInfo);
|
||||
outHardwareInfo.pPlatform = *gfxPlatform;
|
||||
outHardwareInfo.pSkuTable = *featureTable;
|
||||
outHardwareInfo.pWaTable = *waTable;
|
||||
outHardwareInfo.pSysInfo = *gtSystemInfo;
|
||||
|
||||
outHardwareInfo.capabilityTable = hardwareInfoTable[productFamily]->capabilityTable;
|
||||
outHardwareInfo.capabilityTable.maxRenderFrequency = maxRenderFrequency;
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace NEO {
|
||||
|
||||
std::unique_ptr<Platform> platformImpl;
|
||||
|
||||
bool getDevices(HardwareInfo **hwInfo, size_t &numDevicesReturned, ExecutionEnvironment &executionEnvironment);
|
||||
bool getDevices(size_t &numDevicesReturned, ExecutionEnvironment &executionEnvironment);
|
||||
|
||||
Platform *platform() { return platformImpl.get(); }
|
||||
|
||||
@@ -121,7 +121,6 @@ const std::string &Platform::peekCompilerExtensions() const {
|
||||
}
|
||||
|
||||
bool Platform::initialize() {
|
||||
HardwareInfo *hwInfo = nullptr;
|
||||
size_t numDevicesReturned = 0;
|
||||
|
||||
TakeOwnershipWrapper<Platform> platformOwnership(*this);
|
||||
@@ -135,7 +134,7 @@ bool Platform::initialize() {
|
||||
this->initializationLoopHelper();
|
||||
}
|
||||
|
||||
state = NEO::getDevices(&hwInfo, numDevicesReturned, *executionEnvironment) ? StateIniting : StateNone;
|
||||
state = NEO::getDevices(numDevicesReturned, *executionEnvironment) ? StateIniting : StateNone;
|
||||
|
||||
if (state == StateNone) {
|
||||
return false;
|
||||
@@ -148,7 +147,7 @@ bool Platform::initialize() {
|
||||
|
||||
this->devices.resize(numDevicesReturned);
|
||||
for (uint32_t deviceOrdinal = 0; deviceOrdinal < numDevicesReturned; ++deviceOrdinal) {
|
||||
auto pDevice = Device::create<NEO::Device>(hwInfo, executionEnvironment, deviceOrdinal);
|
||||
auto pDevice = Device::create<NEO::Device>(executionEnvironment, deviceOrdinal);
|
||||
DEBUG_BREAK_IF(!pDevice);
|
||||
if (pDevice) {
|
||||
this->devices[deviceOrdinal] = pDevice;
|
||||
@@ -174,15 +173,17 @@ bool Platform::initialize() {
|
||||
}
|
||||
executionEnvironment->initializeSpecialCommandStreamReceiver();
|
||||
|
||||
auto hwInfo = executionEnvironment->getHardwareInfo();
|
||||
|
||||
const bool sourceLevelDebuggerActive = executionEnvironment->sourceLevelDebugger && executionEnvironment->sourceLevelDebugger->isDebuggerActive();
|
||||
if (devices[0]->getPreemptionMode() == PreemptionMode::MidThread || sourceLevelDebuggerActive) {
|
||||
auto sipType = SipKernel::getSipKernelType(devices[0]->getHardwareInfo().pPlatform->eRenderCoreFamily, devices[0]->isSourceLevelDebuggerActive());
|
||||
auto sipType = SipKernel::getSipKernelType(hwInfo->pPlatform.eRenderCoreFamily, devices[0]->isSourceLevelDebuggerActive());
|
||||
initSipKernel(sipType, *devices[0]);
|
||||
}
|
||||
|
||||
CommandStreamReceiverType csrType = this->devices[0]->getDefaultEngine().commandStreamReceiver->getType();
|
||||
if (csrType != CommandStreamReceiverType::CSR_HW) {
|
||||
auto enableLocalMemory = HwHelper::get(hwInfo->pPlatform->eRenderCoreFamily).getEnableLocalMemory(*hwInfo);
|
||||
auto enableLocalMemory = HwHelper::get(hwInfo->pPlatform.eRenderCoreFamily).getEnableLocalMemory(*hwInfo);
|
||||
executionEnvironment->initAubCenter(enableLocalMemory, "aubfile", csrType);
|
||||
}
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ WorkSizeInfo::WorkSizeInfo(const DispatchInfo &dispatchInfo) {
|
||||
this->hasBarriers = !!dispatchInfo.getKernel()->getKernelInfo().patchInfo.executionEnvironment->HasBarriers;
|
||||
this->simdSize = (uint32_t)dispatchInfo.getKernel()->getKernelInfo().getMaxSimdSize();
|
||||
this->slmTotalSize = (uint32_t)dispatchInfo.getKernel()->slmTotalSize;
|
||||
this->coreFamily = dispatchInfo.getKernel()->getDevice().getHardwareInfo().pPlatform->eRenderCoreFamily;
|
||||
this->coreFamily = dispatchInfo.getKernel()->getDevice().getHardwareInfo().pPlatform.eRenderCoreFamily;
|
||||
this->numThreadsPerSubSlice = (uint32_t)dispatchInfo.getKernel()->getDevice().getDeviceInfo().maxNumEUsPerSubSlice * dispatchInfo.getKernel()->getDevice().getDeviceInfo().numThreadsPerEU;
|
||||
this->localMemSize = (uint32_t)dispatchInfo.getKernel()->getDevice().getDeviceInfo().localMemSize;
|
||||
setIfUseImg(dispatchInfo.getKernel());
|
||||
|
||||
@@ -48,7 +48,7 @@ Sampler *Sampler::create(Context *context, cl_bool normalizedCoordinates,
|
||||
const auto device = context->getDevice(0);
|
||||
const auto &hwInfo = device->getHardwareInfo();
|
||||
|
||||
auto funcCreate = samplerFactory[hwInfo.pPlatform->eRenderCoreFamily];
|
||||
auto funcCreate = samplerFactory[hwInfo.pPlatform.eRenderCoreFamily];
|
||||
DEBUG_BREAK_IF(nullptr == funcCreate);
|
||||
sampler = funcCreate(context, normalizedCoordinates, addressingMode, filterMode, mipFilterMode, lodMin, lodMax);
|
||||
|
||||
@@ -60,7 +60,7 @@ Sampler *Sampler::create(Context *context, cl_bool normalizedCoordinates,
|
||||
}
|
||||
|
||||
size_t Sampler::getSamplerStateSize(const HardwareInfo &hwInfo) {
|
||||
return getSamplerStateSizeHw[hwInfo.pPlatform->eRenderCoreFamily]();
|
||||
return getSamplerStateSizeHw[hwInfo.pPlatform.eRenderCoreFamily]();
|
||||
}
|
||||
|
||||
template <typename ParameterType>
|
||||
|
||||
@@ -42,13 +42,13 @@ void SchedulerKernel::setArgs(GraphicsAllocation *queue,
|
||||
void SchedulerKernel::computeGws() {
|
||||
auto &devInfo = device.getDeviceInfo();
|
||||
auto &hwInfo = device.getHardwareInfo();
|
||||
auto &helper = HwHelper::get(hwInfo.pPlatform->eRenderCoreFamily);
|
||||
auto &helper = HwHelper::get(hwInfo.pPlatform.eRenderCoreFamily);
|
||||
|
||||
size_t hWThreadsPerSubSlice = devInfo.maxComputUnits / hwInfo.pSysInfo->SubSliceCount;
|
||||
size_t hWThreadsPerSubSlice = devInfo.maxComputUnits / hwInfo.pSysInfo.SubSliceCount;
|
||||
size_t wkgsPerSubSlice = hWThreadsPerSubSlice / PARALLEL_SCHEDULER_HWTHREADS_IN_HW_GROUP20;
|
||||
|
||||
wkgsPerSubSlice = std::min(wkgsPerSubSlice, helper.getMaxBarrierRegisterPerSlice());
|
||||
gws = wkgsPerSubSlice * hwInfo.pSysInfo->SubSliceCount * PARALLEL_SCHEDULER_HWTHREADS_IN_HW_GROUP20 * PARALLEL_SCHEDULER_COMPILATION_SIZE_20;
|
||||
gws = wkgsPerSubSlice * hwInfo.pSysInfo.SubSliceCount * PARALLEL_SCHEDULER_HWTHREADS_IN_HW_GROUP20 * PARALLEL_SCHEDULER_COMPILATION_SIZE_20;
|
||||
|
||||
if (device.isSimulation()) {
|
||||
gws = PARALLEL_SCHEDULER_HWTHREADS_IN_HW_GROUP20 * PARALLEL_SCHEDULER_COMPILATION_SIZE_20;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "runtime/sku_info/sku_info_base.h"
|
||||
|
||||
namespace NEO {
|
||||
struct FeatureTable : FeatureTableBase {};
|
||||
struct alignas(4) FeatureTable : FeatureTableBase {};
|
||||
|
||||
struct WorkaroundTable : WorkaroundTableBase {};
|
||||
struct alignas(4) WorkaroundTable : WorkaroundTableBase {};
|
||||
} // namespace NEO
|
||||
|
||||
@@ -190,7 +190,7 @@ TEST_F(clBuildProgramTests, GivenSpirAsInputWhenCreatingProgramFromBinaryThenPro
|
||||
SProgramBinaryHeader progBin = {};
|
||||
progBin.Magic = iOpenCL::MAGIC_CL;
|
||||
progBin.Version = iOpenCL::CURRENT_ICBE_VERSION;
|
||||
progBin.Device = pContext->getDevice(0)->getHardwareInfo().pPlatform->eRenderCoreFamily;
|
||||
progBin.Device = pContext->getDevice(0)->getHardwareInfo().pPlatform.eRenderCoreFamily;
|
||||
igcDebugVars.binaryToReturn = &progBin;
|
||||
igcDebugVars.binaryToReturnSize = sizeof(progBin);
|
||||
auto prevDebugVars = getIgcDebugVars();
|
||||
|
||||
@@ -49,14 +49,13 @@ TEST_F(clSetPerformanceConfigurationINTELTests, negativeInstrumentationDisabled)
|
||||
cl_uint offsets[2];
|
||||
cl_uint values[2];
|
||||
|
||||
HardwareInfo *pInHwInfo = const_cast<HardwareInfo *>(hwInfo);
|
||||
bool instrumentationEnabled = pInHwInfo->capabilityTable.instrumentationEnabled;
|
||||
pInHwInfo->capabilityTable.instrumentationEnabled = false;
|
||||
bool instrumentationEnabled = hwInfo->capabilityTable.instrumentationEnabled;
|
||||
hwInfo->capabilityTable.instrumentationEnabled = false;
|
||||
|
||||
ret = clSetPerformanceConfigurationINTEL(device.get(), 2, offsets, values);
|
||||
EXPECT_EQ(CL_PROFILING_INFO_NOT_AVAILABLE, ret);
|
||||
|
||||
pInHwInfo->capabilityTable.instrumentationEnabled = instrumentationEnabled;
|
||||
hwInfo->capabilityTable.instrumentationEnabled = instrumentationEnabled;
|
||||
}
|
||||
|
||||
} // namespace ULT
|
||||
|
||||
@@ -85,24 +85,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
clSVMAllocValidFlagsTests,
|
||||
testing::ValuesIn(SVMAllocValidFlags));
|
||||
|
||||
struct clSVMAllocFtrFlagsTests : public clSVMAllocTemplateTests {
|
||||
public:
|
||||
void SetUp() override {
|
||||
clSVMAllocTemplateTests::SetUp();
|
||||
const HardwareInfo &hwInfo = pPlatform->getDevice(0)->getHardwareInfo();
|
||||
oldFtrSvm = hwInfo.capabilityTable.ftrSvm;
|
||||
oldFtrCoherency = hwInfo.capabilityTable.ftrSupportsCoherency;
|
||||
}
|
||||
void TearDown() override {
|
||||
const HardwareInfo &hwInfo = pPlatform->getDevice(0)->getHardwareInfo();
|
||||
HardwareInfo *pHwInfo = const_cast<HardwareInfo *>(&hwInfo);
|
||||
pHwInfo->capabilityTable.ftrSvm = oldFtrSvm;
|
||||
pHwInfo->capabilityTable.ftrSupportsCoherency = oldFtrCoherency;
|
||||
clSVMAllocTemplateTests::TearDown();
|
||||
}
|
||||
bool oldFtrSvm;
|
||||
bool oldFtrCoherency;
|
||||
};
|
||||
using clSVMAllocFtrFlagsTests = clSVMAllocTemplateTests;
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SVMAllocCheckFlagsFtrFlags,
|
||||
@@ -110,8 +93,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
testing::ValuesIn(SVMAllocValidFlags));
|
||||
|
||||
TEST_P(clSVMAllocFtrFlagsTests, SVMAllocValidFlags) {
|
||||
const HardwareInfo &hwInfo = pPlatform->getDevice(0)->getHardwareInfo();
|
||||
HardwareInfo *pHwInfo = const_cast<HardwareInfo *>(&hwInfo);
|
||||
HardwareInfo *pHwInfo = pPlatform->peekExecutionEnvironment()->getMutableHardwareInfo();
|
||||
|
||||
cl_mem_flags flags = GetParam();
|
||||
void *SVMPtr = nullptr;
|
||||
|
||||
@@ -30,11 +30,11 @@ TEST(AubCenter, GivenUseAubStreamDebugVariableSetWhenAubCenterIsCreatedThenCreat
|
||||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.UseAubStream.set(false);
|
||||
|
||||
MockAubManager *mockAubManager = new MockAubManager(platformDevices[0]->pPlatform->eProductFamily, 4, 8 * MB, true, aub_stream::mode::aubFile);
|
||||
MockAubManager *mockAubManager = new MockAubManager(platformDevices[0]->pPlatform.eProductFamily, 4, 8 * MB, true, aub_stream::mode::aubFile);
|
||||
MockAubCenter mockAubCenter(platformDevices[0], false, "", CommandStreamReceiverType::CSR_AUB);
|
||||
mockAubCenter.aubManager = std::unique_ptr<MockAubManager>(mockAubManager);
|
||||
|
||||
EXPECT_EQ(platformDevices[0]->pPlatform->eProductFamily, mockAubManager->mockAubManagerParams.productFamily);
|
||||
EXPECT_EQ(platformDevices[0]->pPlatform.eProductFamily, mockAubManager->mockAubManagerParams.productFamily);
|
||||
EXPECT_EQ(4, mockAubManager->mockAubManagerParams.devicesCount);
|
||||
EXPECT_EQ(8 * MB, mockAubManager->mockAubManagerParams.memoryBankSize);
|
||||
EXPECT_EQ(true, mockAubManager->mockAubManagerParams.localMemorySupported);
|
||||
|
||||
@@ -26,7 +26,7 @@ void AUBCommandStreamFixture::SetUp(CommandQueue *pCmdQ) {
|
||||
ASSERT_NE(pCmdQ, nullptr);
|
||||
auto &device = reinterpret_cast<MockDevice &>(pCmdQ->getDevice());
|
||||
const auto &hwInfo = device.getHardwareInfo();
|
||||
auto &hwHelper = HwHelper::get(hwInfo.pPlatform->eRenderCoreFamily);
|
||||
auto &hwHelper = HwHelper::get(hwInfo.pPlatform.eRenderCoreFamily);
|
||||
|
||||
const ::testing::TestInfo *const testInfo = ::testing::UnitTest::GetInstance()->current_test_info();
|
||||
std::stringstream strfilename;
|
||||
|
||||
@@ -20,7 +20,7 @@ using NEO::DeviceFixture;
|
||||
using NEO::folderAUB;
|
||||
|
||||
std::string getAubFileName(const NEO::Device *pDevice, const std::string baseName) {
|
||||
const auto pGtSystemInfo = pDevice->getHardwareInfo().pSysInfo;
|
||||
const auto pGtSystemInfo = &pDevice->getHardwareInfo().pSysInfo;
|
||||
std::stringstream strfilename;
|
||||
uint32_t subSlicesPerSlice = pGtSystemInfo->SubSliceCount / pGtSystemInfo->SliceCount;
|
||||
strfilename << pDevice->getProductAbbrev() << "_" << pGtSystemInfo->SliceCount << "x" << subSlicesPerSlice << "x" << pGtSystemInfo->MaxEuPerSubSlice << "_" << baseName;
|
||||
@@ -84,7 +84,7 @@ HWTEST_F(AubMemDumpTests, reserveMaxAddress) {
|
||||
auto gAddress = static_cast<uintptr_t>(-1) - 4096;
|
||||
auto pAddress = static_cast<uint64_t>(gAddress) & 0xFFFFFFFF;
|
||||
|
||||
auto enableLocalMemory = HwHelper::get(hwInfo.pPlatform->eRenderCoreFamily).getEnableLocalMemory(hwInfo);
|
||||
auto enableLocalMemory = HwHelper::get(hwInfo.pPlatform.eRenderCoreFamily).getEnableLocalMemory(hwInfo);
|
||||
NEO::AubHelperHw<FamilyType> aubHelperHw(enableLocalMemory);
|
||||
AUB::reserveAddressPPGTT(aubFile, gAddress, 4096, pAddress, 7, aubHelperHw);
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ class AUBFixture : public CommandQueueHwFixture {
|
||||
const HardwareInfo &hwInfo = hardwareInfo ? *hardwareInfo : *platformDevices[0];
|
||||
uint32_t deviceIndex = 0;
|
||||
|
||||
auto &hwHelper = HwHelper::get(hwInfo.pPlatform->eRenderCoreFamily);
|
||||
auto &hwHelper = HwHelper::get(hwInfo.pPlatform.eRenderCoreFamily);
|
||||
auto engineType = getChosenEngineType(hwInfo);
|
||||
|
||||
const ::testing::TestInfo *const testInfo = ::testing::UnitTest::GetInstance()->current_test_info();
|
||||
@@ -36,6 +36,7 @@ class AUBFixture : public CommandQueueHwFixture {
|
||||
strfilename << testInfo->test_case_name() << "_" << testInfo->name() << "_" << hwHelper.getCsTraits(engineType).name;
|
||||
|
||||
executionEnvironment = platformImpl->peekExecutionEnvironment();
|
||||
executionEnvironment->setHwInfo(&hwInfo);
|
||||
if (testMode == TestMode::AubTestsWithTbx) {
|
||||
this->csr = TbxCommandStreamReceiver::create(strfilename.str(), true, *executionEnvironment);
|
||||
} else {
|
||||
@@ -44,7 +45,7 @@ class AUBFixture : public CommandQueueHwFixture {
|
||||
|
||||
executionEnvironment->commandStreamReceivers.resize(deviceIndex + 1);
|
||||
|
||||
device.reset(MockDevice::create<MockDevice>(&hwInfo, executionEnvironment, deviceIndex));
|
||||
device.reset(MockDevice::create<MockDevice>(executionEnvironment, deviceIndex));
|
||||
device->resetCommandStreamReceiver(this->csr);
|
||||
|
||||
CommandQueueHwFixture::SetUp(AUBFixture::device.get(), cl_command_queue_properties(0));
|
||||
|
||||
@@ -34,7 +34,7 @@ class EnqueueDebugKernelTest : public ProgramSimpleFixture,
|
||||
device = pDevice;
|
||||
pDevice->executionEnvironment->sourceLevelDebugger.reset(new SourceLevelDebugger(nullptr));
|
||||
|
||||
if (pDevice->getHardwareInfo().pPlatform->eRenderCoreFamily >= IGFX_GEN9_CORE) {
|
||||
if (pDevice->getHardwareInfo().pPlatform.eRenderCoreFamily >= IGFX_GEN9_CORE) {
|
||||
pDevice->getMutableDeviceInfo()->sourceLevelDebuggerActive = true;
|
||||
std::string filename;
|
||||
std::string kernelOption(CompilerOptions::debugKernelEnable);
|
||||
@@ -73,7 +73,7 @@ class EnqueueDebugKernelTest : public ProgramSimpleFixture,
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
if (pDevice->getHardwareInfo().pPlatform->eRenderCoreFamily >= IGFX_GEN9_CORE) {
|
||||
if (pDevice->getHardwareInfo().pPlatform.eRenderCoreFamily >= IGFX_GEN9_CORE) {
|
||||
delete kbHelper;
|
||||
debugKernel->release();
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
// clang-format off
|
||||
// EnqueueTraits
|
||||
using namespace NEO;
|
||||
cl_uint EnqueueTraits::numEventsInWaitList = 0;
|
||||
const cl_event *EnqueueTraits::eventWaitList = nullptr;
|
||||
cl_event *EnqueueTraits::event = nullptr;
|
||||
|
||||
@@ -391,7 +391,7 @@ struct EnqueueReadBufferTraits : public EnqueueTraits {
|
||||
static const size_t sizeInBytes;
|
||||
static void *hostPtr;
|
||||
static cl_command_type cmdType;
|
||||
static GraphicsAllocation *mapAllocation;
|
||||
static NEO::GraphicsAllocation *mapAllocation;
|
||||
};
|
||||
|
||||
template <typename T = EnqueueReadBufferTraits>
|
||||
@@ -406,7 +406,7 @@ struct EnqueueReadBufferHelper {
|
||||
size_t offset = Traits::offset,
|
||||
size_t size = Traits::sizeInBytes,
|
||||
void *ptr = Traits::hostPtr,
|
||||
GraphicsAllocation *mapAllocation = Traits::mapAllocation,
|
||||
NEO::GraphicsAllocation *mapAllocation = Traits::mapAllocation,
|
||||
cl_uint numEventsInWaitList = Traits::numEventsInWaitList,
|
||||
const cl_event *eventWaitList = Traits::eventWaitList,
|
||||
cl_event *event = Traits::event) {
|
||||
@@ -442,7 +442,7 @@ struct EnqueueReadImageTraits : public EnqueueTraits {
|
||||
static const size_t slicePitch;
|
||||
static void *hostPtr;
|
||||
static cl_command_type cmdType;
|
||||
static GraphicsAllocation *mapAllocation;
|
||||
static NEO::GraphicsAllocation *mapAllocation;
|
||||
};
|
||||
|
||||
template <typename T = EnqueueReadImageTraits>
|
||||
@@ -459,7 +459,7 @@ struct EnqueueReadImageHelper {
|
||||
size_t rowPitch = Traits::rowPitch,
|
||||
size_t slicePitch = Traits::slicePitch,
|
||||
void *ptr = Traits::hostPtr,
|
||||
GraphicsAllocation *mapAllocation = Traits::mapAllocation,
|
||||
NEO::GraphicsAllocation *mapAllocation = Traits::mapAllocation,
|
||||
cl_uint numEventsInWaitList = Traits::numEventsInWaitList,
|
||||
const cl_event *eventWaitList = Traits::eventWaitList,
|
||||
cl_event *event = Traits::event) {
|
||||
@@ -497,7 +497,7 @@ struct EnqueueWriteBufferTraits : public EnqueueTraits {
|
||||
static const size_t sizeInBytes;
|
||||
static void *hostPtr;
|
||||
static cl_command_type cmdType;
|
||||
static GraphicsAllocation *mapAllocation;
|
||||
static NEO::GraphicsAllocation *mapAllocation;
|
||||
};
|
||||
|
||||
template <typename T = EnqueueWriteBufferTraits>
|
||||
@@ -512,7 +512,7 @@ struct EnqueueWriteBufferHelper {
|
||||
size_t offset = Traits::offset,
|
||||
size_t size = Traits::sizeInBytes,
|
||||
void *ptr = Traits::hostPtr,
|
||||
GraphicsAllocation *mapAllocation = Traits::mapAllocation,
|
||||
NEO::GraphicsAllocation *mapAllocation = Traits::mapAllocation,
|
||||
cl_uint numEventsInWaitList = Traits::numEventsInWaitList,
|
||||
const cl_event *eventWaitList = Traits::eventWaitList,
|
||||
cl_event *event = Traits::event) {
|
||||
@@ -604,7 +604,7 @@ struct EnqueueWriteImageTraits : public EnqueueTraits {
|
||||
static const size_t slicePitch;
|
||||
static void *hostPtr;
|
||||
static cl_command_type cmdType;
|
||||
static GraphicsAllocation *mapAllocation;
|
||||
static NEO::GraphicsAllocation *mapAllocation;
|
||||
};
|
||||
|
||||
template <typename T = EnqueueWriteImageTraits>
|
||||
@@ -621,7 +621,7 @@ struct EnqueueWriteImageHelper {
|
||||
size_t rowPitch = Traits::rowPitch,
|
||||
size_t slicePitch = Traits::slicePitch,
|
||||
const void *ptr = Traits::hostPtr,
|
||||
GraphicsAllocation *mapAllocation = Traits::mapAllocation,
|
||||
NEO::GraphicsAllocation *mapAllocation = Traits::mapAllocation,
|
||||
cl_uint numEventsInWaitList = Traits::numEventsInWaitList,
|
||||
const cl_event *eventWaitList = Traits::eventWaitList,
|
||||
cl_event *event = Traits::event) {
|
||||
|
||||
@@ -314,8 +314,8 @@ HWCMDTEST_P(IGFX_GEN8_CORE, EnqueueScratchSpaceTests, GivenKernelRequiringScratc
|
||||
auto *sba = (STATE_BASE_ADDRESS *)*itorCmdForStateBase;
|
||||
|
||||
const HardwareInfo &hwInfo = **platformDevices;
|
||||
uint32_t threadPerEU = (hwInfo.pSysInfo->ThreadCount / hwInfo.pSysInfo->EUCount) + hwInfo.capabilityTable.extraQuantityThreadsPerEU;
|
||||
uint32_t maxNumberOfThreads = hwInfo.pSysInfo->EUCount * threadPerEU;
|
||||
uint32_t threadPerEU = (hwInfo.pSysInfo.ThreadCount / hwInfo.pSysInfo.EUCount) + hwInfo.capabilityTable.extraQuantityThreadsPerEU;
|
||||
uint32_t maxNumberOfThreads = hwInfo.pSysInfo.EUCount * threadPerEU;
|
||||
|
||||
// Verify we have a valid length
|
||||
EXPECT_EQ(maxNumberOfThreads, cmd->getMaximumNumberOfThreads());
|
||||
|
||||
@@ -17,7 +17,7 @@ using namespace NEO;
|
||||
|
||||
TEST(localWorkSizeTest, given1DimWorkGroupAndSimdEqual8WhenComputeCalledThenLocalGroupComputed) {
|
||||
//wsInfo maxWorkGroupSize, hasBariers, simdSize, slmTotalSize, coreFamily, numThreadsPerSubSlice, localMemorySize, imgUsed, yTiledSurface
|
||||
WorkSizeInfo wsInfo(256, 0u, 8, 0u, platformDevices[0]->pPlatform->eRenderCoreFamily, 32u, 0u, false, false);
|
||||
WorkSizeInfo wsInfo(256, 0u, 8, 0u, platformDevices[0]->pPlatform.eRenderCoreFamily, 32u, 0u, false, false);
|
||||
uint32_t workDim = 1;
|
||||
size_t workGroup[3] = {6144, 1, 1};
|
||||
size_t workGroupSize[3];
|
||||
@@ -47,7 +47,7 @@ TEST(localWorkSizeTest, given1DimWorkGroupAndSimdEqual8WhenComputeCalledThenLoca
|
||||
}
|
||||
|
||||
TEST(localWorkSizeTest, given1DimWorkGroupAndSimdEqual32WhenComputeCalledThenLocalGroupComputed) {
|
||||
WorkSizeInfo wsInfo(256, 0u, 32, 0u, platformDevices[0]->pPlatform->eRenderCoreFamily, 32u, 0u, false, false);
|
||||
WorkSizeInfo wsInfo(256, 0u, 32, 0u, platformDevices[0]->pPlatform.eRenderCoreFamily, 32u, 0u, false, false);
|
||||
uint32_t workDim = 1;
|
||||
size_t workGroup[3] = {6144, 1, 1};
|
||||
size_t workGroupSize[3];
|
||||
@@ -71,7 +71,7 @@ TEST(localWorkSizeTest, given1DimWorkGroupAndSimdEqual32WhenComputeCalledThenLoc
|
||||
}
|
||||
|
||||
TEST(localWorkSizeTest, given2DimWorkGroupAndSimdEqual8WhenComputeCalledThenLocalGroupComputed) {
|
||||
WorkSizeInfo wsInfo(256, 0u, 8, 0u, platformDevices[0]->pPlatform->eRenderCoreFamily, 56u, 0u, false, false);
|
||||
WorkSizeInfo wsInfo(256, 0u, 8, 0u, platformDevices[0]->pPlatform.eRenderCoreFamily, 56u, 0u, false, false);
|
||||
uint32_t workDim = 2;
|
||||
size_t workGroup[3] = {384, 96, 1};
|
||||
size_t workGroupSize[3];
|
||||
@@ -99,7 +99,7 @@ TEST(localWorkSizeTest, given2DimWorkGroupAndSimdEqual8WhenComputeCalledThenLoca
|
||||
TEST(localWorkSizeTest, given2DimWorkGroupAndSimdEqual32WhenComputeCalledThenLocalGroupComputed) {
|
||||
DebugManagerStateRestore dbgRestore;
|
||||
DebugManager.flags.EnableComputeWorkSizeSquared.set(false);
|
||||
WorkSizeInfo wsInfo(256, 0u, 32, 0u, platformDevices[0]->pPlatform->eRenderCoreFamily, 32u, 0u, false, false);
|
||||
WorkSizeInfo wsInfo(256, 0u, 32, 0u, platformDevices[0]->pPlatform.eRenderCoreFamily, 32u, 0u, false, false);
|
||||
uint32_t workDim = 2;
|
||||
size_t workGroup[3] = {384, 96, 1};
|
||||
size_t workGroupSize[3];
|
||||
@@ -131,7 +131,7 @@ TEST(localWorkSizeTest, given2DimWorkGroupAndSimdEqual32WhenComputeCalledThenLoc
|
||||
}
|
||||
|
||||
TEST(localWorkSizeTest, given3DimWorkGroupAndSimdEqual8WhenComputeCalledThenLocalGroupComputed) {
|
||||
WorkSizeInfo wsInfo(256, 0u, 8, 0u, platformDevices[0]->pPlatform->eRenderCoreFamily, 56u, 0u, false, false);
|
||||
WorkSizeInfo wsInfo(256, 0u, 8, 0u, platformDevices[0]->pPlatform.eRenderCoreFamily, 56u, 0u, false, false);
|
||||
uint32_t workDim = 3;
|
||||
size_t workGroup[3] = {384, 384, 384};
|
||||
size_t workGroupSize[3];
|
||||
@@ -167,7 +167,7 @@ TEST(localWorkSizeTest, given3DimWorkGroupAndSimdEqual8WhenComputeCalledThenLoca
|
||||
}
|
||||
|
||||
TEST(localWorkSizeTest, given3DimWorkGroupAndSimdEqual32WhenComputeCalledThenLocalGroupComputed) {
|
||||
NEO::WorkSizeInfo wsInfo(256, 0u, 32, 0u, platformDevices[0]->pPlatform->eRenderCoreFamily, 32u, 0u, false, false);
|
||||
NEO::WorkSizeInfo wsInfo(256, 0u, 32, 0u, platformDevices[0]->pPlatform.eRenderCoreFamily, 32u, 0u, false, false);
|
||||
uint32_t workDim = 3;
|
||||
size_t workGroup[3] = {384, 384, 384};
|
||||
size_t workGroupSize[3];
|
||||
@@ -213,7 +213,7 @@ TEST(localWorkSizeTest, given2DimWorkGroupAndSquaredAlgorithmWhenComputeCalledTh
|
||||
DebugManagerStateRestore dbgRestore;
|
||||
DebugManager.flags.EnableComputeWorkSizeSquared.set(true);
|
||||
|
||||
WorkSizeInfo wsInfo(256, 0u, 32, 0u, platformDevices[0]->pPlatform->eRenderCoreFamily, 32u, 0u, false, false);
|
||||
WorkSizeInfo wsInfo(256, 0u, 32, 0u, platformDevices[0]->pPlatform.eRenderCoreFamily, 32u, 0u, false, false);
|
||||
uint32_t workDim = 2;
|
||||
size_t workGroup[3] = {384, 96, 1};
|
||||
size_t workGroupSize[3];
|
||||
@@ -228,7 +228,7 @@ TEST(localWorkSizeTest, given1DimWorkGroupAndSquaredAlgorithmOnWhenComputeCalled
|
||||
DebugManagerStateRestore dbgRestore;
|
||||
DebugManager.flags.EnableComputeWorkSizeSquared.set(true);
|
||||
|
||||
WorkSizeInfo wsInfo(256, 0u, 32, 0u, platformDevices[0]->pPlatform->eRenderCoreFamily, 32u, 0u, false, false);
|
||||
WorkSizeInfo wsInfo(256, 0u, 32, 0u, platformDevices[0]->pPlatform.eRenderCoreFamily, 32u, 0u, false, false);
|
||||
uint32_t workDim = 1;
|
||||
size_t workGroup[3] = {1024, 1, 1};
|
||||
size_t workGroupSize[3];
|
||||
@@ -243,7 +243,7 @@ TEST(localWorkSizeTest, given2DdispatchWithImagesAndSquaredAlgorithmOnWhenLwsIsC
|
||||
DebugManagerStateRestore dbgRestore;
|
||||
DebugManager.flags.EnableComputeWorkSizeSquared.set(true);
|
||||
|
||||
WorkSizeInfo wsInfo(256, 0u, 32, 0u, platformDevices[0]->pPlatform->eRenderCoreFamily, 32u, 0u, true, false);
|
||||
WorkSizeInfo wsInfo(256, 0u, 32, 0u, platformDevices[0]->pPlatform.eRenderCoreFamily, 32u, 0u, true, false);
|
||||
uint32_t workDim = 2;
|
||||
size_t workGroup[3] = {256, 96, 1};
|
||||
size_t workGroupSize[3];
|
||||
@@ -255,7 +255,7 @@ TEST(localWorkSizeTest, given2DdispatchWithImagesAndSquaredAlgorithmOnWhenLwsIsC
|
||||
}
|
||||
|
||||
TEST(localWorkSizeTest, givenKernelWithTileYImagesAndBarrierWhenWorkgroupSizeIsComputedThenItMimicsTilingPattern) {
|
||||
WorkSizeInfo wsInfo(256, true, 32, 0u, platformDevices[0]->pPlatform->eRenderCoreFamily, 32u, 0u, true, true);
|
||||
WorkSizeInfo wsInfo(256, true, 32, 0u, platformDevices[0]->pPlatform.eRenderCoreFamily, 32u, 0u, true, true);
|
||||
uint32_t workDim = 2;
|
||||
size_t workGroup[3] = {1, 1, 1};
|
||||
size_t workGroupSize[3];
|
||||
@@ -276,7 +276,7 @@ TEST(localWorkSizeTest, givenKernelWithTileYImagesAndBarrierWhenWorkgroupSizeIsC
|
||||
}
|
||||
|
||||
TEST(localWorkSizeTest, givenKernelWithTileYImagesAndNoBarriersWhenWorkgroupSizeIsComputedThenItMimicsTilingPattern) {
|
||||
WorkSizeInfo wsInfo(256, false, 32, 0u, platformDevices[0]->pPlatform->eRenderCoreFamily, 32u, 0u, true, true);
|
||||
WorkSizeInfo wsInfo(256, false, 32, 0u, platformDevices[0]->pPlatform.eRenderCoreFamily, 32u, 0u, true, true);
|
||||
uint32_t workDim = 2;
|
||||
size_t workGroup[3] = {1, 1, 1};
|
||||
size_t workGroupSize[3];
|
||||
@@ -297,7 +297,7 @@ TEST(localWorkSizeTest, givenKernelWithTileYImagesAndNoBarriersWhenWorkgroupSize
|
||||
}
|
||||
|
||||
TEST(localWorkSizeTest, givenSimd16KernelWithTileYImagesAndNoBarriersWhenWorkgroupSizeIsComputedThenItMimicsTilingPattern) {
|
||||
WorkSizeInfo wsInfo(256, false, 16, 0u, platformDevices[0]->pPlatform->eRenderCoreFamily, 32u, 0u, true, true);
|
||||
WorkSizeInfo wsInfo(256, false, 16, 0u, platformDevices[0]->pPlatform.eRenderCoreFamily, 32u, 0u, true, true);
|
||||
uint32_t workDim = 2;
|
||||
size_t workGroup[3] = {1, 1, 1};
|
||||
size_t workGroupSize[3];
|
||||
@@ -318,7 +318,7 @@ TEST(localWorkSizeTest, givenSimd16KernelWithTileYImagesAndNoBarriersWhenWorkgro
|
||||
}
|
||||
|
||||
TEST(localWorkSizeTest, givenKernelWithTwoDimensionalGlobalSizesWhenLwsIsComputedThenItHasMaxWorkgroupSize) {
|
||||
WorkSizeInfo wsInfo(256, 0u, 32, 0u, platformDevices[0]->pPlatform->eRenderCoreFamily, 32u, 0u, false, false);
|
||||
WorkSizeInfo wsInfo(256, 0u, 32, 0u, platformDevices[0]->pPlatform.eRenderCoreFamily, 32u, 0u, false, false);
|
||||
uint32_t workDim = 2;
|
||||
size_t workGroup[3] = {1, 1, 1};
|
||||
size_t workGroupSize[3];
|
||||
@@ -332,7 +332,7 @@ TEST(localWorkSizeTest, givenKernelWithTwoDimensionalGlobalSizesWhenLwsIsCompute
|
||||
}
|
||||
|
||||
TEST(localWorkSizeTest, givenKernelWithBarriersAndTiledImagesWithYdimensionHigherThenXDimensionWhenLwsIsComputedThenItMimicsTiling) {
|
||||
WorkSizeInfo wsInfo(256, 0u, 32, 0u, platformDevices[0]->pPlatform->eRenderCoreFamily, 32u, 0u, true, true);
|
||||
WorkSizeInfo wsInfo(256, 0u, 32, 0u, platformDevices[0]->pPlatform.eRenderCoreFamily, 32u, 0u, true, true);
|
||||
uint32_t workDim = 2;
|
||||
size_t workGroup[3] = {1, 1, 1};
|
||||
size_t workGroupSize[3];
|
||||
@@ -367,7 +367,7 @@ TEST(localWorkSizeTest, givenKernelWithBarriersAndTiledImagesWithYdimensionHighe
|
||||
}
|
||||
|
||||
TEST(localWorkSizeTest, givenHighOneDimensionalGwsWhenLwsIsComputedThenMaxWorkgoupSizeIsUsed) {
|
||||
WorkSizeInfo wsInfo(256, 0u, 32, 0u, platformDevices[0]->pPlatform->eRenderCoreFamily, 32u, 0u, false, false);
|
||||
WorkSizeInfo wsInfo(256, 0u, 32, 0u, platformDevices[0]->pPlatform.eRenderCoreFamily, 32u, 0u, false, false);
|
||||
uint32_t workDim = 2;
|
||||
size_t workGroup[3] = {1, 1, 1};
|
||||
size_t workGroupSize[3];
|
||||
@@ -388,7 +388,7 @@ TEST(localWorkSizeTest, givenHighOneDimensionalGwsWhenLwsIsComputedThenMaxWorkgo
|
||||
}
|
||||
|
||||
TEST(localWorkSizeTest, givenVeriousGwsSizesWithImagesWhenLwsIsComputedThenProperSizesAreReturned) {
|
||||
WorkSizeInfo wsInfo(256, 0u, 32, 0u, platformDevices[0]->pPlatform->eRenderCoreFamily, 32u, 0u, true, true);
|
||||
WorkSizeInfo wsInfo(256, 0u, 32, 0u, platformDevices[0]->pPlatform.eRenderCoreFamily, 32u, 0u, true, true);
|
||||
uint32_t workDim = 2;
|
||||
size_t workGroup[3] = {1, 1, 1};
|
||||
size_t workGroupSize[3];
|
||||
@@ -432,7 +432,7 @@ TEST(localWorkSizeTest, givenVeriousGwsSizesWithImagesWhenLwsIsComputedThenPrope
|
||||
}
|
||||
|
||||
TEST(localWorkSizeTest, givenHigh1DGwsAndSimdSize16WhenLwsIsComputedThenMaxWorkgroupSizeIsChoosen) {
|
||||
WorkSizeInfo wsInfo(256u, 0u, 16, 0u, platformDevices[0]->pPlatform->eRenderCoreFamily, 56u, 0, false, false);
|
||||
WorkSizeInfo wsInfo(256u, 0u, 16, 0u, platformDevices[0]->pPlatform.eRenderCoreFamily, 56u, 0, false, false);
|
||||
|
||||
size_t workGroup[3] = {1, 1, 1};
|
||||
size_t workGroupSize[3];
|
||||
@@ -445,7 +445,7 @@ TEST(localWorkSizeTest, givenHigh1DGwsAndSimdSize16WhenLwsIsComputedThenMaxWorkg
|
||||
}
|
||||
|
||||
TEST(localWorkSizeTest, givenHigh1DGwsAndSimdSize8WhenLwsIsComputedThenMaxWorkgroupSizeIsChoosen) {
|
||||
WorkSizeInfo wsInfo(256u, 0u, 8, 0u, platformDevices[0]->pPlatform->eRenderCoreFamily, 32u, 0, false, false);
|
||||
WorkSizeInfo wsInfo(256u, 0u, 8, 0u, platformDevices[0]->pPlatform.eRenderCoreFamily, 32u, 0, false, false);
|
||||
|
||||
size_t workGroup[3] = {1, 1, 1};
|
||||
size_t workGroupSize[3];
|
||||
@@ -458,7 +458,7 @@ TEST(localWorkSizeTest, givenHigh1DGwsAndSimdSize8WhenLwsIsComputedThenMaxWorkgr
|
||||
}
|
||||
|
||||
TEST(localWorkSizeTest, givenKernelUtilizingImagesAndSlmWhenLwsIsBeingComputedThenItMimicsGlobalWorkgroupSizes) {
|
||||
WorkSizeInfo wsInfo(256u, 1u, 32, 4096u, platformDevices[0]->pPlatform->eRenderCoreFamily, 56u, 65536u, true, true);
|
||||
WorkSizeInfo wsInfo(256u, 1u, 32, 4096u, platformDevices[0]->pPlatform.eRenderCoreFamily, 56u, 65536u, true, true);
|
||||
uint32_t workDim = 2;
|
||||
size_t workGroup[3] = {1, 1, 1};
|
||||
size_t workGroupSize[3];
|
||||
@@ -479,7 +479,7 @@ TEST(localWorkSizeTest, givenKernelUtilizingImagesAndSlmWhenLwsIsBeingComputedTh
|
||||
}
|
||||
|
||||
TEST(localWorkSizeTest, useStrictRatio) {
|
||||
WorkSizeInfo wsInfo(256u, 0u, 32u, 0u, platformDevices[0]->pPlatform->eRenderCoreFamily, 0u, 0u, true, true);
|
||||
WorkSizeInfo wsInfo(256u, 0u, 32u, 0u, platformDevices[0]->pPlatform.eRenderCoreFamily, 0u, 0u, true, true);
|
||||
uint32_t workDim = 2;
|
||||
size_t workGroup[3] = {194, 234, 1};
|
||||
size_t workGroupSize[3];
|
||||
@@ -507,7 +507,7 @@ TEST(localWorkSizeTest, useStrictRatio) {
|
||||
}
|
||||
|
||||
TEST(localWorkSizeTest, useBarriers) {
|
||||
WorkSizeInfo wsInfo(256u, 1u, 32u, 0u, platformDevices[0]->pPlatform->eRenderCoreFamily, 56u, 0u, true, true);
|
||||
WorkSizeInfo wsInfo(256u, 1u, 32u, 0u, platformDevices[0]->pPlatform.eRenderCoreFamily, 56u, 0u, true, true);
|
||||
uint32_t workDim = 2;
|
||||
size_t workGroup[3] = {194, 234, 1};
|
||||
size_t workGroupSize[3];
|
||||
@@ -533,7 +533,7 @@ TEST(localWorkSizeTest, useBarriers) {
|
||||
}
|
||||
|
||||
TEST(localWorkSizeTest, given2DimWorkWhenComputeSquaredCalledThenLocalGroupComputed) {
|
||||
WorkSizeInfo wsInfo(256, 0u, 16, 0u, platformDevices[0]->pPlatform->eRenderCoreFamily, 6u, 0u, false, false);
|
||||
WorkSizeInfo wsInfo(256, 0u, 16, 0u, platformDevices[0]->pPlatform.eRenderCoreFamily, 6u, 0u, false, false);
|
||||
uint32_t workDim = 2;
|
||||
size_t workGroup[3] = {2048, 272, 1};
|
||||
size_t workGroupSize[3];
|
||||
@@ -582,7 +582,7 @@ TEST(localWorkSizeTest, given2DimWorkWhenComputeSquaredCalledThenLocalGroupCompu
|
||||
TEST(localWorkSizeTest, givenDeviceSupportingLws1024AndKernelCompiledInSimd8WhenGwsIs1024ThenLwsIsComputedAsMaxOptimalMultipliedBySimd) {
|
||||
DebugManagerStateRestore dbgRestore;
|
||||
DebugManager.flags.EnableComputeWorkSizeSquared.set(false);
|
||||
WorkSizeInfo wsInfo(1024, 0u, 8, 0u, platformDevices[0]->pPlatform->eRenderCoreFamily, 56u, 0u, false, false);
|
||||
WorkSizeInfo wsInfo(1024, 0u, 8, 0u, platformDevices[0]->pPlatform.eRenderCoreFamily, 56u, 0u, false, false);
|
||||
|
||||
uint32_t workDim = 2;
|
||||
size_t workGroup[3] = {32, 32, 1};
|
||||
@@ -597,7 +597,7 @@ TEST(localWorkSizeTest, givenDeviceSupportingLws1024AndKernelCompiledInSimd8When
|
||||
TEST(localWorkSizeTest, givenDeviceWith36ThreadsPerSubsliceWhenSimd16KernelIsBeingSubmittedThenWorkgroupContainsOf8HwThreads) {
|
||||
DebugManagerStateRestore dbgRestore;
|
||||
DebugManager.flags.EnableComputeWorkSizeSquared.set(false);
|
||||
WorkSizeInfo wsInfo(256, 0u, 16, 0u, platformDevices[0]->pPlatform->eRenderCoreFamily, 36u, 0u, false, false);
|
||||
WorkSizeInfo wsInfo(256, 0u, 16, 0u, platformDevices[0]->pPlatform.eRenderCoreFamily, 36u, 0u, false, false);
|
||||
|
||||
uint32_t workDim = 2;
|
||||
size_t workGroup[3] = {1024, 1024, 1};
|
||||
@@ -612,7 +612,7 @@ TEST(localWorkSizeTest, givenDeviceWith36ThreadsPerSubsliceWhenSimd16KernelIsBei
|
||||
TEST(localWorkSizeTest, givenDeviceWith56ThreadsPerSubsliceWhenSimd16KernelIsBeingSubmittedThenWorkgroupContainsOf16HwThreads) {
|
||||
DebugManagerStateRestore dbgRestore;
|
||||
DebugManager.flags.EnableComputeWorkSizeSquared.set(false);
|
||||
WorkSizeInfo wsInfo(256, 0u, 16, 0u, platformDevices[0]->pPlatform->eRenderCoreFamily, 56u, 0u, false, false);
|
||||
WorkSizeInfo wsInfo(256, 0u, 16, 0u, platformDevices[0]->pPlatform.eRenderCoreFamily, 56u, 0u, false, false);
|
||||
|
||||
uint32_t workDim = 2;
|
||||
size_t workGroup[3] = {1024, 1024, 1};
|
||||
@@ -625,13 +625,13 @@ TEST(localWorkSizeTest, givenDeviceWith56ThreadsPerSubsliceWhenSimd16KernelIsBei
|
||||
}
|
||||
|
||||
TEST(localWorkSizeTest, givenDispatchInfoWhenWorkSizeInfoIsCreatedThenItHasCorrectNumberOfThreads) {
|
||||
MockDevice device(*platformDevices[0]);
|
||||
MockDevice device;
|
||||
MockKernelWithInternals kernel(device);
|
||||
DispatchInfo dispatchInfo;
|
||||
dispatchInfo.setKernel(kernel.mockKernel);
|
||||
|
||||
auto threadsPerEu = platformDevices[0]->pSysInfo->ThreadCount / platformDevices[0]->pSysInfo->EUCount;
|
||||
auto euPerSubSlice = platformDevices[0]->pSysInfo->ThreadCount / platformDevices[0]->pSysInfo->MaxEuPerSubSlice;
|
||||
auto threadsPerEu = platformDevices[0]->pSysInfo.ThreadCount / platformDevices[0]->pSysInfo.EUCount;
|
||||
auto euPerSubSlice = platformDevices[0]->pSysInfo.ThreadCount / platformDevices[0]->pSysInfo.MaxEuPerSubSlice;
|
||||
|
||||
auto deviceInfo = device.getMutableDeviceInfo();
|
||||
deviceInfo->maxNumEUsPerSubSlice = euPerSubSlice;
|
||||
@@ -641,7 +641,7 @@ TEST(localWorkSizeTest, givenDispatchInfoWhenWorkSizeInfoIsCreatedThenItHasCorre
|
||||
EXPECT_EQ(workSizeInfo.numThreadsPerSubSlice, threadsPerEu * euPerSubSlice);
|
||||
}
|
||||
TEST(localWorkSizeTest, givenMaxWorkgroupSizeEqualToSimdSizeWhenLwsIsCalculatedThenItIsDownsizedToMaxWorkgroupSize) {
|
||||
WorkSizeInfo wsInfo(32, 0u, 32, 0u, platformDevices[0]->pPlatform->eRenderCoreFamily, 32u, 0u, false, false);
|
||||
WorkSizeInfo wsInfo(32, 0u, 32, 0u, platformDevices[0]->pPlatform.eRenderCoreFamily, 32u, 0u, false, false);
|
||||
uint32_t workDim = 2;
|
||||
size_t workGroup[3] = {32, 32, 1};
|
||||
size_t workGroupSize[3];
|
||||
|
||||
@@ -62,15 +62,12 @@ TEST_F(AubCommandStreamReceiverTests, givenStructureWhenMisalignedUint64ThenUseS
|
||||
}
|
||||
|
||||
TEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenItIsCreatedWithWrongGfxCoreFamilyThenNullPointerShouldBeReturned) {
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
GFXCORE_FAMILY family = hwInfo.pPlatform->eRenderCoreFamily;
|
||||
HardwareInfo *hwInfo = pDevice->executionEnvironment->getMutableHardwareInfo();
|
||||
|
||||
const_cast<PLATFORM *>(hwInfo.pPlatform)->eRenderCoreFamily = GFXCORE_FAMILY_FORCE_ULONG; // wrong gfx core family
|
||||
hwInfo->pPlatform.eRenderCoreFamily = GFXCORE_FAMILY_FORCE_ULONG; // wrong gfx core family
|
||||
|
||||
CommandStreamReceiver *aubCsr = AUBCommandStreamReceiver::create("", true, *pDevice->executionEnvironment);
|
||||
EXPECT_EQ(nullptr, aubCsr);
|
||||
|
||||
const_cast<PLATFORM *>(hwInfo.pPlatform)->eRenderCoreFamily = family;
|
||||
}
|
||||
|
||||
TEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenTypeIsCheckedThenAubCsrIsReturned) {
|
||||
@@ -254,7 +251,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenGraphicsAllocationWhenMakeResidentC
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenMultipleInstancesInitializeTheirEnginesThenUniqueGlobalGttAdressesAreGenerated) {
|
||||
pDevice->executionEnvironment->aubCenter.reset(new AubCenter());
|
||||
|
||||
auto engineInstance = HwHelper::get(platformDevices[0]->pPlatform->eRenderCoreFamily).getGpgpuEngineInstances()[0];
|
||||
auto engineInstance = HwHelper::get(platformDevices[0]->pPlatform.eRenderCoreFamily).getGpgpuEngineInstances()[0];
|
||||
MockOsContext osContext(0, 1, engineInstance, PreemptionMode::Disabled, false);
|
||||
|
||||
auto aubCsr1 = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment);
|
||||
|
||||
@@ -475,7 +475,7 @@ HWTEST_F(AubCommandStreamReceiverNoHostPtrTests, givenAubCommandStreamReceiverWh
|
||||
ExecutionEnvironment *executionEnvironment = platformImpl->peekExecutionEnvironment();
|
||||
auto memoryManager = new OsAgnosticMemoryManagerForImagesWithNoHostPtr(*executionEnvironment);
|
||||
executionEnvironment->memoryManager.reset(memoryManager);
|
||||
auto engineInstance = HwHelper::get(platformDevices[0]->pPlatform->eRenderCoreFamily).getGpgpuEngineInstances()[0];
|
||||
auto engineInstance = HwHelper::get(platformDevices[0]->pPlatform.eRenderCoreFamily).getGpgpuEngineInstances()[0];
|
||||
|
||||
MockOsContext osContext(0, 1, engineInstance, PreemptionMode::Disabled, false);
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *executionEnvironment));
|
||||
@@ -717,7 +717,7 @@ HWTEST_F(AubCommandStreamReceiverTests, whenAubCommandStreamReceiverIsCreatedThe
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenEngineIsInitializedThenDumpHandleIsGenerated) {
|
||||
auto engineInstance = HwHelper::get(platformDevices[0]->pPlatform->eRenderCoreFamily).getGpgpuEngineInstances()[0];
|
||||
auto engineInstance = HwHelper::get(platformDevices[0]->pPlatform.eRenderCoreFamily).getGpgpuEngineInstances()[0];
|
||||
MockOsContext osContext(0, 1, engineInstance, PreemptionMode::Disabled, false);
|
||||
MockExecutionEnvironment executionEnvironment(platformDevices[0]);
|
||||
|
||||
@@ -877,9 +877,6 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenSshSize
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenPhysicalAddressAllocatorIsCreatedThenItIsNotNull) {
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment);
|
||||
auto oldSkuTable = hwInfoHelper.pSkuTable;
|
||||
std::unique_ptr<FeatureTable, std::function<void(FeatureTable *)>> skuTable(new FeatureTable, [&](FeatureTable *ptr) { delete ptr; hwInfoHelper.pSkuTable = oldSkuTable; });
|
||||
hwInfoHelper.pSkuTable = skuTable.get();
|
||||
std::unique_ptr<PhysicalAddressAllocator> allocator(aubCsr.createPhysicalAddressAllocator(&hwInfoHelper));
|
||||
ASSERT_NE(nullptr, allocator);
|
||||
}
|
||||
|
||||
@@ -419,7 +419,7 @@ TEST(CommandStreamReceiverSimpleTest, givenVariousDataSetsWhenVerifyingMemoryThe
|
||||
TEST(CommandStreamReceiverMultiContextTests, givenMultipleCsrsWhenSameResourcesAreUsedThenResidencyIsProperlyHandled) {
|
||||
auto executionEnvironment = platformImpl->peekExecutionEnvironment();
|
||||
|
||||
std::unique_ptr<MockDevice> device(Device::create<MockDevice>(nullptr, executionEnvironment, 0u));
|
||||
std::unique_ptr<MockDevice> device(Device::create<MockDevice>(executionEnvironment, 0u));
|
||||
|
||||
auto &commandStreamReceiver0 = *executionEnvironment->commandStreamReceivers[0][0];
|
||||
auto &commandStreamReceiver1 = *executionEnvironment->commandStreamReceivers[0][1];
|
||||
@@ -458,7 +458,7 @@ struct CreateAllocationForHostSurfaceTest : public ::testing::Test {
|
||||
executionEnvironment->setHwInfo(&hwInfo);
|
||||
gmockMemoryManager = new ::testing::NiceMock<GMockMemoryManager>(*executionEnvironment);
|
||||
executionEnvironment->memoryManager.reset(gmockMemoryManager);
|
||||
device.reset(MockDevice::create<MockDevice>(&hwInfo, executionEnvironment, 0u));
|
||||
device.reset(MockDevice::create<MockDevice>(executionEnvironment, 0u));
|
||||
commandStreamReceiver = &device->getCommandStreamReceiver();
|
||||
}
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
|
||||
@@ -136,7 +136,7 @@ HWTEST_F(CommandStreamReceiverWithAubDumpSimpleTest, givenCsrWithAubDumpWhenSett
|
||||
ExecutionEnvironment *executionEnvironment = platformImpl->peekExecutionEnvironment();
|
||||
|
||||
CommandStreamReceiverWithAUBDump<UltCommandStreamReceiver<FamilyType>> csrWithAubDump("aubfile", *executionEnvironment);
|
||||
MockOsContext osContext(0, 1, HwHelper::get(platformDevices[0]->pPlatform->eRenderCoreFamily).getGpgpuEngineInstances()[0],
|
||||
MockOsContext osContext(0, 1, HwHelper::get(platformDevices[0]->pPlatform.eRenderCoreFamily).getGpgpuEngineInstances()[0],
|
||||
PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]), false);
|
||||
|
||||
csrWithAubDump.setupContext(osContext);
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
|
||||
namespace NEO {
|
||||
bool operator==(const HardwareInfo &hwInfoIn, const HardwareInfo &hwInfoOut) {
|
||||
bool result = (0 == memcmp(hwInfoIn.pPlatform, hwInfoOut.pPlatform, sizeof(PLATFORM)));
|
||||
result &= (0 == memcmp(hwInfoIn.pSkuTable, hwInfoOut.pSkuTable, sizeof(FeatureTable)));
|
||||
result &= (0 == memcmp(hwInfoIn.pWaTable, hwInfoOut.pWaTable, sizeof(WorkaroundTable)));
|
||||
bool result = (0 == memcmp(&hwInfoIn.pPlatform, &hwInfoOut.pPlatform, sizeof(PLATFORM)));
|
||||
result &= (0 == memcmp(&hwInfoIn.pSkuTable, &hwInfoOut.pSkuTable, sizeof(FeatureTable)));
|
||||
result &= (0 == memcmp(&hwInfoIn.pWaTable, &hwInfoOut.pWaTable, sizeof(WorkaroundTable)));
|
||||
result &= (0 == memcmp(&hwInfoIn.capabilityTable, &hwInfoOut.capabilityTable, sizeof(RuntimeCapabilityTable)));
|
||||
return result;
|
||||
}
|
||||
@@ -28,19 +28,13 @@ bool operator==(const HardwareInfo &hwInfoIn, const HardwareInfo &hwInfoOut) {
|
||||
struct GetDevicesTest : ::testing::Test {
|
||||
void SetUp() override {
|
||||
overrideDeviceWithDefaultHardwareInfo = false;
|
||||
gtSystemInfo = *platformDevices[0]->pSysInfo;
|
||||
}
|
||||
void TearDown() override {
|
||||
overrideDeviceWithDefaultHardwareInfo = true;
|
||||
memcpy(const_cast<GT_SYSTEM_INFO *>(platformDevices[0]->pSysInfo), >SystemInfo, sizeof(GT_SYSTEM_INFO));
|
||||
}
|
||||
GT_SYSTEM_INFO gtSystemInfo;
|
||||
int i = 0;
|
||||
size_t numDevices = 0;
|
||||
HardwareInfo *hwInfo = nullptr;
|
||||
FeatureTable featureTable = {};
|
||||
WorkaroundTable workaroundTable = {};
|
||||
GT_SYSTEM_INFO sysInfo = {};
|
||||
const HardwareInfo *hwInfo = nullptr;
|
||||
DebugManagerStateRestore stateRestorer;
|
||||
};
|
||||
|
||||
@@ -67,7 +61,8 @@ HWTEST_F(GetDevicesTest, givenGetDevicesWhenCsrIsSetToVariousTypesThenTheFunctio
|
||||
DebugManager.flags.ProductFamilyOverride.set(productFamily);
|
||||
ExecutionEnvironment *exeEnv = platformImpl->peekExecutionEnvironment();
|
||||
|
||||
const auto ret = getDevices(&hwInfo, numDevices, *exeEnv);
|
||||
const auto ret = getDevices(numDevices, *exeEnv);
|
||||
hwInfo = exeEnv->getHardwareInfo();
|
||||
|
||||
switch (csrType) {
|
||||
case CSR_HW:
|
||||
@@ -87,20 +82,20 @@ HWTEST_F(GetDevicesTest, givenGetDevicesWhenCsrIsSetToVariousTypesThenTheFunctio
|
||||
auto hardwareInfo = hardwareInfoTable[i];
|
||||
if (hardwareInfo == nullptr)
|
||||
continue;
|
||||
if (hardwareInfoTable[i]->pPlatform->eProductFamily == hwInfo->pPlatform->eProductFamily)
|
||||
if (hardwareInfoTable[i]->pPlatform.eProductFamily == hwInfo->pPlatform.eProductFamily)
|
||||
break;
|
||||
}
|
||||
EXPECT_TRUE(i < IGFX_MAX_PRODUCT);
|
||||
ASSERT_NE(nullptr, hardwarePrefix[i]);
|
||||
|
||||
HardwareInfo hwInfoFromTable = *hardwareInfoTable[i];
|
||||
hwInfoFromTable.pSkuTable = &featureTable;
|
||||
hwInfoFromTable.pWaTable = &workaroundTable;
|
||||
hwInfoFromTable.pSysInfo = &sysInfo;
|
||||
hardwareInfoSetup[hwInfoFromTable.pPlatform->eProductFamily](&hwInfoFromTable, true, "default");
|
||||
HwInfoConfig *hwConfig = HwInfoConfig::get(hwInfoFromTable.pPlatform->eProductFamily);
|
||||
hwInfoFromTable.pSkuTable = {};
|
||||
hwInfoFromTable.pWaTable = {};
|
||||
hwInfoFromTable.pSysInfo = {};
|
||||
hardwareInfoSetup[hwInfoFromTable.pPlatform.eProductFamily](&hwInfoFromTable, true, "default");
|
||||
HwInfoConfig *hwConfig = HwInfoConfig::get(hwInfoFromTable.pPlatform.eProductFamily);
|
||||
hwConfig->configureHardwareCustom(&hwInfoFromTable, nullptr);
|
||||
EXPECT_EQ(0, memcmp(hwInfoFromTable.pPlatform, hwInfo->pPlatform, sizeof(PLATFORM)));
|
||||
EXPECT_EQ(0, memcmp(&hwInfoFromTable.pPlatform, &hwInfo->pPlatform, sizeof(PLATFORM)));
|
||||
EXPECT_EQ(0, memcmp(&hwInfoFromTable.capabilityTable, &hwInfo->capabilityTable, sizeof(RuntimeCapabilityTable)));
|
||||
|
||||
EXPECT_STREQ(hardwarePrefix[i], productFamily.c_str());
|
||||
@@ -125,13 +120,13 @@ HWTEST_F(GetDevicesTest, givenGetDevicesAndUnknownProductFamilyWhenCsrIsSetToVal
|
||||
DebugManager.flags.ProductFamilyOverride.set(productFamily);
|
||||
ExecutionEnvironment *exeEnv = platformImpl->peekExecutionEnvironment();
|
||||
|
||||
auto ret = getDevices(&hwInfo, numDevices, *exeEnv);
|
||||
auto ret = getDevices(numDevices, *exeEnv);
|
||||
hwInfo = exeEnv->getHardwareInfo();
|
||||
|
||||
switch (csrType) {
|
||||
case CSR_HW:
|
||||
case CSR_HW_WITH_AUB:
|
||||
EXPECT_TRUE(ret);
|
||||
EXPECT_NE(nullptr, hwInfo);
|
||||
EXPECT_EQ(expectedDevices, numDevices);
|
||||
DeviceFactory::releaseDevices();
|
||||
break;
|
||||
@@ -145,19 +140,19 @@ HWTEST_F(GetDevicesTest, givenGetDevicesAndUnknownProductFamilyWhenCsrIsSetToVal
|
||||
auto hardwareInfo = hardwareInfoTable[i];
|
||||
if (hardwareInfo == nullptr)
|
||||
continue;
|
||||
if (hardwareInfoTable[i]->pPlatform->eProductFamily == hwInfo->pPlatform->eProductFamily)
|
||||
if (hardwareInfoTable[i]->pPlatform.eProductFamily == hwInfo->pPlatform.eProductFamily)
|
||||
break;
|
||||
}
|
||||
EXPECT_TRUE(i < IGFX_MAX_PRODUCT);
|
||||
ASSERT_NE(nullptr, hardwarePrefix[i]);
|
||||
HardwareInfo defaultHwInfo = **platformDevices;
|
||||
defaultHwInfo.pSkuTable = &featureTable;
|
||||
defaultHwInfo.pWaTable = &workaroundTable;
|
||||
defaultHwInfo.pSysInfo = &sysInfo;
|
||||
hardwareInfoSetup[defaultHwInfo.pPlatform->eProductFamily](&defaultHwInfo, true, "default");
|
||||
HwInfoConfig *hwConfig = HwInfoConfig::get(defaultHwInfo.pPlatform->eProductFamily);
|
||||
defaultHwInfo.pSkuTable = {};
|
||||
defaultHwInfo.pWaTable = {};
|
||||
defaultHwInfo.pSysInfo = {};
|
||||
hardwareInfoSetup[defaultHwInfo.pPlatform.eProductFamily](&defaultHwInfo, true, "default");
|
||||
HwInfoConfig *hwConfig = HwInfoConfig::get(defaultHwInfo.pPlatform.eProductFamily);
|
||||
hwConfig->configureHardwareCustom(&defaultHwInfo, nullptr);
|
||||
EXPECT_EQ(0, memcmp(defaultHwInfo.pPlatform, hwInfo->pPlatform, sizeof(PLATFORM)));
|
||||
EXPECT_EQ(0, memcmp(&defaultHwInfo.pPlatform, &hwInfo->pPlatform, sizeof(PLATFORM)));
|
||||
EXPECT_EQ(0, memcmp(&defaultHwInfo.capabilityTable, &hwInfo->capabilityTable, sizeof(RuntimeCapabilityTable)));
|
||||
DeviceFactory::releaseDevices();
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ HWTEST_F(TbxCommandStreamTests, DISABLED_getCsTraits) {
|
||||
|
||||
TEST(TbxCommandStreamReceiverTest, givenNullFactoryEntryWhenTbxCsrIsCreatedThenNullptrIsReturned) {
|
||||
ExecutionEnvironment *executionEnvironment = platformImpl->peekExecutionEnvironment();
|
||||
GFXCORE_FAMILY family = executionEnvironment->getHardwareInfo()->pPlatform->eRenderCoreFamily;
|
||||
GFXCORE_FAMILY family = executionEnvironment->getHardwareInfo()->pPlatform.eRenderCoreFamily;
|
||||
VariableBackup<TbxCommandStreamReceiverCreateFunc> tbxCsrFactoryBackup(&tbxCommandStreamReceiverFactory[family]);
|
||||
|
||||
tbxCommandStreamReceiverFactory[family] = nullptr;
|
||||
@@ -143,15 +143,12 @@ TEST(TbxCommandStreamReceiverTest, givenNullFactoryEntryWhenTbxCsrIsCreatedThenN
|
||||
|
||||
TEST(TbxCommandStreamReceiverTest, givenTbxCommandStreamReceiverWhenItIsCreatedWithWrongGfxCoreFamilyThenNullPointerShouldBeReturned) {
|
||||
ExecutionEnvironment *executionEnvironment = platformImpl->peekExecutionEnvironment();
|
||||
auto hwInfo = executionEnvironment->getHardwareInfo();
|
||||
GFXCORE_FAMILY family = hwInfo->pPlatform->eRenderCoreFamily;
|
||||
auto hwInfo = executionEnvironment->getMutableHardwareInfo();
|
||||
|
||||
const_cast<PLATFORM *>(hwInfo->pPlatform)->eRenderCoreFamily = GFXCORE_FAMILY_FORCE_ULONG; // wrong gfx core family
|
||||
hwInfo->pPlatform.eRenderCoreFamily = GFXCORE_FAMILY_FORCE_ULONG; // wrong gfx core family
|
||||
|
||||
CommandStreamReceiver *csr = TbxCommandStreamReceiver::create("", false, *executionEnvironment);
|
||||
EXPECT_EQ(nullptr, csr);
|
||||
|
||||
const_cast<PLATFORM *>(hwInfo->pPlatform)->eRenderCoreFamily = family;
|
||||
}
|
||||
|
||||
TEST(TbxCommandStreamReceiverTest, givenTbxCommandStreamReceiverWhenTypeIsCheckedThenTbxCsrIsReturned) {
|
||||
@@ -387,12 +384,8 @@ HWTEST_F(TbxCommandSteamSimpleTest, whenTbxCommandStreamReceiverIsCreatedThenPPG
|
||||
|
||||
HWTEST_F(TbxCommandSteamSimpleTest, givenTbxCommandStreamReceiverWhenPhysicalAddressAllocatorIsCreatedThenItIsNotNull) {
|
||||
MockTbxCsr<FamilyType> tbxCsr(*pDevice->executionEnvironment);
|
||||
auto oldSkuTable = hwInfoHelper.pSkuTable;
|
||||
std::unique_ptr<FeatureTable, std::function<void(FeatureTable *)>> skuTable(new FeatureTable, [&](FeatureTable *ptr) { delete ptr; hwInfoHelper.pSkuTable = oldSkuTable; });
|
||||
hwInfoHelper.pSkuTable = skuTable.get();
|
||||
std::unique_ptr<PhysicalAddressAllocator> allocator(tbxCsr.createPhysicalAddressAllocator(&hwInfoHelper));
|
||||
ASSERT_NE(nullptr, allocator);
|
||||
hwInfoHelper.pSkuTable = nullptr;
|
||||
}
|
||||
|
||||
HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverWhenItIsCreatedWithUseAubStreamFalseThenDontInitializeAubManager) {
|
||||
@@ -505,7 +498,7 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenHardwareContextIsCreatedThenTbxSt
|
||||
|
||||
HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenOsContextIsSetThenCreateHardwareContext) {
|
||||
auto hwInfo = pDevice->executionEnvironment->getHardwareInfo();
|
||||
MockOsContext osContext(0, 1, HwHelper::get(hwInfo->pPlatform->eRenderCoreFamily).getGpgpuEngineInstances()[0],
|
||||
MockOsContext osContext(0, 1, HwHelper::get(hwInfo->pPlatform.eRenderCoreFamily).getGpgpuEngineInstances()[0],
|
||||
PreemptionMode::Disabled, false);
|
||||
std::string fileName = "";
|
||||
MockAubManager *mockManager = new MockAubManager();
|
||||
|
||||
@@ -181,17 +181,17 @@ TEST_F(BinaryCacheHashTests, testUnique) {
|
||||
|
||||
PLATFORM p1 = {(PRODUCT_FAMILY)1};
|
||||
PLATFORM p2 = {(PRODUCT_FAMILY)2};
|
||||
const PLATFORM *platforms[] = {nullptr, &p1, &p2};
|
||||
const PLATFORM *platforms[] = {&p1, &p2};
|
||||
FeatureTable s1;
|
||||
FeatureTable s2;
|
||||
s1.ftrSVM = true;
|
||||
s2.ftrSVM = false;
|
||||
const FeatureTable *skus[] = {nullptr, &s1, &s2};
|
||||
const FeatureTable *skus[] = {&s1, &s2};
|
||||
WorkaroundTable w1;
|
||||
WorkaroundTable w2;
|
||||
w1.waDoNotUseMIReportPerfCount = true;
|
||||
w2.waDoNotUseMIReportPerfCount = false;
|
||||
const WorkaroundTable *was[] = {nullptr, &w1, &w2};
|
||||
const WorkaroundTable *was[] = {&w1, &w2};
|
||||
// GT_SYSTEM_INFO s1 = {};
|
||||
|
||||
std::array<std::string, 4> input = {{std::string(""),
|
||||
@@ -219,13 +219,13 @@ TEST_F(BinaryCacheHashTests, testUnique) {
|
||||
std::unique_ptr<char> buf4(new char[bufSize]);
|
||||
|
||||
for (auto platform : platforms) {
|
||||
hwInfo.pPlatform = platform;
|
||||
hwInfo.pPlatform = *platform;
|
||||
|
||||
for (auto sku : skus) {
|
||||
hwInfo.pSkuTable = sku;
|
||||
hwInfo.pSkuTable = *sku;
|
||||
|
||||
for (auto wa : was) {
|
||||
hwInfo.pWaTable = wa;
|
||||
hwInfo.pWaTable = *wa;
|
||||
|
||||
for (size_t i1 = 0; i1 < input.size(); i1++) {
|
||||
strcpy_s(buf1.get(), bufSize, input[i1].c_str());
|
||||
|
||||
@@ -731,7 +731,7 @@ TEST_F(CompilerInterfaceTest, GivenRequestForNewFclTranslationCtxWhenDeviceCtxIs
|
||||
auto firstBaseCtx = this->pCompilerInterface->getFclBaseTranslationCtx();
|
||||
EXPECT_NE(nullptr, firstBaseCtx);
|
||||
|
||||
MockDevice md{device->getHardwareInfo()};
|
||||
MockDevice md;
|
||||
auto ret2 = this->pCompilerInterface->createFclTranslationCtx(md, IGC::CodeType::oclC, IGC::CodeType::spirV);
|
||||
EXPECT_NE(nullptr, ret2.get());
|
||||
EXPECT_EQ(firstBaseCtx, this->pCompilerInterface->getFclBaseTranslationCtx());
|
||||
@@ -848,20 +848,20 @@ TEST_F(CompilerInterfaceTest, givenNoDbgKeyForceUseDifferentPlatformWhenRequestF
|
||||
IGC::IgcOclDeviceCtxTagOCL *devCtx = pCompilerInterface->peekIgcDeviceCtx(device);
|
||||
auto igcPlatform = devCtx->GetPlatformHandle();
|
||||
auto igcSysInfo = devCtx->GetGTSystemInfoHandle();
|
||||
EXPECT_EQ(device->getHardwareInfo().pPlatform->eProductFamily, igcPlatform->GetProductFamily());
|
||||
EXPECT_EQ(device->getHardwareInfo().pPlatform->eRenderCoreFamily, igcPlatform->GetRenderCoreFamily());
|
||||
EXPECT_EQ(device->getHardwareInfo().pSysInfo->SliceCount, igcSysInfo->GetSliceCount());
|
||||
EXPECT_EQ(device->getHardwareInfo().pSysInfo->SubSliceCount, igcSysInfo->GetSubSliceCount());
|
||||
EXPECT_EQ(device->getHardwareInfo().pSysInfo->EUCount, igcSysInfo->GetEUCount());
|
||||
EXPECT_EQ(device->getHardwareInfo().pSysInfo->ThreadCount, igcSysInfo->GetThreadCount());
|
||||
EXPECT_TRUE(device->getHardwareInfo().pPlatform.eProductFamily == igcPlatform->GetProductFamily());
|
||||
EXPECT_TRUE(device->getHardwareInfo().pPlatform.eRenderCoreFamily == igcPlatform->GetRenderCoreFamily());
|
||||
EXPECT_TRUE(device->getHardwareInfo().pSysInfo.SliceCount == igcSysInfo->GetSliceCount());
|
||||
EXPECT_TRUE(device->getHardwareInfo().pSysInfo.SubSliceCount == igcSysInfo->GetSubSliceCount());
|
||||
EXPECT_TRUE(device->getHardwareInfo().pSysInfo.EUCount == igcSysInfo->GetEUCount());
|
||||
EXPECT_TRUE(device->getHardwareInfo().pSysInfo.ThreadCount == igcSysInfo->GetThreadCount());
|
||||
}
|
||||
|
||||
TEST_F(CompilerInterfaceTest, givenDbgKeyForceUseDifferentPlatformWhenRequestForNewTranslationCtxThenUseDbgKeyPlatform) {
|
||||
DebugManagerStateRestore dbgRestore;
|
||||
auto dbgProdFamily = DEFAULT_TEST_PLATFORM::hwInfo.pPlatform->eProductFamily;
|
||||
auto dbgProdFamily = DEFAULT_TEST_PLATFORM::hwInfo.pPlatform.eProductFamily;
|
||||
std::string dbgPlatformString(hardwarePrefix[dbgProdFamily]);
|
||||
const PLATFORM dbgPlatform = *hardwareInfoTable[dbgProdFamily]->pPlatform;
|
||||
const GT_SYSTEM_INFO dbgSystemInfo = *hardwareInfoTable[dbgProdFamily]->pSysInfo;
|
||||
const PLATFORM dbgPlatform = hardwareInfoTable[dbgProdFamily]->pPlatform;
|
||||
const GT_SYSTEM_INFO dbgSystemInfo = hardwareInfoTable[dbgProdFamily]->pSysInfo;
|
||||
DebugManager.flags.ForceCompilerUsePlatform.set(dbgPlatformString);
|
||||
|
||||
auto device = this->pContext->getDevice(0);
|
||||
|
||||
@@ -304,7 +304,7 @@ class ContextWithAsyncDeleterTest : public ::testing::WithParamInterface<bool>,
|
||||
public:
|
||||
void SetUp() override {
|
||||
memoryManager = new MockMemoryManager();
|
||||
device = new MockDevice(*platformDevices[0]);
|
||||
device = new MockDevice;
|
||||
deleter = new MockDeferredDeleter();
|
||||
device->injectMemoryManager(memoryManager);
|
||||
memoryManager->setDeferredDeleter(deleter);
|
||||
|
||||
@@ -117,7 +117,7 @@ TEST_P(PerformanceHintCommandQueueTest, GivenProfilingFlagAndPreemptionFlagWhenC
|
||||
EXPECT_EQ(profilingEnabled, containsHint(expectedHint, userData));
|
||||
|
||||
snprintf(expectedHint, DriverDiagnostics::maxHintStringSize, DriverDiagnostics::hintFormat[PROFILING_ENABLED_WITH_DISABLED_PREEMPTION], 0);
|
||||
if (device->getHardwareInfo().pPlatform->eProductFamily < IGFX_SKYLAKE && preemptionSupported && profilingEnabled) {
|
||||
if (device->getHardwareInfo().pPlatform.eProductFamily < IGFX_SKYLAKE && preemptionSupported && profilingEnabled) {
|
||||
EXPECT_TRUE(containsHint(expectedHint, userData));
|
||||
} else {
|
||||
EXPECT_FALSE(containsHint(expectedHint, userData));
|
||||
@@ -142,7 +142,7 @@ TEST_P(PerformanceHintCommandQueueTest, GivenEnabledProfilingFlagAndSupportedPre
|
||||
EXPECT_EQ(profilingEnabled, containsHint(expectedHint, userData));
|
||||
|
||||
snprintf(expectedHint, DriverDiagnostics::maxHintStringSize, DriverDiagnostics::hintFormat[PROFILING_ENABLED_WITH_DISABLED_PREEMPTION], 0);
|
||||
if (device->getHardwareInfo().pPlatform->eProductFamily < IGFX_SKYLAKE && preemptionSupported && profilingEnabled) {
|
||||
if (device->getHardwareInfo().pPlatform.eProductFamily < IGFX_SKYLAKE && preemptionSupported && profilingEnabled) {
|
||||
EXPECT_TRUE(containsHint(expectedHint, userData));
|
||||
} else {
|
||||
EXPECT_FALSE(containsHint(expectedHint, userData));
|
||||
|
||||
@@ -113,7 +113,7 @@ struct PerformanceHintCommandQueueTest : public PerformanceHintTest,
|
||||
void SetUp() override {
|
||||
PerformanceHintTest::SetUp();
|
||||
std::tie(profilingEnabled, preemptionSupported) = GetParam();
|
||||
device = new MockDevice(*platformDevices[0]);
|
||||
device = new MockDevice;
|
||||
device->getDeviceInfoToModify()->preemptionSupported = preemptionSupported;
|
||||
}
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ TEST(ImageFormats, isDepthFormat) {
|
||||
struct PackedYuvExtensionSupportedImageFormatsTest : public ::testing::TestWithParam<std::tuple<uint64_t, uint32_t>> {
|
||||
|
||||
void SetUp() override {
|
||||
device = std::unique_ptr<MockDevice>(new MockDevice(*platformDevices[0]));
|
||||
device = std::unique_ptr<MockDevice>(new MockDevice());
|
||||
context = std::unique_ptr<MockContext>(new MockContext(device.get(), true));
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ TEST_P(PackedYuvExtensionSupportedImageFormatsTest, retrieveImageFormatsPackedYU
|
||||
struct NV12ExtensionSupportedImageFormatsTest : public ::testing::TestWithParam<std::tuple<uint64_t, uint32_t>> {
|
||||
|
||||
void SetUp() override {
|
||||
device = std::unique_ptr<MockDevice>(new MockDevice(*platformDevices[0]));
|
||||
device = std::unique_ptr<MockDevice>(new MockDevice());
|
||||
context = std::unique_ptr<MockContext>(new MockContext(device.get(), true));
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ TEST_F(DeviceGetCapsF, GivenDeviceCapsWhenQueryingForSLMWindowStartAddressThenPo
|
||||
TEST(Device_GetCaps, validate) {
|
||||
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(platformDevices[0]));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
const auto &sysInfo = *platformDevices[0]->pSysInfo;
|
||||
const auto &sysInfo = platformDevices[0]->pSysInfo;
|
||||
|
||||
EXPECT_NE(nullptr, caps.builtInKernels);
|
||||
|
||||
@@ -107,7 +107,7 @@ TEST(Device_GetCaps, validate) {
|
||||
EXPECT_EQ(static_cast<cl_bool>(CL_TRUE), caps.deviceAvailable);
|
||||
EXPECT_EQ(static_cast<cl_device_mem_cache_type>(CL_READ_WRITE_CACHE), caps.globalMemCacheType);
|
||||
|
||||
EXPECT_EQ(sysInfo.EUCount, caps.maxComputUnits);
|
||||
EXPECT_TRUE(sysInfo.EUCount == caps.maxComputUnits);
|
||||
EXPECT_LT(0u, caps.maxConstantArgs);
|
||||
|
||||
EXPECT_LE(128u, caps.maxReadImageArgs);
|
||||
@@ -187,7 +187,7 @@ TEST(Device_GetCaps, validateImage3DDimensions) {
|
||||
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(platformDevices[0]));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
|
||||
if (device->getHardwareInfo().pPlatform->eRenderCoreFamily > IGFX_GEN8_CORE) {
|
||||
if (device->getHardwareInfo().pPlatform.eRenderCoreFamily > IGFX_GEN8_CORE) {
|
||||
EXPECT_EQ(16384u, caps.image3DMaxWidth);
|
||||
EXPECT_EQ(16384u, caps.image3DMaxHeight);
|
||||
} else {
|
||||
@@ -339,7 +339,7 @@ TEST(Device_GetCaps, givenGlobalMemSizeWhenCalculatingMaxAllocSizeThenAdjustToHW
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
|
||||
HardwareCapabilities hwCaps = {0};
|
||||
auto &hwHelper = HwHelper::get(platformDevices[0]->pPlatform->eRenderCoreFamily);
|
||||
auto &hwHelper = HwHelper::get(platformDevices[0]->pPlatform.eRenderCoreFamily);
|
||||
hwHelper.setupHardwareCapabilities(&hwCaps, *platformDevices[0]);
|
||||
|
||||
uint64_t expectedSize = std::max((caps.globalMemSize / 2), static_cast<uint64_t>(128ULL * MemoryConstants::megaByte));
|
||||
@@ -714,10 +714,9 @@ TEST(DeviceGetCaps, givenOclVersion21WhenCapsAreCreatedThenDeviceReportsSpirvAsS
|
||||
}
|
||||
|
||||
TEST(DeviceGetCaps, givenDisabledFtrPooledEuWhenCalculatingMaxEuPerSSThenIgnoreEuCountPerPoolMin) {
|
||||
GT_SYSTEM_INFO mySysInfo = *platformDevices[0]->pSysInfo;
|
||||
FeatureTable mySkuTable = *platformDevices[0]->pSkuTable;
|
||||
HardwareInfo myHwInfo = {platformDevices[0]->pPlatform, &mySkuTable, platformDevices[0]->pWaTable,
|
||||
&mySysInfo, platformDevices[0]->capabilityTable};
|
||||
HardwareInfo myHwInfo = *platformDevices[0];
|
||||
GT_SYSTEM_INFO &mySysInfo = myHwInfo.pSysInfo;
|
||||
FeatureTable &mySkuTable = myHwInfo.pSkuTable;
|
||||
|
||||
mySysInfo.EUCount = 20;
|
||||
mySysInfo.EuCountPerPoolMin = 99999;
|
||||
@@ -733,10 +732,9 @@ TEST(DeviceGetCaps, givenDisabledFtrPooledEuWhenCalculatingMaxEuPerSSThenIgnoreE
|
||||
}
|
||||
|
||||
TEST(DeviceGetCaps, givenEnabledFtrPooledEuWhenCalculatingMaxEuPerSSThenDontIgnoreEuCountPerPoolMin) {
|
||||
GT_SYSTEM_INFO mySysInfo = *platformDevices[0]->pSysInfo;
|
||||
FeatureTable mySkuTable = *platformDevices[0]->pSkuTable;
|
||||
HardwareInfo myHwInfo = {platformDevices[0]->pPlatform, &mySkuTable, platformDevices[0]->pWaTable,
|
||||
&mySysInfo, platformDevices[0]->capabilityTable};
|
||||
HardwareInfo myHwInfo = *platformDevices[0];
|
||||
GT_SYSTEM_INFO &mySysInfo = myHwInfo.pSysInfo;
|
||||
FeatureTable &mySkuTable = myHwInfo.pSkuTable;
|
||||
|
||||
mySysInfo.EUCount = 20;
|
||||
mySysInfo.EuCountPerPoolMin = 99999;
|
||||
@@ -754,10 +752,8 @@ TEST(DeviceGetCaps, givenDebugFlagToUseMaxSimdSizeForWkgCalculationWhenDeviceCap
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.UseMaxSimdSizeToDeduceMaxWorkgroupSize.set(true);
|
||||
|
||||
GT_SYSTEM_INFO mySysInfo = *platformDevices[0]->pSysInfo;
|
||||
FeatureTable mySkuTable = *platformDevices[0]->pSkuTable;
|
||||
HardwareInfo myHwInfo = {platformDevices[0]->pPlatform, &mySkuTable, platformDevices[0]->pWaTable,
|
||||
&mySysInfo, platformDevices[0]->capabilityTable};
|
||||
HardwareInfo myHwInfo = *platformDevices[0];
|
||||
GT_SYSTEM_INFO &mySysInfo = myHwInfo.pSysInfo;
|
||||
|
||||
mySysInfo.EUCount = 24;
|
||||
mySysInfo.SubSliceCount = 3;
|
||||
@@ -769,10 +765,8 @@ TEST(DeviceGetCaps, givenDebugFlagToUseMaxSimdSizeForWkgCalculationWhenDeviceCap
|
||||
}
|
||||
|
||||
TEST(DeviceGetCaps, givenDeviceThatHasHighNumberOfExecutionUnitsWhenMaxWorkgroupSizeIsComputedItIsLimitedTo1024) {
|
||||
GT_SYSTEM_INFO mySysInfo = *platformDevices[0]->pSysInfo;
|
||||
FeatureTable mySkuTable = *platformDevices[0]->pSkuTable;
|
||||
HardwareInfo myHwInfo = {platformDevices[0]->pPlatform, &mySkuTable, platformDevices[0]->pWaTable,
|
||||
&mySysInfo, platformDevices[0]->capabilityTable};
|
||||
HardwareInfo myHwInfo = *platformDevices[0];
|
||||
GT_SYSTEM_INFO &mySysInfo = myHwInfo.pSysInfo;
|
||||
|
||||
mySysInfo.EUCount = 32;
|
||||
mySysInfo.SubSliceCount = 2;
|
||||
@@ -821,7 +815,7 @@ TEST(Device_GetCaps, givenSystemWithNoDriverInfoWhenGettingNameAndVersionThenRet
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
|
||||
std::string tempName = "Intel(R) ";
|
||||
tempName += familyName[platformDevices[0]->pPlatform->eRenderCoreFamily];
|
||||
tempName += familyName[platformDevices[0]->pPlatform.eRenderCoreFamily];
|
||||
tempName += " HD Graphics NEO";
|
||||
|
||||
#define QTR(a) #a
|
||||
@@ -839,29 +833,28 @@ TEST(Device_GetCaps, GivenFlagEnabled64kbPagesWhenSetThenReturnCorrectValue) {
|
||||
DebugManagerStateRestore dbgRestore;
|
||||
VariableBackup<bool> OsEnabled64kbPagesBackup(&OSInterface::osEnabled64kbPages);
|
||||
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
ExecutionEnvironment executionEnvironment;
|
||||
executionEnvironment.setHwInfo(&hwInfo);
|
||||
auto &capabilityTable = executionEnvironment.getMutableHardwareInfo()->capabilityTable;
|
||||
std::unique_ptr<MemoryManager> memoryManager;
|
||||
|
||||
DebugManager.flags.Enable64kbpages.set(-1);
|
||||
|
||||
hwInfo.capabilityTable.ftr64KBpages = false;
|
||||
capabilityTable.ftr64KBpages = false;
|
||||
OSInterface::osEnabled64kbPages = false;
|
||||
memoryManager.reset(new OsAgnosticMemoryManager(executionEnvironment));
|
||||
EXPECT_FALSE(memoryManager->peek64kbPagesEnabled());
|
||||
|
||||
hwInfo.capabilityTable.ftr64KBpages = false;
|
||||
capabilityTable.ftr64KBpages = false;
|
||||
OSInterface::osEnabled64kbPages = true;
|
||||
memoryManager.reset(new OsAgnosticMemoryManager(executionEnvironment));
|
||||
EXPECT_FALSE(memoryManager->peek64kbPagesEnabled());
|
||||
|
||||
hwInfo.capabilityTable.ftr64KBpages = true;
|
||||
capabilityTable.ftr64KBpages = true;
|
||||
OSInterface::osEnabled64kbPages = false;
|
||||
memoryManager.reset(new OsAgnosticMemoryManager(executionEnvironment));
|
||||
EXPECT_FALSE(memoryManager->peek64kbPagesEnabled());
|
||||
|
||||
hwInfo.capabilityTable.ftr64KBpages = true;
|
||||
capabilityTable.ftr64KBpages = true;
|
||||
OSInterface::osEnabled64kbPages = true;
|
||||
memoryManager.reset(new OsAgnosticMemoryManager(executionEnvironment));
|
||||
EXPECT_TRUE(memoryManager->peek64kbPagesEnabled());
|
||||
@@ -887,9 +880,9 @@ typedef HwHelperTest DeviceCapsWithModifiedHwInfoTest;
|
||||
|
||||
TEST_F(DeviceCapsWithModifiedHwInfoTest, givenPlatformWithSourceLevelDebuggerNotSupportedWhenDeviceIsCreatedThenSourceLevelDebuggerActiveIsSetToFalse) {
|
||||
|
||||
hwInfoHelper.hwInfo.capabilityTable.sourceLevelDebuggerSupported = false;
|
||||
hwInfoHelper.capabilityTable.sourceLevelDebuggerSupported = false;
|
||||
|
||||
std::unique_ptr<MockDevice> device(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfoHelper.hwInfo));
|
||||
std::unique_ptr<MockDevice> device(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfoHelper));
|
||||
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
EXPECT_EQ(nullptr, device->getSourceLevelDebugger());
|
||||
|
||||
@@ -32,7 +32,7 @@ TEST_F(DeviceTest, Create) {
|
||||
|
||||
TEST_F(DeviceTest, givenDeviceWhenGetProductAbbrevThenReturnsHardwarePrefix) {
|
||||
const auto productAbbrev = pDevice->getProductAbbrev();
|
||||
const auto hwPrefix = hardwarePrefix[pDevice->getHardwareInfo().pPlatform->eProductFamily];
|
||||
const auto hwPrefix = hardwarePrefix[pDevice->getHardwareInfo().pPlatform.eProductFamily];
|
||||
EXPECT_EQ(hwPrefix, productAbbrev);
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ TEST_F(DeviceTest, givenDeviceWhenEngineIsCreatedThenSetInitialValueForTag) {
|
||||
}
|
||||
|
||||
TEST_F(DeviceTest, givenDeviceWhenAskedForSpecificEngineThenRetrunIt) {
|
||||
auto &engines = HwHelper::get(platformDevices[0]->pPlatform->eRenderCoreFamily).getGpgpuEngineInstances();
|
||||
auto &engines = HwHelper::get(platformDevices[0]->pPlatform.eRenderCoreFamily).getGpgpuEngineInstances();
|
||||
for (uint32_t i = 0; i < engines.size(); i++) {
|
||||
bool lowPriority = (HwHelper::lowPriorityGpgpuEngineIndex == i);
|
||||
auto &deviceEngine = pDevice->getEngine(engines[i], lowPriority);
|
||||
@@ -70,7 +70,7 @@ TEST_F(DeviceTest, givenDeviceWhenAskedForSpecificEngineThenRetrunIt) {
|
||||
TEST_F(DeviceTest, givenDebugVariableToAlwaysChooseEngineZeroWhenNotExistingEngineSelectedThenIndexZeroEngineIsReturned) {
|
||||
DebugManagerStateRestore restore;
|
||||
DebugManager.flags.OverrideInvalidEngineWithDefault.set(true);
|
||||
auto &engines = HwHelper::get(platformDevices[0]->pPlatform->eRenderCoreFamily).getGpgpuEngineInstances();
|
||||
auto &engines = HwHelper::get(platformDevices[0]->pPlatform.eRenderCoreFamily).getGpgpuEngineInstances();
|
||||
auto &deviceEngine = pDevice->getEngine(engines[0], false);
|
||||
auto ¬ExistingEngine = pDevice->getEngine(aub_stream::ENGINE_VCS, false);
|
||||
EXPECT_EQ(¬ExistingEngine, &deviceEngine);
|
||||
@@ -172,16 +172,16 @@ TEST(DeviceCreation, givenDefaultHwCsrInDebugVarsWhenDeviceIsCreatedThenIsSimula
|
||||
TEST(DeviceCreation, givenDeviceWhenItIsCreatedThenOsContextIsRegistredInMemoryManager) {
|
||||
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<Device>(nullptr));
|
||||
auto memoryManager = device->getMemoryManager();
|
||||
EXPECT_EQ(HwHelper::get(platformDevices[0]->pPlatform->eRenderCoreFamily).getGpgpuEngineInstances().size(), memoryManager->getRegisteredEnginesCount());
|
||||
EXPECT_EQ(HwHelper::get(platformDevices[0]->pPlatform.eRenderCoreFamily).getGpgpuEngineInstances().size(), memoryManager->getRegisteredEnginesCount());
|
||||
}
|
||||
|
||||
TEST(DeviceCreation, givenMultiDeviceWhenTheyAreCreatedThenEachOsContextHasUniqueId) {
|
||||
ExecutionEnvironment *executionEnvironment = platformImpl->peekExecutionEnvironment();
|
||||
const size_t numDevices = 2;
|
||||
const auto &numGpgpuEngines = static_cast<uint32_t>(HwHelper::get(platformDevices[0]->pPlatform->eRenderCoreFamily).getGpgpuEngineInstances().size());
|
||||
const auto &numGpgpuEngines = static_cast<uint32_t>(HwHelper::get(platformDevices[0]->pPlatform.eRenderCoreFamily).getGpgpuEngineInstances().size());
|
||||
|
||||
auto device1 = std::unique_ptr<MockDevice>(Device::create<MockDevice>(nullptr, executionEnvironment, 0u));
|
||||
auto device2 = std::unique_ptr<MockDevice>(Device::create<MockDevice>(nullptr, executionEnvironment, 1u));
|
||||
auto device1 = std::unique_ptr<MockDevice>(Device::create<MockDevice>(executionEnvironment, 0u));
|
||||
auto device2 = std::unique_ptr<MockDevice>(Device::create<MockDevice>(executionEnvironment, 1u));
|
||||
|
||||
auto ®isteredEngines = executionEnvironment->memoryManager->getRegisteredEngines();
|
||||
EXPECT_EQ(numGpgpuEngines * numDevices, registeredEngines.size());
|
||||
@@ -202,8 +202,8 @@ TEST(DeviceCreation, givenMultiDeviceWhenTheyAreCreatedThenEachOsContextHasUniqu
|
||||
|
||||
TEST(DeviceCreation, givenMultiDeviceWhenTheyAreCreatedThenEachDeviceHasSeperateDeviceIndex) {
|
||||
ExecutionEnvironment *executionEnvironment = platformImpl->peekExecutionEnvironment();
|
||||
auto device = std::unique_ptr<Device>(Device::create<MockDevice>(nullptr, executionEnvironment, 0u));
|
||||
auto device2 = std::unique_ptr<Device>(Device::create<MockDevice>(nullptr, executionEnvironment, 1u));
|
||||
auto device = std::unique_ptr<Device>(Device::create<MockDevice>(executionEnvironment, 0u));
|
||||
auto device2 = std::unique_ptr<Device>(Device::create<MockDevice>(executionEnvironment, 1u));
|
||||
|
||||
EXPECT_EQ(0u, device->getDeviceIndex());
|
||||
EXPECT_EQ(1u, device2->getDeviceIndex());
|
||||
@@ -212,9 +212,9 @@ TEST(DeviceCreation, givenMultiDeviceWhenTheyAreCreatedThenEachDeviceHasSeperate
|
||||
TEST(DeviceCreation, givenMultiDeviceWhenTheyAreCreatedThenEachDeviceHasSeperateCommandStreamReceiver) {
|
||||
ExecutionEnvironment *executionEnvironment = platformImpl->peekExecutionEnvironment();
|
||||
const size_t numDevices = 2;
|
||||
const auto &numGpgpuEngines = HwHelper::get(platformDevices[0]->pPlatform->eRenderCoreFamily).getGpgpuEngineInstances().size();
|
||||
auto device1 = std::unique_ptr<MockDevice>(Device::create<MockDevice>(nullptr, executionEnvironment, 0u));
|
||||
auto device2 = std::unique_ptr<MockDevice>(Device::create<MockDevice>(nullptr, executionEnvironment, 1u));
|
||||
const auto &numGpgpuEngines = HwHelper::get(platformDevices[0]->pPlatform.eRenderCoreFamily).getGpgpuEngineInstances().size();
|
||||
auto device1 = std::unique_ptr<MockDevice>(Device::create<MockDevice>(executionEnvironment, 0u));
|
||||
auto device2 = std::unique_ptr<MockDevice>(Device::create<MockDevice>(executionEnvironment, 1u));
|
||||
|
||||
EXPECT_EQ(numDevices, executionEnvironment->commandStreamReceivers.size());
|
||||
EXPECT_EQ(numGpgpuEngines, executionEnvironment->commandStreamReceivers[0].size());
|
||||
@@ -230,7 +230,7 @@ TEST(DeviceCreation, givenMultiDeviceWhenTheyAreCreatedThenEachDeviceHasSeperate
|
||||
|
||||
TEST(DeviceCreation, givenDeviceWhenAskingForDefaultEngineThenReturnValidValue) {
|
||||
ExecutionEnvironment *executionEnvironment = platformImpl->peekExecutionEnvironment();
|
||||
auto device = std::unique_ptr<MockDevice>(Device::create<MockDevice>(platformDevices[0], executionEnvironment, 0));
|
||||
auto device = std::unique_ptr<MockDevice>(Device::create<MockDevice>(executionEnvironment, 0));
|
||||
auto osContext = device->getDefaultEngine().osContext;
|
||||
|
||||
EXPECT_EQ(platformDevices[0]->capabilityTable.defaultEngineType, osContext->getEngineType());
|
||||
@@ -238,13 +238,10 @@ TEST(DeviceCreation, givenDeviceWhenAskingForDefaultEngineThenReturnValidValue)
|
||||
}
|
||||
|
||||
TEST(DeviceCreation, givenFtrSimulationModeFlagTrueWhenNoOtherSimulationFlagsArePresentThenIsSimulationReturnsTrue) {
|
||||
FeatureTable skuTable = *platformDevices[0]->pSkuTable;
|
||||
skuTable.ftrSimulationMode = true;
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
hwInfo.pSkuTable.ftrSimulationMode = true;
|
||||
|
||||
HardwareInfo hwInfo = {platformDevices[0]->pPlatform, &skuTable, platformDevices[0]->pWaTable,
|
||||
platformDevices[0]->pSysInfo, platformDevices[0]->capabilityTable};
|
||||
|
||||
bool simulationFromDeviceId = hwInfo.capabilityTable.isSimulation(hwInfo.pPlatform->usDeviceID);
|
||||
bool simulationFromDeviceId = hwInfo.capabilityTable.isSimulation(hwInfo.pPlatform.usDeviceID);
|
||||
EXPECT_FALSE(simulationFromDeviceId);
|
||||
|
||||
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<Device>(&hwInfo));
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user