Improve queries with number of SubDevices
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
parent
69ae9dc9c2
commit
0345d9f707
|
@ -176,7 +176,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithParams(z
|
|||
auto surfaceState = GfxFamily::cmdInitRenderSurfaceState;
|
||||
NEO::EncodeSurfaceState<GfxFamily>::encodeBuffer(&surfaceState, debugSurface->getGpuAddress(),
|
||||
debugSurface->getUnderlyingBufferSize(), mocs,
|
||||
false, false, false, neoDevice->getNumAvailableDevices(),
|
||||
false, false, false, neoDevice->getNumGenericSubDevices(),
|
||||
debugSurface, neoDevice->getGmmHelper(), kernelImp->getKernelDescriptor().kernelAttributes.flags.useGlobalAtomics, 1u);
|
||||
*reinterpret_cast<typename GfxFamily::RENDER_SURFACE_STATE *>(surfaceStateSpace) = surfaceState;
|
||||
}
|
||||
|
|
|
@ -26,34 +26,34 @@ template <GFXCORE_FAMILY gfxCoreFamily>
|
|||
ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::executeCommandListImmediateWithFlushTask(bool performMigration) {
|
||||
|
||||
NEO::DispatchFlags dispatchFlags(
|
||||
{}, //csrDependencies
|
||||
nullptr, //barrierTimestampPacketNodes
|
||||
{}, //pipelineSelectArgs
|
||||
nullptr, //flushStampReference
|
||||
NEO::QueueThrottle::MEDIUM, //throttle
|
||||
this->getCommandListPreemptionMode(), //preemptionMode
|
||||
this->commandContainer.lastSentNumGrfRequired, //numGrfRequired
|
||||
NEO::L3CachingSettings::l3CacheOn, //l3CacheSettings
|
||||
this->getThreadArbitrationPolicy(), //threadArbitrationPolicy
|
||||
NEO::AdditionalKernelExecInfo::NotApplicable, //additionalKernelExecInfo
|
||||
NEO::KernelExecutionType::NotApplicable, //kernelExecutionType
|
||||
NEO::MemoryCompressionState::NotApplicable, //memoryCompressionState
|
||||
NEO::QueueSliceCount::defaultSliceCount, //sliceCount
|
||||
this->isSyncModeQueue, //blocking
|
||||
this->isSyncModeQueue, //dcFlush
|
||||
this->getCommandListSLMEnable(), //useSLM
|
||||
this->isSyncModeQueue, //guardCommandBufferWithPipeControl
|
||||
false, //GSBA32BitRequired
|
||||
false, //requiresCoherency
|
||||
false, //lowPriority
|
||||
true, //implicitFlush
|
||||
this->csr->isNTo1SubmissionModelEnabled(), //outOfOrderExecutionAllowed
|
||||
false, //epilogueRequired
|
||||
false, //usePerDssBackedBuffer
|
||||
false, //useSingleSubdevice
|
||||
false, //useGlobalAtomics
|
||||
this->device->getNEODevice()->getNumAvailableDevices() > 1, //areMultipleSubDevicesInContext
|
||||
false //memoryMigrationRequired
|
||||
{}, //csrDependencies
|
||||
nullptr, //barrierTimestampPacketNodes
|
||||
{}, //pipelineSelectArgs
|
||||
nullptr, //flushStampReference
|
||||
NEO::QueueThrottle::MEDIUM, //throttle
|
||||
this->getCommandListPreemptionMode(), //preemptionMode
|
||||
this->commandContainer.lastSentNumGrfRequired, //numGrfRequired
|
||||
NEO::L3CachingSettings::l3CacheOn, //l3CacheSettings
|
||||
this->getThreadArbitrationPolicy(), //threadArbitrationPolicy
|
||||
NEO::AdditionalKernelExecInfo::NotApplicable, //additionalKernelExecInfo
|
||||
NEO::KernelExecutionType::NotApplicable, //kernelExecutionType
|
||||
NEO::MemoryCompressionState::NotApplicable, //memoryCompressionState
|
||||
NEO::QueueSliceCount::defaultSliceCount, //sliceCount
|
||||
this->isSyncModeQueue, //blocking
|
||||
this->isSyncModeQueue, //dcFlush
|
||||
this->getCommandListSLMEnable(), //useSLM
|
||||
this->isSyncModeQueue, //guardCommandBufferWithPipeControl
|
||||
false, //GSBA32BitRequired
|
||||
false, //requiresCoherency
|
||||
false, //lowPriority
|
||||
true, //implicitFlush
|
||||
this->csr->isNTo1SubmissionModelEnabled(), //outOfOrderExecutionAllowed
|
||||
false, //epilogueRequired
|
||||
false, //usePerDssBackedBuffer
|
||||
false, //useSingleSubdevice
|
||||
false, //useGlobalAtomics
|
||||
this->device->getNEODevice()->getNumGenericSubDevices() > 1, //areMultipleSubDevicesInContext
|
||||
false //memoryMigrationRequired
|
||||
);
|
||||
|
||||
this->commandContainer.removeDuplicatesFromResidencyContainer();
|
||||
|
|
|
@ -242,7 +242,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithParams(z
|
|||
auto surfaceState = GfxFamily::cmdInitRenderSurfaceState;
|
||||
NEO::EncodeSurfaceState<GfxFamily>::encodeBuffer(&surfaceState, debugSurface->getGpuAddress(),
|
||||
debugSurface->getUnderlyingBufferSize(), mocs,
|
||||
false, false, false, neoDevice->getNumAvailableDevices(),
|
||||
false, false, false, neoDevice->getNumGenericSubDevices(),
|
||||
debugSurface, neoDevice->getGmmHelper(),
|
||||
kernelDescriptor.kernelAttributes.flags.useGlobalAtomics, 1u);
|
||||
*reinterpret_cast<typename GfxFamily::RENDER_SURFACE_STATE *>(surfaceStateSpace) = surfaceState;
|
||||
|
|
|
@ -686,28 +686,23 @@ Device *Device::create(DriverHandle *driverHandle, NEO::Device *neoDevice, uint3
|
|||
device->setDebugSurface(debugSurface);
|
||||
}
|
||||
|
||||
if (device->neoDevice->getNumAvailableDevices() == 1) {
|
||||
device->numSubDevices = 0;
|
||||
} else {
|
||||
for (uint32_t i = 0; i < device->neoDevice->getNumAvailableDevices(); i++) {
|
||||
|
||||
if (!((1UL << i) & currentDeviceMask)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
ze_device_handle_t subDevice = Device::create(driverHandle,
|
||||
device->neoDevice->getSubDevice(i),
|
||||
0,
|
||||
true, returnValue);
|
||||
if (subDevice == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
static_cast<DeviceImp *>(subDevice)->isSubdevice = true;
|
||||
static_cast<DeviceImp *>(subDevice)->setDebugSurface(debugSurface);
|
||||
device->subDevices.push_back(static_cast<Device *>(subDevice));
|
||||
for (uint32_t i = 0; i < device->neoDevice->getNumSubDevices(); i++) {
|
||||
if (!((1UL << i) & currentDeviceMask)) {
|
||||
continue;
|
||||
}
|
||||
device->numSubDevices = static_cast<uint32_t>(device->subDevices.size());
|
||||
|
||||
ze_device_handle_t subDevice = Device::create(driverHandle,
|
||||
device->neoDevice->getSubDevice(i),
|
||||
0,
|
||||
true, returnValue);
|
||||
if (subDevice == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
static_cast<DeviceImp *>(subDevice)->isSubdevice = true;
|
||||
static_cast<DeviceImp *>(subDevice)->setDebugSurface(debugSurface);
|
||||
device->subDevices.push_back(static_cast<Device *>(subDevice));
|
||||
}
|
||||
device->numSubDevices = static_cast<uint32_t>(device->subDevices.size());
|
||||
|
||||
if (neoDevice->getCompilerInterface()) {
|
||||
auto &hwInfo = neoDevice->getHardwareInfo();
|
||||
|
|
|
@ -19,7 +19,7 @@ NEO::Device *DeviceImp::getActiveDevice() const {
|
|||
}
|
||||
|
||||
bool DeviceImp::isMultiDeviceCapable() const {
|
||||
return neoDevice->getNumAvailableDevices() > 1u;
|
||||
return neoDevice->getNumGenericSubDevices() > 1u;
|
||||
}
|
||||
|
||||
void DeviceImp::processAdditionalKernelProperties(NEO::HwHelper &hwHelper, ze_device_module_properties_t *pKernelProperties) {
|
||||
|
|
|
@ -69,7 +69,7 @@ struct KernelHw : public KernelImp {
|
|||
|
||||
NEO::Device *neoDevice = module->getDevice()->getNEODevice();
|
||||
NEO::EncodeSurfaceState<GfxFamily>::encodeBuffer(&surfaceState, bufferAddressForSsh, bufferSizeForSsh, mocs,
|
||||
false, false, false, neoDevice->getNumAvailableDevices(),
|
||||
false, false, false, neoDevice->getNumGenericSubDevices(),
|
||||
alloc, neoDevice->getGmmHelper(),
|
||||
kernelImmData->getDescriptor().kernelAttributes.flags.useGlobalAtomics, 1u);
|
||||
*reinterpret_cast<typename GfxFamily::RENDER_SURFACE_STATE *>(surfaceStateAddress) = surfaceState;
|
||||
|
|
|
@ -93,7 +93,7 @@ inline void patchWithImplicitSurface(ArrayRef<uint8_t> crossThreadData, ArrayRef
|
|||
void *addressToPatch = reinterpret_cast<void *>(allocation.getUnderlyingBuffer());
|
||||
size_t sizeToPatch = allocation.getUnderlyingBufferSize();
|
||||
NEO::Buffer::setSurfaceState(&device, surfaceState, false, false, sizeToPatch, addressToPatch, 0,
|
||||
&allocation, 0, 0, useGlobalAtomics, device.getNumAvailableDevices() > 1);
|
||||
&allocation, 0, 0, useGlobalAtomics, device.getNumGenericSubDevices() > 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -446,7 +446,7 @@ HWTEST2_F(CommandQueueProgramSBATest,
|
|||
using STATE_BASE_ADDRESS = typename FamilyType::STATE_BASE_ADDRESS;
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.UseBindlessMode.set(1);
|
||||
auto bindlessHeapsHelper = std::make_unique<MockBindlesHeapsHelper>(neoDevice->getMemoryManager(), neoDevice->getNumAvailableDevices() > 1, neoDevice->getRootDeviceIndex());
|
||||
auto bindlessHeapsHelper = std::make_unique<MockBindlesHeapsHelper>(neoDevice->getMemoryManager(), neoDevice->getNumGenericSubDevices() > 1, neoDevice->getRootDeviceIndex());
|
||||
MockBindlesHeapsHelper *bindlessHeapsHelperPtr = bindlessHeapsHelper.get();
|
||||
neoDevice->getExecutionEnvironment()->rootDeviceEnvironments[neoDevice->getRootDeviceIndex()]->bindlessHeapsHelper.reset(bindlessHeapsHelper.release());
|
||||
NEO::MockGraphicsAllocation baseAllocation;
|
||||
|
@ -485,7 +485,7 @@ HWTEST2_F(CommandQueueProgramSBATest,
|
|||
using STATE_BASE_ADDRESS = typename FamilyType::STATE_BASE_ADDRESS;
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.UseBindlessMode.set(0);
|
||||
auto bindlessHeapsHelper = std::make_unique<MockBindlesHeapsHelper>(neoDevice->getMemoryManager(), neoDevice->getNumAvailableDevices() > 1, neoDevice->getRootDeviceIndex());
|
||||
auto bindlessHeapsHelper = std::make_unique<MockBindlesHeapsHelper>(neoDevice->getMemoryManager(), neoDevice->getNumGenericSubDevices() > 1, neoDevice->getRootDeviceIndex());
|
||||
MockBindlesHeapsHelper *bindlessHeapsHelperPtr = bindlessHeapsHelper.get();
|
||||
neoDevice->getExecutionEnvironment()->rootDeviceEnvironments[neoDevice->getRootDeviceIndex()]->bindlessHeapsHelper.reset(bindlessHeapsHelper.release());
|
||||
NEO::MockGraphicsAllocation baseAllocation;
|
||||
|
@ -1010,7 +1010,7 @@ HWTEST2_F(CommandQueueDestroy, givenCommandQueueAndCommandListWithSshAndScratchW
|
|||
HWTEST2_F(CommandQueueDestroy, givenCommandQueueAndCommandListWithWhenBindlessEnabledThenHeapContainerIsEmpty, CommandQueueExecuteTestSupport) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.UseBindlessMode.set(1);
|
||||
auto bindlessHeapsHelper = std::make_unique<MockBindlesHeapsHelper>(neoDevice->getMemoryManager(), neoDevice->getNumAvailableDevices() > 1, neoDevice->getRootDeviceIndex());
|
||||
auto bindlessHeapsHelper = std::make_unique<MockBindlesHeapsHelper>(neoDevice->getMemoryManager(), neoDevice->getNumGenericSubDevices() > 1, neoDevice->getRootDeviceIndex());
|
||||
neoDevice->getExecutionEnvironment()->rootDeviceEnvironments[neoDevice->getRootDeviceIndex()]->bindlessHeapsHelper.reset(bindlessHeapsHelper.release());
|
||||
ze_command_queue_desc_t desc = {};
|
||||
NEO::CommandStreamReceiver *csr;
|
||||
|
|
|
@ -1401,7 +1401,9 @@ TEST_F(KernelImpPatchBindlessTest, GivenKernelImpWhenPatchBindlessOffsetCalledTh
|
|||
WhiteBox<::L0::DeviceImp> mockDevice;
|
||||
mockDevice.neoDevice = neoDevice;
|
||||
neoDevice->incRefInternal();
|
||||
neoDevice->getExecutionEnvironment()->rootDeviceEnvironments[neoDevice->getRootDeviceIndex()]->createBindlessHeapsHelper(neoDevice->getMemoryManager(), neoDevice->getNumAvailableDevices() > 1, neoDevice->getRootDeviceIndex());
|
||||
neoDevice->getExecutionEnvironment()->rootDeviceEnvironments[neoDevice->getRootDeviceIndex()]->createBindlessHeapsHelper(neoDevice->getMemoryManager(),
|
||||
neoDevice->getNumGenericSubDevices() > 1,
|
||||
neoDevice->getRootDeviceIndex());
|
||||
Mock<Module> mockModule(&mockDevice, nullptr);
|
||||
kernel.module = &mockModule;
|
||||
NEO::MockGraphicsAllocation alloc;
|
||||
|
@ -1432,7 +1434,9 @@ HWTEST2_F(KernelImpPatchBindlessTest, GivenKernelImpWhenSetSurfaceStateBindlessT
|
|||
arg.bindless = 0x40;
|
||||
arg.bindful = undefined<SurfaceStateHeapOffset>;
|
||||
|
||||
neoDevice->getExecutionEnvironment()->rootDeviceEnvironments[neoDevice->getRootDeviceIndex()]->createBindlessHeapsHelper(neoDevice->getMemoryManager(), neoDevice->getNumAvailableDevices() > 1, neoDevice->getRootDeviceIndex());
|
||||
neoDevice->getExecutionEnvironment()->rootDeviceEnvironments[neoDevice->getRootDeviceIndex()]->createBindlessHeapsHelper(neoDevice->getMemoryManager(),
|
||||
neoDevice->getNumGenericSubDevices() > 1,
|
||||
neoDevice->getRootDeviceIndex());
|
||||
|
||||
auto &hwHelper = NEO::HwHelper::get(device->getHwInfo().platform.eRenderCoreFamily);
|
||||
size_t size = hwHelper.getRenderSurfaceStateSize();
|
||||
|
@ -1464,7 +1468,9 @@ HWTEST2_F(KernelImpPatchBindlessTest, GivenKernelImpWhenSetSurfaceStateBindfulTh
|
|||
arg.bindless = undefined<CrossThreadDataOffset>;
|
||||
arg.bindful = 0x40;
|
||||
|
||||
neoDevice->getExecutionEnvironment()->rootDeviceEnvironments[neoDevice->getRootDeviceIndex()]->createBindlessHeapsHelper(neoDevice->getMemoryManager(), neoDevice->getNumAvailableDevices() > 1, neoDevice->getRootDeviceIndex());
|
||||
neoDevice->getExecutionEnvironment()->rootDeviceEnvironments[neoDevice->getRootDeviceIndex()]->createBindlessHeapsHelper(neoDevice->getMemoryManager(),
|
||||
neoDevice->getNumGenericSubDevices() > 1,
|
||||
neoDevice->getRootDeviceIndex());
|
||||
|
||||
auto &hwHelper = NEO::HwHelper::get(device->getHwInfo().platform.eRenderCoreFamily);
|
||||
size_t size = hwHelper.getRenderSurfaceStateSize();
|
||||
|
@ -1737,7 +1743,9 @@ struct MyMockImage : public WhiteBox<::L0::ImageCoreFamily<gfxCoreFamily>> {
|
|||
HWTEST2_F(SetKernelArg, givenImageAndBindlessKernelWhenSetArgImageThenCopySurfaceStateToSSHCalledWithCorrectArgs, ImageSupport) {
|
||||
createKernel();
|
||||
|
||||
neoDevice->getExecutionEnvironment()->rootDeviceEnvironments[neoDevice->getRootDeviceIndex()]->createBindlessHeapsHelper(neoDevice->getMemoryManager(), neoDevice->getNumAvailableDevices() > 1, neoDevice->getRootDeviceIndex());
|
||||
neoDevice->getExecutionEnvironment()->rootDeviceEnvironments[neoDevice->getRootDeviceIndex()]->createBindlessHeapsHelper(neoDevice->getMemoryManager(),
|
||||
neoDevice->getNumGenericSubDevices() > 1,
|
||||
neoDevice->getRootDeviceIndex());
|
||||
auto &imageArg = const_cast<NEO::ArgDescImage &>(kernel->kernelImmData->getDescriptor().payloadMappings.explicitArgs[3].template as<NEO::ArgDescImage>());
|
||||
auto &addressingMode = kernel->kernelImmData->getDescriptor().kernelAttributes.imageAddressingMode;
|
||||
const_cast<NEO::KernelDescriptor::AddressingMode &>(addressingMode) = NEO::KernelDescriptor::Bindless;
|
||||
|
|
|
@ -213,7 +213,7 @@ void MetricsLibrary::getSubDeviceClientOptions(
|
|||
subDeviceIndex.SubDeviceIndex.Index = 0;
|
||||
|
||||
subDeviceCount.Type = ClientOptionsType::SubDeviceCount;
|
||||
subDeviceCount.SubDeviceCount.Count = neoDevice.getNumAvailableDevices();
|
||||
subDeviceCount.SubDeviceCount.Count = neoDevice.getNumSubDevices();
|
||||
|
||||
} else {
|
||||
|
||||
|
@ -225,7 +225,7 @@ void MetricsLibrary::getSubDeviceClientOptions(
|
|||
subDeviceIndex.SubDeviceIndex.Index = static_cast<NEO::SubDevice *>(&neoDevice)->getSubDeviceIndex();
|
||||
|
||||
subDeviceCount.Type = ClientOptionsType::SubDeviceCount;
|
||||
subDeviceCount.SubDeviceCount.Count = neoDevice.getRootDevice()->getNumAvailableDevices();
|
||||
subDeviceCount.SubDeviceCount.Count = neoDevice.getRootDevice()->getNumSubDevices();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -899,7 +899,7 @@ TEST_F(MetricQueryPoolTest, givenRootDeviceWhenGetSubDeviceClientOptionsIsCalled
|
|||
EXPECT_EQ(subDeviceIndex.SubDeviceIndex.Index, 0u);
|
||||
|
||||
EXPECT_EQ(subDeviceCount.Type, MetricsLibraryApi::ClientOptionsType::SubDeviceCount);
|
||||
EXPECT_EQ(subDeviceCount.SubDeviceCount.Count, device->getNEODevice()->getNumAvailableDevices());
|
||||
EXPECT_EQ(subDeviceCount.SubDeviceCount.Count, device->getNEODevice()->getNumSubDevices());
|
||||
}
|
||||
|
||||
TEST_F(MetricQueryPoolTest, givenSubDeviceWhenGetSubDeviceClientOptionsIsCalledThenReturnSubDeviceProperties) {
|
||||
|
@ -914,7 +914,7 @@ TEST_F(MetricQueryPoolTest, givenSubDeviceWhenGetSubDeviceClientOptionsIsCalledT
|
|||
auto subDeviceCount = ClientOptionsData_1_0{};
|
||||
|
||||
// Sub devices
|
||||
for (uint32_t i = 0, count = rootDevice->getNumAvailableDevices(); i < count; ++i) {
|
||||
for (uint32_t i = 0, count = rootDevice->getNumSubDevices(); i < count; ++i) {
|
||||
|
||||
metricsLibrary.getSubDeviceClientOptions(*rootDevice->subdevices[i], subDevice, subDeviceIndex, subDeviceCount);
|
||||
|
||||
|
@ -925,7 +925,7 @@ TEST_F(MetricQueryPoolTest, givenSubDeviceWhenGetSubDeviceClientOptionsIsCalledT
|
|||
EXPECT_EQ(subDeviceIndex.SubDeviceIndex.Index, i);
|
||||
|
||||
EXPECT_EQ(subDeviceCount.Type, MetricsLibraryApi::ClientOptionsType::SubDeviceCount);
|
||||
EXPECT_EQ(subDeviceCount.SubDeviceCount.Count, rootDevice->getNumAvailableDevices());
|
||||
EXPECT_EQ(subDeviceCount.SubDeviceCount.Count, rootDevice->getNumSubDevices());
|
||||
}
|
||||
}
|
||||
} // namespace ult
|
||||
|
|
|
@ -289,7 +289,7 @@ cl_int CL_API_CALL clCreateSubDevices(cl_device_id inDevice,
|
|||
if (pInDevice == nullptr) {
|
||||
return CL_INVALID_DEVICE;
|
||||
}
|
||||
auto subDevicesCount = pInDevice->getNumAvailableDevices();
|
||||
auto subDevicesCount = pInDevice->getNumSubDevices();
|
||||
if (subDevicesCount <= 1) {
|
||||
return CL_DEVICE_PARTITION_FAILED;
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ ClDevice::ClDevice(Device &device, ClDevice &rootClDevice, Platform *platform) :
|
|||
compilerExtensions = convertEnabledExtensionsToCompilerInternalOptions(deviceInfo.deviceExtensions, emptyOpenClCFeatures);
|
||||
compilerExtensionsWithFeatures = convertEnabledExtensionsToCompilerInternalOptions(deviceInfo.deviceExtensions, deviceInfo.openclCFeatures);
|
||||
|
||||
auto numAvailableDevices = device.getNumAvailableDevices();
|
||||
auto numAvailableDevices = device.getNumSubDevices();
|
||||
if (numAvailableDevices > 1) {
|
||||
for (uint32_t i = 0; i < numAvailableDevices; i++) {
|
||||
auto &coreSubDevice = static_cast<SubDevice &>(*device.getSubDevice(i));
|
||||
|
@ -169,7 +169,8 @@ const HardwareCapabilities &ClDevice::getHardwareCapabilities() const { return d
|
|||
bool ClDevice::isFullRangeSvm() const { return device.isFullRangeSvm(); }
|
||||
bool ClDevice::areSharedSystemAllocationsAllowed() const { return device.areSharedSystemAllocationsAllowed(); }
|
||||
uint32_t ClDevice::getRootDeviceIndex() const { return device.getRootDeviceIndex(); }
|
||||
uint32_t ClDevice::getNumAvailableDevices() const { return device.getNumAvailableDevices(); }
|
||||
uint32_t ClDevice::getNumGenericSubDevices() const { return device.getNumGenericSubDevices(); }
|
||||
uint32_t ClDevice::getNumSubDevices() const { return static_cast<uint32_t>(subDevices.size()); }
|
||||
|
||||
ClDeviceVector::ClDeviceVector(const cl_device_id *devices,
|
||||
cl_uint numDevices) {
|
||||
|
|
|
@ -89,7 +89,8 @@ class ClDevice : public BaseObject<_cl_device_id> {
|
|||
bool isFullRangeSvm() const;
|
||||
bool areSharedSystemAllocationsAllowed() const;
|
||||
uint32_t getRootDeviceIndex() const;
|
||||
uint32_t getNumAvailableDevices() const;
|
||||
uint32_t getNumGenericSubDevices() const;
|
||||
uint32_t getNumSubDevices() const;
|
||||
|
||||
// API entry points
|
||||
cl_int getDeviceInfo(cl_device_info paramName,
|
||||
|
|
|
@ -197,7 +197,7 @@ void ClDevice::initializeCaps() {
|
|||
deviceExtensions += "cl_intel_media_block_io ";
|
||||
}
|
||||
|
||||
auto sharingAllowed = (getNumAvailableDevices() == 1u);
|
||||
auto sharingAllowed = (getNumGenericSubDevices() <= 1u);
|
||||
if (sharingAllowed) {
|
||||
deviceExtensions += sharingFactory.getExtensions(driverInfo.get());
|
||||
}
|
||||
|
@ -245,8 +245,8 @@ void ClDevice::initializeCaps() {
|
|||
deviceInfo.deviceAvailable = CL_TRUE;
|
||||
deviceInfo.compilerAvailable = CL_TRUE;
|
||||
deviceInfo.parentDevice = nullptr;
|
||||
deviceInfo.partitionMaxSubDevices = device.getNumAvailableDevices();
|
||||
if (deviceInfo.partitionMaxSubDevices > 1) {
|
||||
deviceInfo.partitionMaxSubDevices = device.getNumSubDevices();
|
||||
if (deviceInfo.partitionMaxSubDevices > 0) {
|
||||
deviceInfo.partitionProperties[0] = CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN;
|
||||
deviceInfo.partitionProperties[1] = 0;
|
||||
deviceInfo.partitionAffinityDomain = CL_DEVICE_AFFINITY_DOMAIN_NUMA | CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE;
|
||||
|
@ -308,7 +308,11 @@ void ClDevice::initializeCaps() {
|
|||
|
||||
deviceInfo.maxWorkItemDimensions = 3;
|
||||
|
||||
deviceInfo.maxComputUnits = systemInfo.EUCount * getNumAvailableDevices();
|
||||
deviceInfo.maxComputUnits = systemInfo.EUCount * std::max(getNumGenericSubDevices(), 1u);
|
||||
if (device.isEngineInstanced()) {
|
||||
deviceInfo.maxComputUnits /= systemInfo.CCSInfo.NumberOfCCSEnabled;
|
||||
}
|
||||
|
||||
deviceInfo.maxConstantArgs = 8;
|
||||
deviceInfo.maxSliceCount = systemInfo.SliceCount;
|
||||
|
||||
|
|
|
@ -256,7 +256,7 @@ cl_int ClDevice::getDeviceInfo(cl_device_info paramName,
|
|||
retSize = srcSize = sizeof(cl_uint);
|
||||
break;
|
||||
case CL_DEVICE_NUM_SLICES_INTEL:
|
||||
param.uint = static_cast<cl_uint>(getHardwareInfo().gtSystemInfo.SliceCount * ((subDevices.size() > 0) ? subDevices.size() : 1));
|
||||
param.uint = static_cast<cl_uint>(getHardwareInfo().gtSystemInfo.SliceCount * std::max(device.getNumGenericSubDevices(), 1u));
|
||||
src = ¶m.uint;
|
||||
retSize = srcSize = sizeof(cl_uint);
|
||||
break;
|
||||
|
|
|
@ -842,7 +842,7 @@ void CommandQueue::processProperties(const cl_queue_properties *properties) {
|
|||
|
||||
if (specificEngineSelected) {
|
||||
this->queueFamilySelected = true;
|
||||
if (getDevice().getNumAvailableDevices() == 1) {
|
||||
if (!getDevice().hasRootCsr()) {
|
||||
auto queueFamily = getDevice().getNonEmptyEngineGroup(selectedQueueFamilyIndex);
|
||||
const auto &engine = queueFamily->at(selectedQueueIndex);
|
||||
auto engineType = engine.getEngineType();
|
||||
|
|
|
@ -181,7 +181,7 @@ bool Context::createImpl(const cl_context_properties *properties,
|
|||
bool containsDeviceWithSubdevices = false;
|
||||
for (const auto &device : inputDevices) {
|
||||
rootDeviceIndices.insert(device->getRootDeviceIndex());
|
||||
containsDeviceWithSubdevices |= device->getNumAvailableDevices() > 1;
|
||||
containsDeviceWithSubdevices |= device->getNumGenericSubDevices() > 1;
|
||||
}
|
||||
|
||||
this->driverDiagnostics = driverDiagnostics.release();
|
||||
|
@ -472,6 +472,6 @@ Platform *Context::getPlatformFromProperties(const cl_context_properties *proper
|
|||
}
|
||||
|
||||
bool Context::isSingleDeviceContext() {
|
||||
return devices[0]->getNumAvailableDevices() == 1 && getNumDevices() == 1;
|
||||
return devices[0]->getNumGenericSubDevices() == 0 && getNumDevices() == 1;
|
||||
}
|
||||
} // namespace NEO
|
||||
|
|
|
@ -42,7 +42,7 @@ void BufferHw<GfxFamily>::setArgStateful(void *memory, bool forceNonAuxMode, boo
|
|||
EncodeSurfaceState<GfxFamily>::encodeBuffer(memory, getBufferAddress(rootDeviceIndex),
|
||||
getSurfaceSize(alignSizeForAuxTranslation, rootDeviceIndex),
|
||||
getMocsValue(disableL3, isReadOnly, rootDeviceIndex),
|
||||
true, forceNonAuxMode, isReadOnly, device.getNumAvailableDevices(),
|
||||
true, forceNonAuxMode, isReadOnly, device.getNumGenericSubDevices(),
|
||||
graphicsAllocation, device.getGmmHelper(), useGlobalAtomics, areMultipleSubDevicesInContext);
|
||||
appendSurfaceStateExt(memory);
|
||||
}
|
||||
|
|
|
@ -29,13 +29,13 @@ std::unique_ptr<PerformanceCounters> PerformanceCounters::create(Device *device)
|
|||
// Root device.
|
||||
counter->subDevice.Enabled = false;
|
||||
counter->subDeviceIndex.Index = 0;
|
||||
counter->subDeviceCount.Count = device->getNumAvailableDevices();
|
||||
counter->subDeviceCount.Count = device->getNumSubDevices();
|
||||
} else {
|
||||
|
||||
// Sub device.
|
||||
counter->subDevice.Enabled = true;
|
||||
counter->subDeviceIndex.Index = static_cast<NEO::SubDevice *>(device)->getSubDeviceIndex();
|
||||
counter->subDeviceCount.Count = device->getRootDevice()->getNumAvailableDevices();
|
||||
counter->subDeviceCount.Count = device->getRootDevice()->getNumSubDevices();
|
||||
}
|
||||
|
||||
// Adapter data.
|
||||
|
|
|
@ -53,8 +53,8 @@ Program::Program(Context *context, bool isBuiltIn, const ClDeviceVector &clDevic
|
|||
maxRootDeviceIndex = device->getRootDeviceIndex();
|
||||
}
|
||||
deviceBuildInfos[device] = {};
|
||||
if (device->getNumAvailableDevices() > 1) {
|
||||
for (auto i = 0u; i < device->getNumAvailableDevices(); i++) {
|
||||
if (device->getNumGenericSubDevices() > 1) {
|
||||
for (auto i = 0u; i < device->getNumGenericSubDevices(); i++) {
|
||||
auto subDevice = device->getNearestGenericSubDevice(i);
|
||||
if (isDeviceAssociated(*subDevice)) {
|
||||
deviceBuildInfos[device].associatedSubDevices.push_back(subDevice);
|
||||
|
|
|
@ -556,7 +556,7 @@ HWTEST_F(LowPriorityCommandQueueTest, GivenDeviceWithSubdevicesWhenCreatingLowPr
|
|||
DebugManager.flags.CreateMultipleSubDevices.set(2);
|
||||
MockContext context;
|
||||
cl_queue_properties properties[] = {CL_QUEUE_PRIORITY_KHR, CL_QUEUE_PRIORITY_LOW_KHR, 0};
|
||||
EXPECT_EQ(2u, context.getDevice(0)->getNumAvailableDevices());
|
||||
EXPECT_EQ(2u, context.getDevice(0)->getNumGenericSubDevices());
|
||||
auto cmdQ = clCreateCommandQueueWithProperties(&context, context.getDevice(0), properties, nullptr);
|
||||
|
||||
auto commandQueueObj = castToObject<CommandQueue>(cmdQ);
|
||||
|
|
|
@ -296,7 +296,7 @@ HWTEST_P(CommandQueueWithBlitOperationsTests, givenDeviceWithSubDevicesSupportin
|
|||
REQUIRE_BLITTER_OR_SKIP(&hwInfo);
|
||||
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
EXPECT_EQ(2u, device->getNumAvailableDevices());
|
||||
EXPECT_EQ(2u, device->getNumGenericSubDevices());
|
||||
std::unique_ptr<OsContext> bcsOsContext;
|
||||
|
||||
auto subDevice = device->getSubDevice(0);
|
||||
|
|
|
@ -193,7 +193,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, GetCommandQueueFamilyInfoTests, givenFamilyIdWhenGe
|
|||
auto context = clCreateContext(nullptr, 1, &deviceId, nullptr, nullptr, nullptr);
|
||||
auto ccsFamily = mockClDevice.getDevice().getIndexOfNonEmptyEngineGroup(EngineGroupType::Compute);
|
||||
cl_command_queue_properties properties[] = {CL_QUEUE_FAMILY_INTEL, ccsFamily, CL_QUEUE_INDEX_INTEL, 0, 0};
|
||||
EXPECT_EQ(1u, mockClDevice.getNumAvailableDevices());
|
||||
EXPECT_EQ(0u, mockClDevice.getNumGenericSubDevices());
|
||||
auto commandQueue = clCreateCommandQueueWithProperties(context, deviceId, properties, nullptr);
|
||||
auto neoQueue = castToObject<CommandQueue>(commandQueue);
|
||||
|
||||
|
@ -229,7 +229,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, GetCommandQueueFamilyInfoTests, givenFamilyIdWhenCr
|
|||
auto context = clCreateContext(nullptr, 1, &deviceId, nullptr, nullptr, nullptr);
|
||||
|
||||
cl_command_queue_properties properties[] = {CL_QUEUE_FAMILY_INTEL, static_cast<uint32_t>(EngineGroupType::Compute), CL_QUEUE_INDEX_INTEL, 0, 0};
|
||||
EXPECT_EQ(2u, rootDevice->getNumAvailableDevices());
|
||||
EXPECT_EQ(2u, rootDevice->getNumGenericSubDevices());
|
||||
cl_int retVal;
|
||||
auto commandQueue = clCreateCommandQueueWithProperties(context, rootDevice, properties, &retVal);
|
||||
|
||||
|
|
|
@ -325,8 +325,8 @@ TEST(DeviceCreation, givenDeviceWhenItIsCreatedThenOsContextIsRegistredInMemoryM
|
|||
auto memoryManager = device->getMemoryManager();
|
||||
auto &hwInfo = device->getHardwareInfo();
|
||||
auto numEnginesForDevice = HwHelper::get(hwInfo.platform.eRenderCoreFamily).getGpgpuEngineInstances(hwInfo).size();
|
||||
if (device->getNumAvailableDevices() > 1) {
|
||||
numEnginesForDevice *= device->getNumAvailableDevices();
|
||||
if (device->getNumGenericSubDevices() > 1) {
|
||||
numEnginesForDevice *= device->getNumGenericSubDevices();
|
||||
numEnginesForDevice += device->engines.size();
|
||||
}
|
||||
EXPECT_EQ(numEnginesForDevice, memoryManager->getRegisteredEnginesCount());
|
||||
|
|
|
@ -1080,7 +1080,7 @@ struct DeviceAttributeQueryTest : public ::testing::TestWithParam<uint32_t /*cl_
|
|||
case CL_DEVICE_NUM_SLICES_INTEL: {
|
||||
auto pNumSlices = reinterpret_cast<cl_uint *>(object.get());
|
||||
const auto >SysInfo = device.getHardwareInfo().gtSystemInfo;
|
||||
EXPECT_EQ(gtSysInfo.SliceCount * device.getNumAvailableDevices(), *pNumSlices);
|
||||
EXPECT_EQ(gtSysInfo.SliceCount * std::max(device.getNumGenericSubDevices(), 1u), *pNumSlices);
|
||||
EXPECT_EQ(sizeof(cl_uint), sizeReturned);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ TEST(SubDevicesTest, givenDefaultConfigWhenCreateRootDeviceThenItDoesntContainSu
|
|||
auto device = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
|
||||
|
||||
EXPECT_EQ(0u, device->getNumSubDevices());
|
||||
EXPECT_EQ(1u, device->getNumAvailableDevices());
|
||||
EXPECT_EQ(0u, device->getNumGenericSubDevices());
|
||||
}
|
||||
|
||||
TEST(SubDevicesTest, givenCreateMultipleSubDevicesFlagSetWhenCreateRootDeviceThenItsSubdevicesHaveProperRootIdSet) {
|
||||
|
@ -55,9 +55,9 @@ TEST(SubDevicesTest, givenCreateMultipleSubDevicesFlagSetWhenCreateRootDeviceThe
|
|||
|
||||
EXPECT_EQ(2u, device->getNumSubDevices());
|
||||
|
||||
EXPECT_EQ(2u, device->getNumAvailableDevices());
|
||||
EXPECT_EQ(1u, device->subdevices.at(0)->getNumAvailableDevices());
|
||||
EXPECT_EQ(1u, device->subdevices.at(1)->getNumAvailableDevices());
|
||||
EXPECT_EQ(2u, device->getNumGenericSubDevices());
|
||||
EXPECT_EQ(0u, device->subdevices.at(0)->getNumGenericSubDevices());
|
||||
EXPECT_EQ(0u, device->subdevices.at(1)->getNumGenericSubDevices());
|
||||
}
|
||||
|
||||
TEST(SubDevicesTest, givenDeviceWithSubDevicesWhenSubDeviceApiRefCountsAreChangedThenChangeIsPropagatedToRootDevice) {
|
||||
|
@ -204,7 +204,7 @@ TEST(SubDevicesTest, givenSubDeviceWhenOsContextIsCreatedThenItsBitfieldBasesOnS
|
|||
TEST(SubDevicesTest, givenDeviceWithoutSubDevicesWhenGettingDeviceByIdZeroThenGetThisDevice) {
|
||||
auto device = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
|
||||
|
||||
EXPECT_EQ(1u, device->getNumAvailableDevices());
|
||||
EXPECT_EQ(0u, device->getNumGenericSubDevices());
|
||||
EXPECT_ANY_THROW(device->getSubDevice(0u));
|
||||
}
|
||||
|
||||
|
@ -248,10 +248,10 @@ TEST(RootDevicesTest, givenRootDeviceWithSubdevicesWhenCreateEnginesThenDeviceCr
|
|||
|
||||
auto executionEnvironment = new MockExecutionEnvironment;
|
||||
MockDevice device(executionEnvironment, 0);
|
||||
device.createSubDevices();
|
||||
EXPECT_EQ(2u, device.getNumAvailableDevices());
|
||||
EXPECT_EQ(0u, device.engines.size());
|
||||
device.createSubDevices();
|
||||
device.createEngines();
|
||||
EXPECT_EQ(2u, device.getNumGenericSubDevices());
|
||||
EXPECT_EQ(1u, device.engines.size());
|
||||
}
|
||||
|
||||
|
@ -328,7 +328,8 @@ struct EngineInstancedDeviceTests : public ::testing::Test {
|
|||
bool isEngineInstanced(MockSubDevice *subDevice, aub_stream::EngineType engineType, uint32_t subDeviceIndex, DeviceBitfield deviceBitfield) {
|
||||
bool isEngineInstanced = !subDevice->engines[0].osContext->isRootDevice();
|
||||
isEngineInstanced &= subDevice->engineInstanced;
|
||||
isEngineInstanced &= (subDevice->getNumAvailableDevices() == 1);
|
||||
isEngineInstanced &= (subDevice->getNumGenericSubDevices() == 0);
|
||||
isEngineInstanced &= (subDevice->getNumSubDevices() == 0);
|
||||
isEngineInstanced &= (engineType == subDevice->engineInstancedType);
|
||||
isEngineInstanced &= (subDeviceIndex == subDevice->getSubDeviceIndex());
|
||||
isEngineInstanced &= (deviceBitfield == subDevice->getDeviceBitfield());
|
||||
|
@ -400,7 +401,8 @@ TEST_F(EngineInstancedDeviceTests, givenDebugFlagSetAndMoreThanOneCcsWhenCreatin
|
|||
auto &hwInfo = rootDevice->getHardwareInfo();
|
||||
|
||||
EXPECT_EQ(ccsCount, hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled);
|
||||
EXPECT_EQ(ccsCount, rootDevice->getNumAvailableDevices());
|
||||
EXPECT_EQ(ccsCount, rootDevice->getNumSubDevices());
|
||||
EXPECT_EQ(0u, rootDevice->getNumGenericSubDevices());
|
||||
|
||||
EXPECT_FALSE(hasRootCsrOnly(rootDevice));
|
||||
EXPECT_TRUE(hasAllEngines(rootDevice));
|
||||
|
@ -424,7 +426,8 @@ TEST_F(EngineInstancedDeviceTests, givenDebugFlagSetAndZeroCcsesWhenCreatingRoot
|
|||
EXPECT_FALSE(hasRootCsrOnly(rootDevice));
|
||||
EXPECT_TRUE(hasAllEngines(rootDevice));
|
||||
|
||||
EXPECT_EQ(1u, rootDevice->getNumAvailableDevices());
|
||||
EXPECT_EQ(0u, rootDevice->getNumGenericSubDevices());
|
||||
EXPECT_EQ(0u, rootDevice->getNumSubDevices());
|
||||
EXPECT_FALSE(rootDevice->getNearestGenericSubDevice(0)->isSubDevice());
|
||||
}
|
||||
|
||||
|
@ -439,7 +442,8 @@ TEST_F(EngineInstancedDeviceTests, givenDebugFlagSetAndSingleCcsWhenCreatingRoot
|
|||
EXPECT_FALSE(hasRootCsrOnly(rootDevice));
|
||||
EXPECT_TRUE(hasAllEngines(rootDevice));
|
||||
|
||||
EXPECT_EQ(1u, rootDevice->getNumAvailableDevices());
|
||||
EXPECT_EQ(0u, rootDevice->getNumGenericSubDevices());
|
||||
EXPECT_EQ(0u, rootDevice->getNumSubDevices());
|
||||
EXPECT_FALSE(rootDevice->getNearestGenericSubDevice(0)->isSubDevice());
|
||||
}
|
||||
|
||||
|
@ -457,7 +461,8 @@ TEST_F(EngineInstancedDeviceTests, givenDebugFlagSetWhenCreatingRootDeviceWithGe
|
|||
|
||||
EXPECT_FALSE(subDevice->engines[0].osContext->isRootDevice());
|
||||
EXPECT_FALSE(subDevice->engineInstanced);
|
||||
EXPECT_EQ(1u, subDevice->getNumAvailableDevices());
|
||||
EXPECT_EQ(0u, subDevice->getNumGenericSubDevices());
|
||||
EXPECT_EQ(0u, subDevice->getNumSubDevices());
|
||||
EXPECT_EQ(aub_stream::EngineType::NUM_ENGINES, subDevice->engineInstancedType);
|
||||
|
||||
EXPECT_TRUE(hasAllEngines(subDevice));
|
||||
|
@ -480,7 +485,8 @@ TEST_F(EngineInstancedDeviceTests, givenDebugFlagSetWhenCreatingRootDeviceWithGe
|
|||
|
||||
EXPECT_FALSE(subDevice->engines[0].osContext->isRootDevice());
|
||||
EXPECT_FALSE(subDevice->engineInstanced);
|
||||
EXPECT_EQ(1u, subDevice->getNumAvailableDevices());
|
||||
EXPECT_EQ(0u, subDevice->getNumGenericSubDevices());
|
||||
EXPECT_EQ(0u, subDevice->getNumSubDevices());
|
||||
EXPECT_EQ(aub_stream::EngineType::NUM_ENGINES, subDevice->engineInstancedType);
|
||||
|
||||
EXPECT_TRUE(hasAllEngines(subDevice));
|
||||
|
@ -503,7 +509,8 @@ TEST_F(EngineInstancedDeviceTests, givenDebugFlagSetWhenCreatingRootDeviceWithGe
|
|||
|
||||
EXPECT_FALSE(subDevice->engines[0].osContext->isRootDevice());
|
||||
EXPECT_FALSE(subDevice->engineInstanced);
|
||||
EXPECT_EQ(ccsCount, subDevice->getNumAvailableDevices());
|
||||
EXPECT_EQ(0u, subDevice->getNumGenericSubDevices());
|
||||
EXPECT_EQ(ccsCount, subDevice->getNumSubDevices());
|
||||
EXPECT_EQ(aub_stream::EngineType::NUM_ENGINES, subDevice->engineInstancedType);
|
||||
|
||||
EXPECT_TRUE(hasAllEngines(subDevice));
|
||||
|
@ -639,7 +646,8 @@ TEST_F(EngineInstancedDeviceTests, givenAffinityMaskSetWhenCreatingDevicesThenFi
|
|||
|
||||
EXPECT_FALSE(subDevice->engines[0].osContext->isRootDevice());
|
||||
EXPECT_FALSE(subDevice->engineInstanced);
|
||||
EXPECT_EQ(engineInstancedPerGeneric[i], subDevice->getNumAvailableDevices());
|
||||
EXPECT_EQ(engineInstancedPerGeneric[i], subDevice->getNumSubDevices());
|
||||
EXPECT_EQ(0u, subDevice->getNumGenericSubDevices());
|
||||
EXPECT_EQ(aub_stream::EngineType::NUM_ENGINES, subDevice->engineInstancedType);
|
||||
|
||||
EXPECT_TRUE(hasAllEngines(subDevice));
|
||||
|
@ -687,7 +695,8 @@ TEST_F(EngineInstancedDeviceTests, givenAffinityMaskForSingle3rdLevelDeviceWhenC
|
|||
EXPECT_TRUE(isEngineInstanced(subDevice, engineType, i, deviceBitfield));
|
||||
EXPECT_TRUE(hasEngineInstancedEngines(subDevice, engineType));
|
||||
|
||||
EXPECT_EQ(1u, subDevice->getNumAvailableDevices());
|
||||
EXPECT_EQ(0u, subDevice->getNumGenericSubDevices());
|
||||
EXPECT_EQ(0u, subDevice->getNumSubDevices());
|
||||
|
||||
continue;
|
||||
}
|
||||
|
@ -697,7 +706,8 @@ TEST_F(EngineInstancedDeviceTests, givenAffinityMaskForSingle3rdLevelDeviceWhenC
|
|||
EXPECT_FALSE(subDevice->engineInstanced);
|
||||
EXPECT_EQ(aub_stream::EngineType::NUM_ENGINES, subDevice->engineInstancedType);
|
||||
|
||||
EXPECT_EQ(ccsCount, subDevice->getNumAvailableDevices());
|
||||
EXPECT_EQ(0u, subDevice->getNumGenericSubDevices());
|
||||
EXPECT_EQ(ccsCount, subDevice->getNumSubDevices());
|
||||
|
||||
for (uint32_t j = 0; j < ccsCount; j++) {
|
||||
auto engineType = static_cast<aub_stream::EngineType>(aub_stream::EngineType::ENGINE_CCS + j);
|
||||
|
@ -730,7 +740,8 @@ TEST_F(EngineInstancedDeviceTests, givenAffinityMaskForSingle3rdLevelDeviceOnlyW
|
|||
|
||||
EXPECT_FALSE(rootDevice->engines[0].osContext->isRootDevice());
|
||||
EXPECT_TRUE(rootDevice->engineInstanced);
|
||||
EXPECT_TRUE(rootDevice->getNumAvailableDevices() == 1);
|
||||
EXPECT_TRUE(rootDevice->getNumGenericSubDevices() == 0);
|
||||
EXPECT_TRUE(rootDevice->getNumSubDevices() == 0);
|
||||
EXPECT_TRUE(engineType == rootDevice->engineInstancedType);
|
||||
EXPECT_TRUE(deviceBitfield == rootDevice->getDeviceBitfield());
|
||||
EXPECT_EQ(1u, rootDevice->getDeviceBitfield().count());
|
||||
|
@ -758,7 +769,8 @@ TEST_F(EngineInstancedDeviceTests, givenAffinityMaskForSingle2rdLevelDeviceOnlyW
|
|||
|
||||
EXPECT_FALSE(rootDevice->engines[0].osContext->isRootDevice());
|
||||
EXPECT_TRUE(rootDevice->engineInstanced);
|
||||
EXPECT_TRUE(rootDevice->getNumAvailableDevices() == 1);
|
||||
EXPECT_TRUE(rootDevice->getNumGenericSubDevices() == 0);
|
||||
EXPECT_TRUE(rootDevice->getNumSubDevices() == 0);
|
||||
EXPECT_TRUE(engineType == rootDevice->engineInstancedType);
|
||||
EXPECT_TRUE(deviceBitfield == rootDevice->getDeviceBitfield());
|
||||
EXPECT_EQ(1u, rootDevice->getDeviceBitfield().count());
|
||||
|
@ -807,6 +819,6 @@ TEST(SubDevicesTest, givenCreateMultipleSubDevicesFlagSetWhenBindlessHeapHelperC
|
|||
VariableBackup<bool> mockDeviceFlagBackup(&MockDevice::createSingleDevice, false);
|
||||
auto device = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
|
||||
|
||||
device->getExecutionEnvironment()->rootDeviceEnvironments[device->getRootDeviceIndex()]->createBindlessHeapsHelper(device->getMemoryManager(), device->getNumAvailableDevices() > 1, device->getRootDeviceIndex());
|
||||
device->getExecutionEnvironment()->rootDeviceEnvironments[device->getRootDeviceIndex()]->createBindlessHeapsHelper(device->getMemoryManager(), device->getNumGenericSubDevices() > 1, device->getRootDeviceIndex());
|
||||
EXPECT_EQ(device->getBindlessHeapsHelper(), device->subdevices.at(0)->getBindlessHeapsHelper());
|
||||
}
|
||||
|
|
|
@ -63,11 +63,11 @@ TEST(ExecutionEnvironment, WhenCreatingDevicesThenThoseDevicesAddRefcountsToExec
|
|||
|
||||
auto expectedRefCounts = executionEnvironment->getRefInternalCount();
|
||||
auto devices = DeviceFactory::createDevices(*executionEnvironment);
|
||||
EXPECT_LT(0u, devices[0]->getNumAvailableDevices());
|
||||
if (devices[0]->getNumAvailableDevices() > 1) {
|
||||
EXPECT_LE(0u, devices[0]->getNumSubDevices());
|
||||
if (devices[0]->getNumSubDevices() > 1) {
|
||||
expectedRefCounts++;
|
||||
}
|
||||
expectedRefCounts += devices[0]->getNumAvailableDevices();
|
||||
expectedRefCounts += std::max(devices[0]->getNumSubDevices(), 1u);
|
||||
EXPECT_EQ(expectedRefCounts, executionEnvironment->getRefInternalCount());
|
||||
}
|
||||
|
||||
|
|
|
@ -575,7 +575,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, RenderSurfaceStateXeHPAndLaterTests, givenSpecificP
|
|||
|
||||
EncodeSurfaceState<FamilyType>::encodeBuffer(&rssCmd, allocation->getGpuAddress(), allocation->getUnderlyingBufferSize(),
|
||||
buffer->getMocsValue(false, false, pClDevice->getRootDeviceIndex()), false, false, false,
|
||||
pClDevice->getNumAvailableDevices(), allocation, pClDevice->getGmmHelper(), false, 1u);
|
||||
pClDevice->getNumGenericSubDevices(), allocation, pClDevice->getGmmHelper(), false, 1u);
|
||||
|
||||
EXPECT_EQ(FamilyType::RENDER_SURFACE_STATE::COHERENCY_TYPE_GPU_COHERENT, rssCmd.getCoherencyType());
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterBufferTests, givenContextTypeDefaultWhe
|
|||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.CreateMultipleSubDevices.set(1);
|
||||
initPlatform();
|
||||
EXPECT_EQ(1u, platform()->getClDevice(0)->getNumAvailableDevices());
|
||||
EXPECT_EQ(0u, platform()->getClDevice(0)->getNumGenericSubDevices());
|
||||
using RENDER_SURFACE_STATE = typename FamilyType::RENDER_SURFACE_STATE;
|
||||
MockContext context(platform()->getClDevice(0));
|
||||
context.contextType = ContextType::CONTEXT_TYPE_DEFAULT;
|
||||
|
@ -280,7 +280,12 @@ HWCMDTEST_P(IGFX_XE_HP_CORE, MultiGpuGlobalAtomicsBufferTest, givenSetArgStatefu
|
|||
DebugManager.flags.CreateMultipleSubDevices.set(numAvailableDevices);
|
||||
DebugManager.flags.EnableMultiGpuAtomicsOptimization.set(enableMultiGpuAtomicsOptimization);
|
||||
initPlatform();
|
||||
EXPECT_EQ(numAvailableDevices, platform()->getClDevice(0)->getNumAvailableDevices());
|
||||
|
||||
if (numAvailableDevices == 1) {
|
||||
EXPECT_EQ(0u, platform()->getClDevice(0)->getNumGenericSubDevices());
|
||||
} else {
|
||||
EXPECT_EQ(numAvailableDevices, platform()->getClDevice(0)->getNumGenericSubDevices());
|
||||
}
|
||||
using RENDER_SURFACE_STATE = typename FamilyType::RENDER_SURFACE_STATE;
|
||||
MockContext context(platform()->getClDevice(0));
|
||||
context.contextType = ContextType::CONTEXT_TYPE_DEFAULT;
|
||||
|
@ -322,7 +327,11 @@ HWCMDTEST_P(IGFX_XE_HP_CORE, MultiGpuGlobalAtomicsBufferTest, givenSetSurfaceSta
|
|||
DebugManager.flags.CreateMultipleSubDevices.set(numAvailableDevices);
|
||||
DebugManager.flags.EnableMultiGpuAtomicsOptimization.set(enableMultiGpuAtomicsOptimization);
|
||||
initPlatform();
|
||||
EXPECT_EQ(numAvailableDevices, platform()->getClDevice(0)->getNumAvailableDevices());
|
||||
if (numAvailableDevices == 1) {
|
||||
EXPECT_EQ(0u, platform()->getClDevice(0)->getNumGenericSubDevices());
|
||||
} else {
|
||||
EXPECT_EQ(numAvailableDevices, platform()->getClDevice(0)->getNumGenericSubDevices());
|
||||
}
|
||||
|
||||
auto size = MemoryConstants::pageSize;
|
||||
auto ptr = alignedMalloc(size, MemoryConstants::pageSize);
|
||||
|
|
|
@ -33,7 +33,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterImageTests, givenContextTypeDefaultWhen
|
|||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.CreateMultipleSubDevices.set(1);
|
||||
initPlatform();
|
||||
EXPECT_EQ(1u, platform()->getClDevice(0)->getNumAvailableDevices());
|
||||
EXPECT_EQ(0u, platform()->getClDevice(0)->getNumGenericSubDevices());
|
||||
using RENDER_SURFACE_STATE = typename FamilyType::RENDER_SURFACE_STATE;
|
||||
MockContext context(platform()->getClDevice(0));
|
||||
context.contextType = ContextType::CONTEXT_TYPE_DEFAULT;
|
||||
|
@ -269,7 +269,11 @@ HWCMDTEST_P(IGFX_XE_HP_CORE, MultiGpuGlobalAtomicsImageTest, givenAppendSurfaceS
|
|||
DebugManager.flags.EnableMultiGpuAtomicsOptimization.set(enableMultiGpuAtomicsOptimization);
|
||||
DebugManager.flags.CreateMultipleSubDevices.set(numAvailableDevices);
|
||||
initPlatform();
|
||||
EXPECT_EQ(numAvailableDevices, platform()->getClDevice(0)->getNumAvailableDevices());
|
||||
if (numAvailableDevices == 1) {
|
||||
EXPECT_EQ(0u, platform()->getClDevice(0)->getNumGenericSubDevices());
|
||||
} else {
|
||||
EXPECT_EQ(numAvailableDevices, platform()->getClDevice(0)->getNumGenericSubDevices());
|
||||
}
|
||||
using RENDER_SURFACE_STATE = typename FamilyType::RENDER_SURFACE_STATE;
|
||||
MockContext context(platform()->getClDevice(0));
|
||||
context.contextType = contextType;
|
||||
|
|
|
@ -107,10 +107,10 @@ TEST_F(DeviceFactoryTest, givenZeAffinityMaskSetWhenCreateDevicesThenProperNumbe
|
|||
auto devices = DeviceFactory::createDevices(*executionEnvironment);
|
||||
|
||||
EXPECT_EQ(devices.size(), 4u);
|
||||
EXPECT_EQ(devices[0]->getNumAvailableDevices(), 4u);
|
||||
EXPECT_EQ(devices[1]->getNumAvailableDevices(), 2u);
|
||||
EXPECT_EQ(devices[2]->getNumAvailableDevices(), 3u);
|
||||
EXPECT_EQ(devices[3]->getNumAvailableDevices(), 4u);
|
||||
EXPECT_EQ(devices[0]->getNumSubDevices(), 4u);
|
||||
EXPECT_EQ(devices[1]->getNumSubDevices(), 2u);
|
||||
EXPECT_EQ(devices[2]->getNumSubDevices(), 3u);
|
||||
EXPECT_EQ(devices[3]->getNumSubDevices(), 4u);
|
||||
}
|
||||
|
||||
TEST_F(DeviceFactoryTest, givenZeAffinityMaskSetToGreaterRootDeviceThanAvailableWhenCreateDevicesThenProperNumberOfDevicesIsReturned) {
|
||||
|
@ -124,8 +124,9 @@ TEST_F(DeviceFactoryTest, givenZeAffinityMaskSetToGreaterRootDeviceThanAvailable
|
|||
auto devices = DeviceFactory::createDevices(*executionEnvironment);
|
||||
|
||||
EXPECT_EQ(devices.size(), 2u);
|
||||
EXPECT_EQ(devices[0]->getNumAvailableDevices(), 4u);
|
||||
EXPECT_EQ(devices[1]->getNumAvailableDevices(), 1u);
|
||||
EXPECT_EQ(devices[0]->getNumSubDevices(), 4u);
|
||||
EXPECT_EQ(devices[1]->getNumGenericSubDevices(), 0u);
|
||||
EXPECT_EQ(devices[1]->getNumSubDevices(), 0u);
|
||||
}
|
||||
|
||||
TEST_F(DeviceFactoryTest, givenZeAffinityMaskSetToGreaterSubDeviceThanAvailableWhenCreateDevicesThenProperNumberOfDevicesIsReturned) {
|
||||
|
@ -139,7 +140,7 @@ TEST_F(DeviceFactoryTest, givenZeAffinityMaskSetToGreaterSubDeviceThanAvailableW
|
|||
auto devices = DeviceFactory::createDevices(*executionEnvironment);
|
||||
|
||||
EXPECT_EQ(devices.size(), 1u);
|
||||
EXPECT_EQ(devices[0]->getNumAvailableDevices(), 4u);
|
||||
EXPECT_EQ(devices[0]->getNumSubDevices(), 4u);
|
||||
}
|
||||
|
||||
TEST_F(DeviceFactoryTest, givenZeAffinityMaskSetToRootDevicesOnlyWhenCreateDevicesThenProperNumberOfDevicesIsReturned) {
|
||||
|
@ -153,8 +154,8 @@ TEST_F(DeviceFactoryTest, givenZeAffinityMaskSetToRootDevicesOnlyWhenCreateDevic
|
|||
auto devices = DeviceFactory::createDevices(*executionEnvironment);
|
||||
|
||||
EXPECT_EQ(devices.size(), 2u);
|
||||
EXPECT_EQ(devices[0]->getNumAvailableDevices(), 4u);
|
||||
EXPECT_EQ(devices[1]->getNumAvailableDevices(), 4u);
|
||||
EXPECT_EQ(devices[0]->getNumSubDevices(), 4u);
|
||||
EXPECT_EQ(devices[1]->getNumSubDevices(), 4u);
|
||||
}
|
||||
|
||||
TEST_F(DeviceFactoryTest, WhenOverridingEngineTypeThenDebugEngineIsReported) {
|
||||
|
|
|
@ -27,7 +27,8 @@ XEHPTEST_F(XeHPUsDeviceIdTest, givenRevisionAWhenCreatingEngineWithSubdevicesThe
|
|||
MockDevice device(executionEnvironment, 0);
|
||||
EXPECT_EQ(0u, device.engines.size());
|
||||
device.createSubDevices();
|
||||
EXPECT_EQ(2u, device.getNumAvailableDevices());
|
||||
device.createEngines();
|
||||
EXPECT_EQ(2u, device.getNumGenericSubDevices());
|
||||
|
||||
auto hwInfo = device.getRootDeviceEnvironment().getMutableHardwareInfo();
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo->platform.eProductFamily);
|
||||
|
@ -47,7 +48,8 @@ XEHPTEST_F(XeHPUsDeviceIdTest, givenRevisionBWhenCreatingEngineWithSubdevicesThe
|
|||
MockDevice device(executionEnvironment, 0);
|
||||
EXPECT_EQ(0u, device.engines.size());
|
||||
device.createSubDevices();
|
||||
EXPECT_EQ(2u, device.getNumAvailableDevices());
|
||||
device.createEngines();
|
||||
EXPECT_EQ(2u, device.getNumGenericSubDevices());
|
||||
|
||||
auto hwInfo = device.getRootDeviceEnvironment().getMutableHardwareInfo();
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo->platform.eProductFamily);
|
||||
|
|
|
@ -52,7 +52,7 @@ ErrorCode CommandContainer::initialize(Device *device) {
|
|||
true /* allocateMemory*/,
|
||||
alignedSize,
|
||||
GraphicsAllocation::AllocationType::COMMAND_BUFFER,
|
||||
(device->getNumAvailableDevices() > 1u) /* multiOsContextCapable */,
|
||||
(device->getNumGenericSubDevices() > 1u) /* multiOsContextCapable */,
|
||||
false,
|
||||
device->getDeviceBitfield()};
|
||||
|
||||
|
@ -72,7 +72,7 @@ ErrorCode CommandContainer::initialize(Device *device) {
|
|||
}
|
||||
|
||||
constexpr size_t heapSize = 65536u;
|
||||
heapHelper = std::unique_ptr<HeapHelper>(new HeapHelper(device->getMemoryManager(), device->getDefaultEngine().commandStreamReceiver->getInternalAllocationStorage(), device->getNumAvailableDevices() > 1u));
|
||||
heapHelper = std::unique_ptr<HeapHelper>(new HeapHelper(device->getMemoryManager(), device->getDefaultEngine().commandStreamReceiver->getInternalAllocationStorage(), device->getNumGenericSubDevices() > 1u));
|
||||
|
||||
for (uint32_t i = 0; i < IndirectHeap::Type::NUM_TYPES; i++) {
|
||||
if (NEO::ApiSpecificConfig::getBindlessConfiguration() && i != IndirectHeap::INDIRECT_OBJECT) {
|
||||
|
@ -226,7 +226,7 @@ void CommandContainer::allocateNextCommandBuffer() {
|
|||
true /* allocateMemory*/,
|
||||
alignedSize,
|
||||
GraphicsAllocation::AllocationType::COMMAND_BUFFER,
|
||||
(device->getNumAvailableDevices() > 1u) /* multiOsContextCapable */,
|
||||
(device->getNumGenericSubDevices() > 1u) /* multiOsContextCapable */,
|
||||
false,
|
||||
device->getDeviceBitfield()};
|
||||
|
||||
|
|
|
@ -535,7 +535,7 @@ bool CommandStreamReceiver::createWorkPartitionAllocation(const Device &device)
|
|||
if (!staticWorkPartitioningEnabled) {
|
||||
return false;
|
||||
}
|
||||
UNRECOVERABLE_IF(device.getNumAvailableDevices() < 2);
|
||||
UNRECOVERABLE_IF(device.getNumGenericSubDevices() < 2);
|
||||
|
||||
AllocationProperties properties{this->rootDeviceIndex, true, 4096u, GraphicsAllocation::AllocationType::WORK_PARTITION_SURFACE, true, false, deviceBitfield};
|
||||
this->workPartitionAllocation = getMemoryManager()->allocateGraphicsMemoryWithProperties(properties);
|
||||
|
|
|
@ -479,11 +479,8 @@ bool Device::getHostTimer(uint64_t *hostTimestamp) const {
|
|||
return getOSTime()->getCpuTime(hostTimestamp);
|
||||
}
|
||||
|
||||
uint32_t Device::getNumAvailableDevices() const {
|
||||
if (subdevices.empty()) {
|
||||
return 1u;
|
||||
}
|
||||
return getNumSubDevices();
|
||||
uint32_t Device::getNumGenericSubDevices() const {
|
||||
return (hasRootCsr() ? getNumSubDevices() : 0);
|
||||
}
|
||||
|
||||
Device *Device::getSubDevice(uint32_t deviceId) const {
|
||||
|
|
|
@ -108,7 +108,7 @@ class Device : public ReferenceTrackedObject<Device> {
|
|||
void allocateSyncBufferHandler();
|
||||
|
||||
virtual uint32_t getRootDeviceIndex() const = 0;
|
||||
uint32_t getNumAvailableDevices() const;
|
||||
uint32_t getNumGenericSubDevices() const;
|
||||
Device *getSubDevice(uint32_t deviceId) const;
|
||||
Device *getNearestGenericSubDevice(uint32_t deviceId);
|
||||
virtual Device *getRootDevice() const = 0;
|
||||
|
|
|
@ -39,7 +39,7 @@ Device *RootDevice::getRootDevice() const {
|
|||
|
||||
void RootDevice::createBindlessHeapsHelper() {
|
||||
if (ApiSpecificConfig::getBindlessConfiguration()) {
|
||||
this->executionEnvironment->rootDeviceEnvironments[getRootDeviceIndex()]->createBindlessHeapsHelper(getMemoryManager(), getNumAvailableDevices() > 1, rootDeviceIndex);
|
||||
this->executionEnvironment->rootDeviceEnvironments[getRootDeviceIndex()]->createBindlessHeapsHelper(getMemoryManager(), getNumGenericSubDevices() > 1, rootDeviceIndex);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ Device *SubDevice::getRootDevice() const {
|
|||
|
||||
uint64_t SubDevice::getGlobalMemorySize(uint32_t deviceBitfield) const {
|
||||
auto globalMemorySize = Device::getGlobalMemorySize(static_cast<uint32_t>(maxNBitValue(rootDevice.getNumSubDevices())));
|
||||
return globalMemorySize / rootDevice.getNumAvailableDevices();
|
||||
return globalMemorySize / std::max(rootDevice.getNumGenericSubDevices(), 1u);
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
|
|
@ -34,13 +34,13 @@ TEST(BindlessHeapsHelper, givenBindlessModeFlagDisabledWhenCreatingRootDevicesTh
|
|||
using BindlessHeapsHelperTests = Test<MemManagerFixture>;
|
||||
|
||||
TEST_F(BindlessHeapsHelperTests, givenBindlessHeapHelperWhenItsCreatedThenSpecialSshAllocatedAtHeapBegining) {
|
||||
auto bindlessHeapHelper = std::make_unique<MockBindlesHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumAvailableDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
auto bindlessHeapHelper = std::make_unique<MockBindlesHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumGenericSubDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
auto specialSshAllocation = bindlessHeapHelper->specialSsh->getGraphicsAllocation();
|
||||
EXPECT_EQ(specialSshAllocation->getGpuAddress(), specialSshAllocation->getGpuBaseAddress());
|
||||
}
|
||||
|
||||
TEST_F(BindlessHeapsHelperTests, givenBindlessHeapHelperWhenAllocateSsInHeapThenHeapUsedSpaceGrow) {
|
||||
auto bindlessHeapHelper = std::make_unique<MockBindlesHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumAvailableDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
auto bindlessHeapHelper = std::make_unique<MockBindlesHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumGenericSubDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
auto usedBefore = bindlessHeapHelper->globalSsh->getUsed();
|
||||
|
||||
MockGraphicsAllocation alloc;
|
||||
|
@ -51,7 +51,7 @@ TEST_F(BindlessHeapsHelperTests, givenBindlessHeapHelperWhenAllocateSsInHeapThen
|
|||
}
|
||||
|
||||
TEST_F(BindlessHeapsHelperTests, givenBindlessHeapHelperWhenAllocateSsInHeapThenMemoryAtReturnedOffsetIsCorrect) {
|
||||
auto bindlessHeapHelper = std::make_unique<MockBindlesHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumAvailableDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
auto bindlessHeapHelper = std::make_unique<MockBindlesHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumGenericSubDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
|
||||
MockGraphicsAllocation alloc;
|
||||
size_t size = 0x40;
|
||||
|
@ -62,7 +62,7 @@ TEST_F(BindlessHeapsHelperTests, givenBindlessHeapHelperWhenAllocateSsInHeapThen
|
|||
}
|
||||
|
||||
TEST_F(BindlessHeapsHelperTests, givenBindlessHeapHelperWhenAllocateSsInHeapTwiceForTheSameAllocationThenTheSameOffsetReturned) {
|
||||
auto bindlessHeapHelper = std::make_unique<MockBindlesHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumAvailableDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
auto bindlessHeapHelper = std::make_unique<MockBindlesHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumGenericSubDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
|
||||
MockGraphicsAllocation alloc;
|
||||
size_t size = 0x40;
|
||||
|
@ -73,7 +73,7 @@ TEST_F(BindlessHeapsHelperTests, givenBindlessHeapHelperWhenAllocateSsInHeapTwic
|
|||
}
|
||||
|
||||
TEST_F(BindlessHeapsHelperTests, givenBindlessHeapHelperWhenAllocateSsInHeapTwiceForDifferentAllocationThenDifferentOffsetsReturned) {
|
||||
auto bindlessHeapHelper = std::make_unique<MockBindlesHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumAvailableDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
auto bindlessHeapHelper = std::make_unique<MockBindlesHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumGenericSubDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
|
||||
MockGraphicsAllocation alloc1;
|
||||
MockGraphicsAllocation alloc2;
|
||||
|
@ -87,7 +87,7 @@ TEST_F(BindlessHeapsHelperTests, givenBindlessHeapHelperWhenAllocateSsInHeapTwic
|
|||
}
|
||||
|
||||
TEST_F(BindlessHeapsHelperTests, givenBindlessHeapHelperWhenAllocatingMoreSsThenNewHeapAllocationCreated) {
|
||||
auto bindlessHeapHelper = std::make_unique<MockBindlesHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumAvailableDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
auto bindlessHeapHelper = std::make_unique<MockBindlesHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumGenericSubDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
size_t ssSize = 0x40;
|
||||
auto ssCount = bindlessHeapHelper->globalSsh->getAvailableSpace() / ssSize;
|
||||
auto graphicsAllocations = std::make_unique<MockGraphicsAllocation[]>(ssCount);
|
||||
|
@ -104,27 +104,27 @@ TEST_F(BindlessHeapsHelperTests, givenBindlessHeapHelperWhenAllocatingMoreSsThen
|
|||
}
|
||||
|
||||
TEST_F(BindlessHeapsHelperTests, givenBindlessHeapHelperWhenCreatedThenAllocationsHaveTheSameBaseAddress) {
|
||||
auto bindlessHeapHelper = std::make_unique<MockBindlesHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumAvailableDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
auto bindlessHeapHelper = std::make_unique<MockBindlesHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumGenericSubDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
for (auto allocation : bindlessHeapHelper->ssHeapsAllocations) {
|
||||
EXPECT_EQ(allocation->getGpuBaseAddress(), bindlessHeapHelper->getGlobalHeapsBase());
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(BindlessHeapsHelperTests, givenBindlessHeapHelperWhenGetDefaultBorderColorOffsetCalledThenCorrectOffsetReturned) {
|
||||
auto bindlessHeapHelper = std::make_unique<MockBindlesHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumAvailableDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
auto bindlessHeapHelper = std::make_unique<MockBindlesHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumGenericSubDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
auto expectedOffset = bindlessHeapHelper->borderColorStates->getGpuAddress() - bindlessHeapHelper->borderColorStates->getGpuBaseAddress();
|
||||
EXPECT_EQ(bindlessHeapHelper->getDefaultBorderColorOffset(), expectedOffset);
|
||||
}
|
||||
|
||||
TEST_F(BindlessHeapsHelperTests, givenBindlessHeapHelperWhenGetAlphaBorderColorOffsetCalledThenCorrectOffsetReturned) {
|
||||
auto borderColorSize = 0x40;
|
||||
auto bindlessHeapHelper = std::make_unique<MockBindlesHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumAvailableDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
auto bindlessHeapHelper = std::make_unique<MockBindlesHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumGenericSubDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
auto expectedOffset = bindlessHeapHelper->borderColorStates->getGpuAddress() - bindlessHeapHelper->borderColorStates->getGpuBaseAddress() + borderColorSize;
|
||||
EXPECT_EQ(bindlessHeapHelper->getAlphaBorderColorOffset(), expectedOffset);
|
||||
}
|
||||
|
||||
TEST_F(BindlessHeapsHelperTests, givenBindlessHeapHelperWhenAllocateSsInSpecialHeapThenOffsetLessThanFrontWindowSize) {
|
||||
auto bindlessHeapHelper = std::make_unique<MockBindlesHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumAvailableDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
auto bindlessHeapHelper = std::make_unique<MockBindlesHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumGenericSubDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
MockGraphicsAllocation alloc;
|
||||
size_t size = 0x40;
|
||||
auto ssInHeapInfo = bindlessHeapHelper->allocateSSInHeap(size, &alloc, BindlessHeapsHelper::BindlesHeapType::SPECIAL_SSH);
|
||||
|
@ -132,7 +132,7 @@ TEST_F(BindlessHeapsHelperTests, givenBindlessHeapHelperWhenAllocateSsInSpecialH
|
|||
EXPECT_LT(ssInHeapInfo.surfaceStateOffset, frontWindowSize);
|
||||
}
|
||||
TEST_F(BindlessHeapsHelperTests, givenBindlessHeapHelperWhenAllocateSsInGlobalHeapThenOffsetLessThanFrontWindowSize) {
|
||||
auto bindlessHeapHelper = std::make_unique<MockBindlesHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumAvailableDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
auto bindlessHeapHelper = std::make_unique<MockBindlesHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumGenericSubDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
MockGraphicsAllocation alloc;
|
||||
size_t size = 0x40;
|
||||
auto ssInHeapInfo = bindlessHeapHelper->allocateSSInHeap(size, &alloc, BindlessHeapsHelper::BindlesHeapType::GLOBAL_SSH);
|
||||
|
@ -141,7 +141,7 @@ TEST_F(BindlessHeapsHelperTests, givenBindlessHeapHelperWhenAllocateSsInGlobalHe
|
|||
}
|
||||
|
||||
TEST_F(BindlessHeapsHelperTests, givenBindlessHeapHelperWhenAllocateSsInScratchHeapThenOffsetLessThanFrontWindowSize) {
|
||||
auto bindlessHeapHelper = std::make_unique<MockBindlesHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumAvailableDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
auto bindlessHeapHelper = std::make_unique<MockBindlesHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumGenericSubDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
MockGraphicsAllocation alloc;
|
||||
size_t size = 0x40;
|
||||
auto ssInHeapInfo = bindlessHeapHelper->allocateSSInHeap(size, &alloc, BindlessHeapsHelper::BindlesHeapType::SCRATCH_SSH);
|
||||
|
@ -150,7 +150,7 @@ TEST_F(BindlessHeapsHelperTests, givenBindlessHeapHelperWhenAllocateSsInScratchH
|
|||
}
|
||||
|
||||
TEST_F(BindlessHeapsHelperTests, givenBindlessHeapHelperWhenAllocateSsInGlobalDshThenOffsetGreaterOrEqualFrontWindowSize) {
|
||||
auto bindlessHeapHelper = std::make_unique<MockBindlesHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumAvailableDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
auto bindlessHeapHelper = std::make_unique<MockBindlesHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumGenericSubDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
MockGraphicsAllocation alloc;
|
||||
size_t size = 0x40;
|
||||
auto ssInHeapInfo = bindlessHeapHelper->allocateSSInHeap(size, &alloc, BindlessHeapsHelper::BindlesHeapType::GLOBAL_DSH);
|
||||
|
@ -161,7 +161,7 @@ TEST_F(BindlessHeapsHelperTests, givenBindlessHeapHelperWhenAllocateSsInGlobalDs
|
|||
TEST_F(BindlessHeapsHelperTests, givenBindlessHeapHelperWhenFreeGraphicsMemoryIsCalledThenSSinHeapInfoShouldBePlacedInReuseVector) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.UseBindlessMode.set(1);
|
||||
auto bindlessHeapHelper = std::make_unique<MockBindlesHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumAvailableDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
auto bindlessHeapHelper = std::make_unique<MockBindlesHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumGenericSubDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
MockBindlesHeapsHelper *bindlessHeapHelperPtr = bindlessHeapHelper.get();
|
||||
pDevice->getExecutionEnvironment()->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->bindlessHeapsHelper.reset(bindlessHeapHelper.release());
|
||||
MockGraphicsAllocation *alloc = new MockGraphicsAllocation;
|
||||
|
@ -177,7 +177,7 @@ TEST_F(BindlessHeapsHelperTests, givenBindlessHeapHelperWhenFreeGraphicsMemoryIs
|
|||
TEST_F(BindlessHeapsHelperTests, givenBindlessHeapHelperPreviousAllocationThenItShouldBeReused) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.UseBindlessMode.set(1);
|
||||
auto bindlessHeapHelper = std::make_unique<MockBindlesHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumAvailableDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
auto bindlessHeapHelper = std::make_unique<MockBindlesHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumGenericSubDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
MockBindlesHeapsHelper *bindlessHeapHelperPtr = bindlessHeapHelper.get();
|
||||
pDevice->getExecutionEnvironment()->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->bindlessHeapsHelper.reset(bindlessHeapHelper.release());
|
||||
MockGraphicsAllocation *alloc = new MockGraphicsAllocation;
|
||||
|
|
|
@ -37,8 +37,8 @@ UltDeviceFactory::UltDeviceFactory(uint32_t rootDevicesCount, uint32_t subDevice
|
|||
|
||||
for (auto &pCreatedDevice : createdDevices) {
|
||||
pCreatedDevice->incRefInternal();
|
||||
if (pCreatedDevice->getNumAvailableDevices() > 1) {
|
||||
for (uint32_t i = 0; i < pCreatedDevice->getNumAvailableDevices(); i++) {
|
||||
if (pCreatedDevice->getNumSubDevices() > 1) {
|
||||
for (uint32_t i = 0; i < pCreatedDevice->getNumSubDevices(); i++) {
|
||||
this->subDevices.push_back(static_cast<SubDevice *>(pCreatedDevice->getSubDevice(i)));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1156,7 +1156,9 @@ HWTEST_F(BindlessCommandEncodeStatesTesttt, givenBindlessKernelWhenBindlessModeE
|
|||
auto commandContainer = std::make_unique<CommandContainer>();
|
||||
commandContainer->initialize(pDevice);
|
||||
commandContainer->setDirtyStateForAllHeaps(false);
|
||||
pDevice->getExecutionEnvironment()->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->createBindlessHeapsHelper(pDevice->getMemoryManager(), pDevice->getNumAvailableDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
pDevice->getExecutionEnvironment()->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->createBindlessHeapsHelper(pDevice->getMemoryManager(),
|
||||
pDevice->getNumGenericSubDevices() > 1,
|
||||
pDevice->getRootDeviceIndex());
|
||||
uint32_t numBindingTable = 1;
|
||||
BINDING_TABLE_STATE bindingTableState = FamilyType::cmdInitBindingTableState;
|
||||
|
||||
|
@ -1191,7 +1193,9 @@ HWTEST_F(BindlessCommandEncodeStatesTesttt, givenBindfulKernelWhenBindlessModeEn
|
|||
auto commandContainer = std::make_unique<CommandContainer>();
|
||||
commandContainer->initialize(pDevice);
|
||||
commandContainer->setDirtyStateForAllHeaps(false);
|
||||
pDevice->getExecutionEnvironment()->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->createBindlessHeapsHelper(pDevice->getMemoryManager(), pDevice->getNumAvailableDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
pDevice->getExecutionEnvironment()->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->createBindlessHeapsHelper(pDevice->getMemoryManager(),
|
||||
pDevice->getNumGenericSubDevices() > 1,
|
||||
pDevice->getRootDeviceIndex());
|
||||
uint32_t numBindingTable = 1;
|
||||
BINDING_TABLE_STATE bindingTableState = FamilyType::cmdInitBindingTableState;
|
||||
|
||||
|
@ -1226,7 +1230,9 @@ HWTEST_F(BindlessCommandEncodeStatesTesttt, givenBindlessModeEnabledWhenDispatch
|
|||
auto commandContainer = std::make_unique<CommandContainer>();
|
||||
commandContainer->initialize(pDevice);
|
||||
commandContainer->setDirtyStateForAllHeaps(false);
|
||||
pDevice->getExecutionEnvironment()->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->createBindlessHeapsHelper(pDevice->getMemoryManager(), pDevice->getNumAvailableDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
pDevice->getExecutionEnvironment()->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->createBindlessHeapsHelper(pDevice->getMemoryManager(),
|
||||
pDevice->getNumGenericSubDevices() > 1,
|
||||
pDevice->getRootDeviceIndex());
|
||||
uint32_t numBindingTable = 1;
|
||||
BINDING_TABLE_STATE bindingTableState = FamilyType::cmdInitBindingTableState;
|
||||
|
||||
|
@ -1274,7 +1280,9 @@ HWTEST_F(BindlessCommandEncodeStatesTest, givenGlobalBindlessHeapsWhenDispatchin
|
|||
uint32_t numSamplers = 1;
|
||||
SAMPLER_BORDER_COLOR_STATE samplerState;
|
||||
samplerState.init();
|
||||
pDevice->getExecutionEnvironment()->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->createBindlessHeapsHelper(pDevice->getMemoryManager(), pDevice->getNumAvailableDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
pDevice->getExecutionEnvironment()->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->createBindlessHeapsHelper(pDevice->getMemoryManager(),
|
||||
pDevice->getNumGenericSubDevices() > 1,
|
||||
pDevice->getRootDeviceIndex());
|
||||
|
||||
uint32_t dims[] = {2, 1, 1};
|
||||
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
|
||||
|
@ -1305,7 +1313,9 @@ HWTEST_F(BindlessCommandEncodeStatesTest, givenBindlessModeDisabledelWithSampler
|
|||
uint32_t numSamplers = 1;
|
||||
SAMPLER_STATE samplerState;
|
||||
memset(&samplerState, 2, sizeof(SAMPLER_STATE));
|
||||
pDevice->getExecutionEnvironment()->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->createBindlessHeapsHelper(pDevice->getMemoryManager(), pDevice->getNumAvailableDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
pDevice->getExecutionEnvironment()->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->createBindlessHeapsHelper(pDevice->getMemoryManager(),
|
||||
pDevice->getNumGenericSubDevices() > 1,
|
||||
pDevice->getRootDeviceIndex());
|
||||
|
||||
uint32_t dims[] = {2, 1, 1};
|
||||
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
|
||||
|
|
|
@ -59,7 +59,9 @@ HWTEST_F(BindlessCommandEncodeStatesTest, GivenBindlessEnabledWhenBorderColorWit
|
|||
DebugManager.flags.UseBindlessMode.set(1);
|
||||
using SAMPLER_STATE = typename FamilyType::SAMPLER_STATE;
|
||||
uint32_t numSamplers = 1;
|
||||
pDevice->getExecutionEnvironment()->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->createBindlessHeapsHelper(pDevice->getMemoryManager(), pDevice->getNumAvailableDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
pDevice->getExecutionEnvironment()->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->createBindlessHeapsHelper(pDevice->getMemoryManager(),
|
||||
pDevice->getNumGenericSubDevices() > 1,
|
||||
pDevice->getRootDeviceIndex());
|
||||
|
||||
uint32_t borderColorSize = 0x40;
|
||||
SAMPLER_BORDER_COLOR_STATE samplerState;
|
||||
|
@ -78,7 +80,9 @@ HWTEST_F(BindlessCommandEncodeStatesTest, GivenBindlessEnabledWhenBorderColorWit
|
|||
DebugManager.flags.UseBindlessMode.set(1);
|
||||
using SAMPLER_STATE = typename FamilyType::SAMPLER_STATE;
|
||||
uint32_t numSamplers = 1;
|
||||
pDevice->getExecutionEnvironment()->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->createBindlessHeapsHelper(pDevice->getMemoryManager(), pDevice->getNumAvailableDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
pDevice->getExecutionEnvironment()->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->createBindlessHeapsHelper(pDevice->getMemoryManager(),
|
||||
pDevice->getNumGenericSubDevices() > 1,
|
||||
pDevice->getRootDeviceIndex());
|
||||
|
||||
uint32_t borderColorSize = 0x40;
|
||||
SAMPLER_BORDER_COLOR_STATE samplerState;
|
||||
|
@ -98,7 +102,9 @@ HWTEST_F(BindlessCommandEncodeStatesTest, GivenBindlessEnabledWhenBorderColorsRe
|
|||
DebugManager.flags.UseBindlessMode.set(1);
|
||||
using SAMPLER_STATE = typename FamilyType::SAMPLER_STATE;
|
||||
uint32_t numSamplers = 1;
|
||||
pDevice->getExecutionEnvironment()->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->createBindlessHeapsHelper(pDevice->getMemoryManager(), pDevice->getNumAvailableDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
pDevice->getExecutionEnvironment()->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->createBindlessHeapsHelper(pDevice->getMemoryManager(),
|
||||
pDevice->getNumGenericSubDevices() > 1,
|
||||
pDevice->getRootDeviceIndex());
|
||||
|
||||
uint32_t borderColorSize = 0x40;
|
||||
SAMPLER_BORDER_COLOR_STATE samplerState;
|
||||
|
@ -114,7 +120,9 @@ HWTEST_F(BindlessCommandEncodeStatesTest, GivenBindlessEnabledWhenBorderColorsGr
|
|||
DebugManager.flags.UseBindlessMode.set(1);
|
||||
using SAMPLER_STATE = typename FamilyType::SAMPLER_STATE;
|
||||
uint32_t numSamplers = 1;
|
||||
pDevice->getExecutionEnvironment()->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->createBindlessHeapsHelper(pDevice->getMemoryManager(), pDevice->getNumAvailableDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
pDevice->getExecutionEnvironment()->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->createBindlessHeapsHelper(pDevice->getMemoryManager(),
|
||||
pDevice->getNumGenericSubDevices() > 1,
|
||||
pDevice->getRootDeviceIndex());
|
||||
|
||||
uint32_t borderColorSize = 0x40;
|
||||
SAMPLER_BORDER_COLOR_STATE samplerState;
|
||||
|
@ -130,7 +138,9 @@ HWTEST_F(BindlessCommandEncodeStatesTest, GivenBindlessEnabledWhenBorderColorsBl
|
|||
DebugManager.flags.UseBindlessMode.set(1);
|
||||
using SAMPLER_STATE = typename FamilyType::SAMPLER_STATE;
|
||||
uint32_t numSamplers = 1;
|
||||
pDevice->getExecutionEnvironment()->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->createBindlessHeapsHelper(pDevice->getMemoryManager(), pDevice->getNumAvailableDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
pDevice->getExecutionEnvironment()->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->createBindlessHeapsHelper(pDevice->getMemoryManager(),
|
||||
pDevice->getNumGenericSubDevices() > 1,
|
||||
pDevice->getRootDeviceIndex());
|
||||
|
||||
uint32_t borderColorSize = 0x40;
|
||||
SAMPLER_BORDER_COLOR_STATE samplerState;
|
||||
|
@ -146,7 +156,9 @@ HWTEST_F(BindlessCommandEncodeStatesTest, GivenBindlessEnabledWhenBorderColorsAl
|
|||
DebugManager.flags.UseBindlessMode.set(1);
|
||||
using SAMPLER_STATE = typename FamilyType::SAMPLER_STATE;
|
||||
uint32_t numSamplers = 1;
|
||||
pDevice->getExecutionEnvironment()->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->createBindlessHeapsHelper(pDevice->getMemoryManager(), pDevice->getNumAvailableDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
pDevice->getExecutionEnvironment()->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->createBindlessHeapsHelper(pDevice->getMemoryManager(),
|
||||
pDevice->getNumGenericSubDevices() > 1,
|
||||
pDevice->getRootDeviceIndex());
|
||||
|
||||
uint32_t borderColorSize = 0x40;
|
||||
SAMPLER_BORDER_COLOR_STATE samplerState;
|
||||
|
|
|
@ -77,7 +77,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ScratchComtrolerTests, givenDirtyScratchAllocationO
|
|||
std::unique_ptr<MockScratchSpaceControllerXeHPAndLater> scratchController = std::make_unique<MockScratchSpaceControllerXeHPAndLater>(pDevice->getRootDeviceIndex(),
|
||||
*execEnv,
|
||||
*csr.getInternalAllocationStorage());
|
||||
auto bindlessHeapHelper = std::make_unique<BindlessHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumAvailableDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
auto bindlessHeapHelper = std::make_unique<BindlessHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumGenericSubDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
bool gsbaStateDirty = false;
|
||||
bool frontEndStateDirty = false;
|
||||
scratchController->scratchDirty = true;
|
||||
|
@ -97,7 +97,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ScratchComtrolerTests, givenNotDirtyScratchAllocati
|
|||
std::unique_ptr<MockScratchSpaceControllerXeHPAndLater> scratchController = std::make_unique<MockScratchSpaceControllerXeHPAndLater>(pDevice->getRootDeviceIndex(),
|
||||
*execEnv,
|
||||
*csr.getInternalAllocationStorage());
|
||||
auto bindlessHeapHelper = std::make_unique<BindlessHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumAvailableDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
auto bindlessHeapHelper = std::make_unique<BindlessHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumGenericSubDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
bool gsbaStateDirty = false;
|
||||
bool frontEndStateDirty = false;
|
||||
scratchController->scratchDirty = false;
|
||||
|
@ -119,7 +119,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ScratchComtrolerTests, givenPrivateScratchEnabledWh
|
|||
std::unique_ptr<MockScratchSpaceControllerXeHPAndLater> scratchController = std::make_unique<MockScratchSpaceControllerXeHPAndLater>(pDevice->getRootDeviceIndex(),
|
||||
*execEnv,
|
||||
*csr.getInternalAllocationStorage());
|
||||
auto bindlessHeapHelper = std::make_unique<BindlessHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumAvailableDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
auto bindlessHeapHelper = std::make_unique<BindlessHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumGenericSubDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
bool gsbaStateDirty = false;
|
||||
bool frontEndStateDirty = false;
|
||||
scratchController->scratchDirty = true;
|
||||
|
@ -141,7 +141,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ScratchComtrolerTests, givenPrivateScratchDisabledW
|
|||
std::unique_ptr<MockScratchSpaceControllerXeHPAndLater> scratchController = std::make_unique<MockScratchSpaceControllerXeHPAndLater>(pDevice->getRootDeviceIndex(),
|
||||
*execEnv,
|
||||
*csr.getInternalAllocationStorage());
|
||||
auto bindlessHeapHelper = std::make_unique<BindlessHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumAvailableDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
auto bindlessHeapHelper = std::make_unique<BindlessHeapsHelper>(pDevice->getMemoryManager(), pDevice->getNumGenericSubDevices() > 1, pDevice->getRootDeviceIndex());
|
||||
bool gsbaStateDirty = false;
|
||||
bool frontEndStateDirty = false;
|
||||
scratchController->scratchDirty = true;
|
||||
|
|
Loading…
Reference in New Issue