Refactor: don't use global ProductHelper getter in ocl files 2/n
Related-To: NEO-6853 Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
parent
59c8c14d52
commit
7c23ea3928
|
@ -86,9 +86,9 @@ CommandQueue::CommandQueue(Context *context, ClDevice *device, const cl_queue_pr
|
||||||
if (device) {
|
if (device) {
|
||||||
auto &hwInfo = device->getHardwareInfo();
|
auto &hwInfo = device->getHardwareInfo();
|
||||||
auto &gfxCoreHelper = device->getGfxCoreHelper();
|
auto &gfxCoreHelper = device->getGfxCoreHelper();
|
||||||
auto productHelper = ProductHelper::get(hwInfo.platform.eProductFamily);
|
auto &productHelper = device->getProductHelper();
|
||||||
|
|
||||||
bcsAllowed = productHelper->isBlitterFullySupported(hwInfo) &&
|
bcsAllowed = productHelper.isBlitterFullySupported(hwInfo) &&
|
||||||
gfxCoreHelper.isSubDeviceEngineSupported(hwInfo, device->getDeviceBitfield(), aub_stream::EngineType::ENGINE_BCS);
|
gfxCoreHelper.isSubDeviceEngineSupported(hwInfo, device->getDeviceBitfield(), aub_stream::EngineType::ENGINE_BCS);
|
||||||
|
|
||||||
if (bcsAllowed || device->getDefaultEngine().commandStreamReceiver->peekTimestampPacketWriteEnabled()) {
|
if (bcsAllowed || device->getDefaultEngine().commandStreamReceiver->peekTimestampPacketWriteEnabled()) {
|
||||||
|
@ -182,7 +182,7 @@ void CommandQueue::initializeGpgpu() const {
|
||||||
|
|
||||||
void CommandQueue::initializeGpgpuInternals() const {
|
void CommandQueue::initializeGpgpuInternals() const {
|
||||||
auto &hwInfo = device->getDevice().getHardwareInfo();
|
auto &hwInfo = device->getDevice().getHardwareInfo();
|
||||||
const auto &productHelper = *ProductHelper::get(hwInfo.platform.eProductFamily);
|
auto &productHelper = device->getProductHelper();
|
||||||
|
|
||||||
if (device->getDevice().getDebugger() && !this->gpgpuEngine->commandStreamReceiver->getDebugSurfaceAllocation()) {
|
if (device->getDevice().getDebugger() && !this->gpgpuEngine->commandStreamReceiver->getDebugSurfaceAllocation()) {
|
||||||
auto maxDbgSurfaceSize = NEO::SipKernel::getSipKernel(device->getDevice()).getStateSaveAreaSize(&device->getDevice());
|
auto maxDbgSurfaceSize = NEO::SipKernel::getSipKernel(device->getDevice()).getStateSaveAreaSize(&device->getDevice());
|
||||||
|
@ -918,9 +918,8 @@ size_t CommandQueue::estimateTimestampPacketNodesCount(const MultiDispatchInfo &
|
||||||
bool CommandQueue::bufferCpuCopyAllowed(Buffer *buffer, cl_command_type commandType, cl_bool blocking, size_t size, void *ptr,
|
bool CommandQueue::bufferCpuCopyAllowed(Buffer *buffer, cl_command_type commandType, cl_bool blocking, size_t size, void *ptr,
|
||||||
cl_uint numEventsInWaitList, const cl_event *eventWaitList) {
|
cl_uint numEventsInWaitList, const cl_event *eventWaitList) {
|
||||||
|
|
||||||
const auto &hwInfo = device->getHardwareInfo();
|
auto &productHelper = device->getProductHelper();
|
||||||
const auto &productHelper = ProductHelper::get(hwInfo.platform.eProductFamily);
|
if (CL_COMMAND_READ_BUFFER == commandType && productHelper.isCpuCopyNecessary(ptr, buffer->getMemoryManager())) {
|
||||||
if (CL_COMMAND_READ_BUFFER == commandType && productHelper->isCpuCopyNecessary(ptr, buffer->getMemoryManager())) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1019,8 +1018,8 @@ bool CommandQueue::blitEnqueueAllowed(const CsrSelectionArgs &args) const {
|
||||||
|
|
||||||
bool CommandQueue::blitEnqueueImageAllowed(const size_t *origin, const size_t *region, const Image &image) const {
|
bool CommandQueue::blitEnqueueImageAllowed(const size_t *origin, const size_t *region, const Image &image) const {
|
||||||
const auto &hwInfo = device->getHardwareInfo();
|
const auto &hwInfo = device->getHardwareInfo();
|
||||||
const auto &productHelper = ProductHelper::get(hwInfo.platform.eProductFamily);
|
auto &productHelper = device->getProductHelper();
|
||||||
auto blitEnqueueImageAllowed = productHelper->isBlitterForImagesSupported();
|
auto blitEnqueueImageAllowed = productHelper.isBlitterForImagesSupported();
|
||||||
|
|
||||||
if (DebugManager.flags.EnableBlitterForEnqueueImageOperations.get() != -1) {
|
if (DebugManager.flags.EnableBlitterForEnqueueImageOperations.get() != -1) {
|
||||||
blitEnqueueImageAllowed = DebugManager.flags.EnableBlitterForEnqueueImageOperations.get();
|
blitEnqueueImageAllowed = DebugManager.flags.EnableBlitterForEnqueueImageOperations.get();
|
||||||
|
@ -1033,7 +1032,7 @@ bool CommandQueue::blitEnqueueImageAllowed(const size_t *origin, const size_t *r
|
||||||
auto isTile64 = defaultGmm->gmmResourceInfo->getResourceFlags()->Info.Tile64;
|
auto isTile64 = defaultGmm->gmmResourceInfo->getResourceFlags()->Info.Tile64;
|
||||||
auto imageType = image.getImageDesc().image_type;
|
auto imageType = image.getImageDesc().image_type;
|
||||||
if (isTile64 && (imageType == CL_MEM_OBJECT_IMAGE3D)) {
|
if (isTile64 && (imageType == CL_MEM_OBJECT_IMAGE3D)) {
|
||||||
blitEnqueueImageAllowed &= productHelper->isTile64With3DSurfaceOnBCSSupported(hwInfo);
|
blitEnqueueImageAllowed &= productHelper.isTile64With3DSurfaceOnBCSSupported(hwInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1185,7 +1184,7 @@ void CommandQueue::assignDataToOverwrittenBcsNode(TagNodeBase *node) {
|
||||||
|
|
||||||
bool CommandQueue::isWaitForTimestampsEnabled() const {
|
bool CommandQueue::isWaitForTimestampsEnabled() const {
|
||||||
const auto &gfxCoreHelper = getDevice().getGfxCoreHelper();
|
const auto &gfxCoreHelper = getDevice().getGfxCoreHelper();
|
||||||
const auto &productHelper = *ProductHelper::get(getDevice().getHardwareInfo().platform.eProductFamily);
|
auto &productHelper = getDevice().getProductHelper();
|
||||||
auto enabled = CommandQueue::isTimestampWaitEnabled();
|
auto enabled = CommandQueue::isTimestampWaitEnabled();
|
||||||
enabled &= gfxCoreHelper.isTimestampWaitSupportedForQueues();
|
enabled &= gfxCoreHelper.isTimestampWaitSupportedForQueues();
|
||||||
enabled &= !productHelper.isDcFlushAllowed();
|
enabled &= !productHelper.isDcFlushAllowed();
|
||||||
|
|
|
@ -181,12 +181,12 @@ cl_int CommandQueueHw<GfxFamily>::enqueueHandler(Surface **surfacesForResidency,
|
||||||
|
|
||||||
const bool enqueueWithBlitAuxTranslation = isBlitAuxTranslationRequired(multiDispatchInfo);
|
const bool enqueueWithBlitAuxTranslation = isBlitAuxTranslationRequired(multiDispatchInfo);
|
||||||
const auto &hwInfo = this->getDevice().getHardwareInfo();
|
const auto &hwInfo = this->getDevice().getHardwareInfo();
|
||||||
const auto &productHelper = ProductHelper::get(hwInfo.platform.eProductFamily);
|
auto &productHelper = getDevice().getProductHelper();
|
||||||
bool canUsePipeControlInsteadOfSemaphoresForOnCsrDependencies = false;
|
bool canUsePipeControlInsteadOfSemaphoresForOnCsrDependencies = false;
|
||||||
|
|
||||||
if (computeCommandStreamReceiver.peekTimestampPacketWriteEnabled()) {
|
if (computeCommandStreamReceiver.peekTimestampPacketWriteEnabled()) {
|
||||||
canUsePipeControlInsteadOfSemaphoresForOnCsrDependencies = this->peekLatestSentEnqueueOperation() == EnqueueProperties::Operation::GpuKernel &&
|
canUsePipeControlInsteadOfSemaphoresForOnCsrDependencies = this->peekLatestSentEnqueueOperation() == EnqueueProperties::Operation::GpuKernel &&
|
||||||
productHelper->isResolveDependenciesByPipeControlsSupported(hwInfo, this->isOOQEnabled());
|
productHelper.isResolveDependenciesByPipeControlsSupported(hwInfo, this->isOOQEnabled());
|
||||||
if (false == clearDependenciesForSubCapture &&
|
if (false == clearDependenciesForSubCapture &&
|
||||||
false == canUsePipeControlInsteadOfSemaphoresForOnCsrDependencies) {
|
false == canUsePipeControlInsteadOfSemaphoresForOnCsrDependencies) {
|
||||||
eventsRequest.fillCsrDependenciesForTimestampPacketContainer(csrDeps, computeCommandStreamReceiver, CsrDependencies::DependenciesType::OnCsr);
|
eventsRequest.fillCsrDependenciesForTimestampPacketContainer(csrDeps, computeCommandStreamReceiver, CsrDependencies::DependenciesType::OnCsr);
|
||||||
|
|
|
@ -169,6 +169,8 @@ size_t EnqueueOperation<GfxFamily>::getTotalSizeRequiredCS(uint32_t eventType, c
|
||||||
size_t expectedSizeCS = 0;
|
size_t expectedSizeCS = 0;
|
||||||
auto &hwInfo = commandQueue.getDevice().getHardwareInfo();
|
auto &hwInfo = commandQueue.getDevice().getHardwareInfo();
|
||||||
auto &gfxCoreHelper = commandQueue.getDevice().getGfxCoreHelper();
|
auto &gfxCoreHelper = commandQueue.getDevice().getGfxCoreHelper();
|
||||||
|
auto &productHelper = commandQueue.getDevice().getProductHelper();
|
||||||
|
|
||||||
auto &commandQueueHw = static_cast<CommandQueueHw<GfxFamily> &>(commandQueue);
|
auto &commandQueueHw = static_cast<CommandQueueHw<GfxFamily> &>(commandQueue);
|
||||||
|
|
||||||
if (blitEnqueue) {
|
if (blitEnqueue) {
|
||||||
|
@ -189,7 +191,7 @@ size_t EnqueueOperation<GfxFamily>::getTotalSizeRequiredCS(uint32_t eventType, c
|
||||||
if (commandQueue.getGpgpuCommandStreamReceiver().peekTimestampPacketWriteEnabled()) {
|
if (commandQueue.getGpgpuCommandStreamReceiver().peekTimestampPacketWriteEnabled()) {
|
||||||
expectedSizeCS += TimestampPacketHelper::getRequiredCmdStreamSize<GfxFamily>(csrDeps);
|
expectedSizeCS += TimestampPacketHelper::getRequiredCmdStreamSize<GfxFamily>(csrDeps);
|
||||||
expectedSizeCS += EnqueueOperation<GfxFamily>::getSizeRequiredForTimestampPacketWrite();
|
expectedSizeCS += EnqueueOperation<GfxFamily>::getSizeRequiredForTimestampPacketWrite();
|
||||||
if (ProductHelper::get(hwInfo.platform.eProductFamily)->isResolveDependenciesByPipeControlsSupported(hwInfo, commandQueue.isOOQEnabled())) {
|
if (productHelper.isResolveDependenciesByPipeControlsSupported(hwInfo, commandQueue.isOOQEnabled())) {
|
||||||
expectedSizeCS += MemorySynchronizationCommands<GfxFamily>::getSizeForSingleBarrier(false);
|
expectedSizeCS += MemorySynchronizationCommands<GfxFamily>::getSizeForSingleBarrier(false);
|
||||||
}
|
}
|
||||||
if (isMarkerWithProfiling) {
|
if (isMarkerWithProfiling) {
|
||||||
|
|
|
@ -478,8 +478,7 @@ bool Context::BufferPoolAllocator::isAggregatedSmallBuffersEnabled(Context *cont
|
||||||
bool isSupportedForSingleDeviceContexts = false;
|
bool isSupportedForSingleDeviceContexts = false;
|
||||||
bool isSupportedForAllContexts = false;
|
bool isSupportedForAllContexts = false;
|
||||||
if (context->getNumDevices() > 0) {
|
if (context->getNumDevices() > 0) {
|
||||||
auto &hwInfo = context->getDevices()[0]->getHardwareInfo();
|
auto &productHelper = context->getDevices()[0]->getProductHelper();
|
||||||
auto &productHelper = *ProductHelper::get(hwInfo.platform.eProductFamily);
|
|
||||||
isSupportedForSingleDeviceContexts = productHelper.isBufferPoolAllocatorSupported();
|
isSupportedForSingleDeviceContexts = productHelper.isBufferPoolAllocatorSupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -142,7 +142,7 @@ size_t HardwareCommandsHelper<GfxFamily>::sendInterfaceDescriptorData(
|
||||||
|
|
||||||
EncodeDispatchKernel<GfxFamily>::setGrfInfo(&interfaceDescriptor, kernelDescriptor.kernelAttributes.numGrfRequired,
|
EncodeDispatchKernel<GfxFamily>::setGrfInfo(&interfaceDescriptor, kernelDescriptor.kernelAttributes.numGrfRequired,
|
||||||
sizeCrossThreadData, sizePerThreadData, hardwareInfo);
|
sizeCrossThreadData, sizePerThreadData, hardwareInfo);
|
||||||
auto &productHelper = *ProductHelper::get(hardwareInfo.platform.eProductFamily);
|
auto &productHelper = device.getProductHelper();
|
||||||
productHelper.updateIddCommand(&interfaceDescriptor, kernelDescriptor.kernelAttributes.numGrfRequired,
|
productHelper.updateIddCommand(&interfaceDescriptor, kernelDescriptor.kernelAttributes.numGrfRequired,
|
||||||
kernelDescriptor.kernelAttributes.threadArbitrationPolicy);
|
kernelDescriptor.kernelAttributes.threadArbitrationPolicy);
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ Kernel::Kernel(Program *programArg, const KernelInfo &kernelInfoArg, ClDevice &c
|
||||||
imageTransformer.reset(new ImageTransformer);
|
imageTransformer.reset(new ImageTransformer);
|
||||||
auto &deviceInfo = getDevice().getDevice().getDeviceInfo();
|
auto &deviceInfo = getDevice().getDevice().getDeviceInfo();
|
||||||
if (kernelInfoArg.kernelDescriptor.kernelAttributes.simdSize == 1u) {
|
if (kernelInfoArg.kernelDescriptor.kernelAttributes.simdSize == 1u) {
|
||||||
auto &productHelper = *ProductHelper::get(getHardwareInfo().platform.eProductFamily);
|
auto &productHelper = getDevice().getProductHelper();
|
||||||
maxKernelWorkGroupSize = productHelper.getMaxThreadsForWorkgroupInDSSOrSS(getHardwareInfo(), static_cast<uint32_t>(deviceInfo.maxNumEUsPerSubSlice), static_cast<uint32_t>(deviceInfo.maxNumEUsPerDualSubSlice));
|
maxKernelWorkGroupSize = productHelper.getMaxThreadsForWorkgroupInDSSOrSS(getHardwareInfo(), static_cast<uint32_t>(deviceInfo.maxNumEUsPerSubSlice), static_cast<uint32_t>(deviceInfo.maxNumEUsPerDualSubSlice));
|
||||||
} else {
|
} else {
|
||||||
maxKernelWorkGroupSize = static_cast<uint32_t>(deviceInfo.maxWorkGroupSize);
|
maxKernelWorkGroupSize = static_cast<uint32_t>(deviceInfo.maxWorkGroupSize);
|
||||||
|
@ -1949,7 +1949,7 @@ std::unique_ptr<KernelObjsForAuxTranslation> Kernel::fillWithKernelObjsForAuxTra
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const auto &productHelper = *ProductHelper::get(getDevice().getHardwareInfo().platform.eProductFamily);
|
const auto &productHelper = getDevice().getProductHelper();
|
||||||
if (productHelper.allowStatelessCompression(getDevice().getHardwareInfo())) {
|
if (productHelper.allowStatelessCompression(getDevice().getHardwareInfo())) {
|
||||||
for (auto gfxAllocation : kernelUnifiedMemoryGfxAllocations) {
|
for (auto gfxAllocation : kernelUnifiedMemoryGfxAllocations) {
|
||||||
if (gfxAllocation->isCompressionEnabled()) {
|
if (gfxAllocation->isCompressionEnabled()) {
|
||||||
|
@ -2273,7 +2273,7 @@ bool Kernel::requiresCacheFlushCommand(const CommandQueue &commandQueue) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Kernel::updateAuxTranslationRequired() {
|
void Kernel::updateAuxTranslationRequired() {
|
||||||
const auto &productHelper = *ProductHelper::get(getDevice().getHardwareInfo().platform.eProductFamily);
|
const auto &productHelper = getDevice().getProductHelper();
|
||||||
if (productHelper.allowStatelessCompression(getDevice().getHardwareInfo())) {
|
if (productHelper.allowStatelessCompression(getDevice().getHardwareInfo())) {
|
||||||
if (hasDirectStatelessAccessToHostMemory() ||
|
if (hasDirectStatelessAccessToHostMemory() ||
|
||||||
hasIndirectStatelessAccessToHostMemory() ||
|
hasIndirectStatelessAccessToHostMemory() ||
|
||||||
|
|
|
@ -182,7 +182,7 @@ bool inline copyHostPointer(Buffer *buffer,
|
||||||
auto context = buffer->getContext();
|
auto context = buffer->getContext();
|
||||||
auto &device = context->getDevice(0u)->getDevice();
|
auto &device = context->getDevice(0u)->getDevice();
|
||||||
auto &hwInfo = device.getHardwareInfo();
|
auto &hwInfo = device.getHardwareInfo();
|
||||||
auto productHelper = ProductHelper::get(hwInfo.platform.eProductFamily);
|
auto &productHelper = device.getProductHelper();
|
||||||
|
|
||||||
auto &osInterface = device.getRootDeviceEnvironment().osInterface;
|
auto &osInterface = device.getRootDeviceEnvironment().osInterface;
|
||||||
bool isLockable = true;
|
bool isLockable = true;
|
||||||
|
@ -193,7 +193,7 @@ bool inline copyHostPointer(Buffer *buffer,
|
||||||
bool copyOnCpuAllowed = implicitScalingEnabled == false &&
|
bool copyOnCpuAllowed = implicitScalingEnabled == false &&
|
||||||
size <= Buffer::maxBufferSizeForCopyOnCpu &&
|
size <= Buffer::maxBufferSizeForCopyOnCpu &&
|
||||||
isCompressionEnabled == false &&
|
isCompressionEnabled == false &&
|
||||||
productHelper->getLocalMemoryAccessMode(hwInfo) != LocalMemoryAccessMode::CpuAccessDisallowed &&
|
productHelper.getLocalMemoryAccessMode(hwInfo) != LocalMemoryAccessMode::CpuAccessDisallowed &&
|
||||||
isLockable;
|
isLockable;
|
||||||
if (DebugManager.flags.CopyHostPtrOnCpu.get() != -1) {
|
if (DebugManager.flags.CopyHostPtrOnCpu.get() != -1) {
|
||||||
copyOnCpuAllowed = DebugManager.flags.CopyHostPtrOnCpu.get() == 1;
|
copyOnCpuAllowed = DebugManager.flags.CopyHostPtrOnCpu.get() == 1;
|
||||||
|
@ -206,7 +206,7 @@ bool inline copyHostPointer(Buffer *buffer,
|
||||||
} else {
|
} else {
|
||||||
auto blitMemoryToAllocationResult = BlitOperationResult::Unsupported;
|
auto blitMemoryToAllocationResult = BlitOperationResult::Unsupported;
|
||||||
|
|
||||||
if (productHelper->isBlitterFullySupported(hwInfo) && isLocalMemory) {
|
if (productHelper.isBlitterFullySupported(hwInfo) && isLocalMemory) {
|
||||||
blitMemoryToAllocationResult = BlitHelperFunctions::blitMemoryToAllocation(device, memory, buffer->getOffset(), hostPtr, {size, 1, 1});
|
blitMemoryToAllocationResult = BlitHelperFunctions::blitMemoryToAllocation(device, memory, buffer->getOffset(), hostPtr, {size, 1, 1});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ void PrintfHandler::prepareDispatch(const MultiDispatchInfo &multiDispatchInfo)
|
||||||
printfSurface = device.getMemoryManager()->allocateGraphicsMemoryWithProperties({rootDeviceIndex, printfSurfaceSize, AllocationType::PRINTF_SURFACE, device.getDeviceBitfield()});
|
printfSurface = device.getMemoryManager()->allocateGraphicsMemoryWithProperties({rootDeviceIndex, printfSurfaceSize, AllocationType::PRINTF_SURFACE, device.getDeviceBitfield()});
|
||||||
|
|
||||||
auto &hwInfo = device.getHardwareInfo();
|
auto &hwInfo = device.getHardwareInfo();
|
||||||
const auto &productHelper = *ProductHelper::get(hwInfo.platform.eProductFamily);
|
const auto &productHelper = device.getProductHelper();
|
||||||
|
|
||||||
MemoryTransferHelper::transferMemoryToAllocation(productHelper.isBlitCopyRequiredForLocalMemory(hwInfo, *printfSurface),
|
MemoryTransferHelper::transferMemoryToAllocation(productHelper.isBlitCopyRequiredForLocalMemory(hwInfo, *printfSurface),
|
||||||
device, printfSurface, 0, printfSurfaceInitialDataSizePtr.get(),
|
device, printfSurface, 0, printfSurfaceInitialDataSizePtr.get(),
|
||||||
|
@ -80,7 +80,7 @@ bool PrintfHandler::printEnqueueOutput() {
|
||||||
auto &hwInfo = device.getHardwareInfo();
|
auto &hwInfo = device.getHardwareInfo();
|
||||||
|
|
||||||
auto usesStringMap = kernel->getDescriptor().kernelAttributes.usesStringMap();
|
auto usesStringMap = kernel->getDescriptor().kernelAttributes.usesStringMap();
|
||||||
const auto &productHelper = *ProductHelper::get(hwInfo.platform.eProductFamily);
|
const auto &productHelper = device.getProductHelper();
|
||||||
auto printfOutputBuffer = reinterpret_cast<const uint8_t *>(printfSurface->getUnderlyingBuffer());
|
auto printfOutputBuffer = reinterpret_cast<const uint8_t *>(printfSurface->getUnderlyingBuffer());
|
||||||
auto printfOutputSize = static_cast<uint32_t>(printfSurface->getUnderlyingBufferSize());
|
auto printfOutputSize = static_cast<uint32_t>(printfSurface->getUnderlyingBufferSize());
|
||||||
std::unique_ptr<uint8_t[]> printfOutputDecompressed;
|
std::unique_ptr<uint8_t[]> printfOutputDecompressed;
|
||||||
|
|
|
@ -144,7 +144,7 @@ cl_int Program::linkBinary(Device *pDevice, const void *constantsInitData, size_
|
||||||
auto &kernHeapInfo = kernelInfo->heapInfo;
|
auto &kernHeapInfo = kernelInfo->heapInfo;
|
||||||
auto segmentId = &kernelInfo - &kernelInfoArray[0];
|
auto segmentId = &kernelInfo - &kernelInfoArray[0];
|
||||||
auto &hwInfo = pDevice->getHardwareInfo();
|
auto &hwInfo = pDevice->getHardwareInfo();
|
||||||
const auto &productHelper = *ProductHelper::get(hwInfo.platform.eProductFamily);
|
const auto &productHelper = pDevice->getProductHelper();
|
||||||
MemoryTransferHelper::transferMemoryToAllocation(productHelper.isBlitCopyRequiredForLocalMemory(hwInfo, *kernelInfo->getGraphicsAllocation()),
|
MemoryTransferHelper::transferMemoryToAllocation(productHelper.isBlitCopyRequiredForLocalMemory(hwInfo, *kernelInfo->getGraphicsAllocation()),
|
||||||
*pDevice, kernelInfo->getGraphicsAllocation(), 0, isaSegmentsForPatching[segmentId].hostPointer,
|
*pDevice, kernelInfo->getGraphicsAllocation(), 0, isaSegmentsForPatching[segmentId].hostPointer,
|
||||||
static_cast<size_t>(kernHeapInfo.KernelHeapSize));
|
static_cast<size_t>(kernHeapInfo.KernelHeapSize));
|
||||||
|
|
|
@ -84,7 +84,7 @@ std::string Program::getInternalOptions() const {
|
||||||
CompilerOptions::concatenateAppend(internalOptions, CompilerOptions::hasBufferOffsetArg);
|
CompilerOptions::concatenateAppend(internalOptions, CompilerOptions::hasBufferOffsetArg);
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto &productHelper = *ProductHelper::get(hwInfo.platform.eProductFamily);
|
const auto &productHelper = pClDevice->getProductHelper();
|
||||||
if (productHelper.isForceEmuInt32DivRemSPWARequired(hwInfo)) {
|
if (productHelper.isForceEmuInt32DivRemSPWARequired(hwInfo)) {
|
||||||
CompilerOptions::concatenateAppend(internalOptions, CompilerOptions::forceEmuInt32DivRemSP);
|
CompilerOptions::concatenateAppend(internalOptions, CompilerOptions::forceEmuInt32DivRemSP);
|
||||||
}
|
}
|
||||||
|
|
|
@ -122,7 +122,7 @@ Image *D3DTexture<D3D>::create2d(Context *context, D3DTexture2d *d3dTexture, cl_
|
||||||
}
|
}
|
||||||
|
|
||||||
if (alloc->getDefaultGmm()->unifiedAuxTranslationCapable()) {
|
if (alloc->getDefaultGmm()->unifiedAuxTranslationCapable()) {
|
||||||
const auto &productHelper = *ProductHelper::get(hwInfo->platform.eProductFamily);
|
const auto &productHelper = rootDeviceEnvironment.getHelper<ProductHelper>();
|
||||||
alloc->getDefaultGmm()->isCompressionEnabled = productHelper.isPageTableManagerSupported(*hwInfo) ? memoryManager->mapAuxGpuVA(alloc)
|
alloc->getDefaultGmm()->isCompressionEnabled = productHelper.isPageTableManagerSupported(*hwInfo) ? memoryManager->mapAuxGpuVA(alloc)
|
||||||
: true;
|
: true;
|
||||||
}
|
}
|
||||||
|
@ -211,7 +211,7 @@ Image *D3DTexture<D3D>::create3d(Context *context, D3DTexture3d *d3dTexture, cl_
|
||||||
imgInfo.surfaceFormat = &clSurfaceFormat->surfaceFormat;
|
imgInfo.surfaceFormat = &clSurfaceFormat->surfaceFormat;
|
||||||
|
|
||||||
if (alloc->getDefaultGmm()->unifiedAuxTranslationCapable()) {
|
if (alloc->getDefaultGmm()->unifiedAuxTranslationCapable()) {
|
||||||
const auto &productHelper = *ProductHelper::get(hwInfo->platform.eProductFamily);
|
const auto &productHelper = rootDeviceEnvironment.getHelper<ProductHelper>();
|
||||||
alloc->getDefaultGmm()->isCompressionEnabled = productHelper.isPageTableManagerSupported(*hwInfo) ? memoryManager->mapAuxGpuVA(alloc)
|
alloc->getDefaultGmm()->isCompressionEnabled = productHelper.isPageTableManagerSupported(*hwInfo) ? memoryManager->mapAuxGpuVA(alloc)
|
||||||
: true;
|
: true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -151,7 +151,7 @@ Image *GlTexture::createSharedGlTexture(Context *context, cl_mem_flags flags, cl
|
||||||
|
|
||||||
if (texInfo.isAuxEnabled && alloc->getDefaultGmm()->unifiedAuxTranslationCapable()) {
|
if (texInfo.isAuxEnabled && alloc->getDefaultGmm()->unifiedAuxTranslationCapable()) {
|
||||||
const auto &hwInfo = context->getDevice(0)->getHardwareInfo();
|
const auto &hwInfo = context->getDevice(0)->getHardwareInfo();
|
||||||
const auto &productHelper = *ProductHelper::get(hwInfo.platform.eProductFamily);
|
const auto &productHelper = context->getDevice(0)->getProductHelper();
|
||||||
alloc->getDefaultGmm()->isCompressionEnabled = productHelper.isPageTableManagerSupported(hwInfo) ? memoryManager->mapAuxGpuVA(alloc)
|
alloc->getDefaultGmm()->isCompressionEnabled = productHelper.isPageTableManagerSupported(hwInfo) ? memoryManager->mapAuxGpuVA(alloc)
|
||||||
: true;
|
: true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ Image *UnifiedImage::createSharedUnifiedImage(Context *context, cl_mem_flags fla
|
||||||
auto &memoryManager = *context->getMemoryManager();
|
auto &memoryManager = *context->getMemoryManager();
|
||||||
if (graphicsAllocation->getDefaultGmm()->unifiedAuxTranslationCapable()) {
|
if (graphicsAllocation->getDefaultGmm()->unifiedAuxTranslationCapable()) {
|
||||||
const auto &hwInfo = context->getDevice(0)->getHardwareInfo();
|
const auto &hwInfo = context->getDevice(0)->getHardwareInfo();
|
||||||
const auto &productHelper = *ProductHelper::get(hwInfo.platform.eProductFamily);
|
const auto &productHelper = context->getDevice(0)->getProductHelper();
|
||||||
graphicsAllocation->getDefaultGmm()->isCompressionEnabled = productHelper.isPageTableManagerSupported(hwInfo) ? memoryManager.mapAuxGpuVA(graphicsAllocation) : true;
|
graphicsAllocation->getDefaultGmm()->isCompressionEnabled = productHelper.isPageTableManagerSupported(hwInfo) ? memoryManager.mapAuxGpuVA(graphicsAllocation) : true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ class ProductHelper {
|
||||||
virtual uint32_t getMaxThreadsForWorkgroup(const HardwareInfo &hwInfo, uint32_t maxNumEUsPerSubSlice) const = 0;
|
virtual uint32_t getMaxThreadsForWorkgroup(const HardwareInfo &hwInfo, uint32_t maxNumEUsPerSubSlice) const = 0;
|
||||||
virtual void setForceNonCoherent(void *const commandPtr, const StateComputeModeProperties &properties) = 0;
|
virtual void setForceNonCoherent(void *const commandPtr, const StateComputeModeProperties &properties) = 0;
|
||||||
virtual void updateScmCommand(void *const commandPtr, const StateComputeModeProperties &properties) = 0;
|
virtual void updateScmCommand(void *const commandPtr, const StateComputeModeProperties &properties) = 0;
|
||||||
virtual void updateIddCommand(void *const commandPtr, uint32_t numGrf, int32_t threadArbitrationPolicy) = 0;
|
virtual void updateIddCommand(void *const commandPtr, uint32_t numGrf, int32_t threadArbitrationPolicy) const = 0;
|
||||||
virtual bool obtainBlitterPreference(const HardwareInfo &hwInfo) const = 0;
|
virtual bool obtainBlitterPreference(const HardwareInfo &hwInfo) const = 0;
|
||||||
virtual bool isBlitterFullySupported(const HardwareInfo &hwInfo) const = 0;
|
virtual bool isBlitterFullySupported(const HardwareInfo &hwInfo) const = 0;
|
||||||
virtual bool isPageTableManagerSupported(const HardwareInfo &hwInfo) const = 0;
|
virtual bool isPageTableManagerSupported(const HardwareInfo &hwInfo) const = 0;
|
||||||
|
@ -222,7 +222,7 @@ class ProductHelperHw : public ProductHelper {
|
||||||
uint32_t getMaxThreadsForWorkgroup(const HardwareInfo &hwInfo, uint32_t maxNumEUsPerSubSlice) const override;
|
uint32_t getMaxThreadsForWorkgroup(const HardwareInfo &hwInfo, uint32_t maxNumEUsPerSubSlice) const override;
|
||||||
void setForceNonCoherent(void *const commandPtr, const StateComputeModeProperties &properties) override;
|
void setForceNonCoherent(void *const commandPtr, const StateComputeModeProperties &properties) override;
|
||||||
void updateScmCommand(void *const commandPtr, const StateComputeModeProperties &properties) override;
|
void updateScmCommand(void *const commandPtr, const StateComputeModeProperties &properties) override;
|
||||||
void updateIddCommand(void *const commandPtr, uint32_t numGrf, int32_t threadArbitrationPolicy) override;
|
void updateIddCommand(void *const commandPtr, uint32_t numGrf, int32_t threadArbitrationPolicy) const override;
|
||||||
bool obtainBlitterPreference(const HardwareInfo &hwInfo) const override;
|
bool obtainBlitterPreference(const HardwareInfo &hwInfo) const override;
|
||||||
bool isBlitterFullySupported(const HardwareInfo &hwInfo) const override;
|
bool isBlitterFullySupported(const HardwareInfo &hwInfo) const override;
|
||||||
bool isPageTableManagerSupported(const HardwareInfo &hwInfo) const override;
|
bool isPageTableManagerSupported(const HardwareInfo &hwInfo) const override;
|
||||||
|
|
|
@ -177,7 +177,7 @@ template <PRODUCT_FAMILY gfxProduct>
|
||||||
void ProductHelperHw<gfxProduct>::updateScmCommand(void *const commandPtr, const StateComputeModeProperties &properties) {}
|
void ProductHelperHw<gfxProduct>::updateScmCommand(void *const commandPtr, const StateComputeModeProperties &properties) {}
|
||||||
|
|
||||||
template <PRODUCT_FAMILY gfxProduct>
|
template <PRODUCT_FAMILY gfxProduct>
|
||||||
void ProductHelperHw<gfxProduct>::updateIddCommand(void *const commandPtr, uint32_t numGrf, int32_t threadArbitrationPolicy) {}
|
void ProductHelperHw<gfxProduct>::updateIddCommand(void *const commandPtr, uint32_t numGrf, int32_t threadArbitrationPolicy) const {}
|
||||||
|
|
||||||
template <PRODUCT_FAMILY gfxProduct>
|
template <PRODUCT_FAMILY gfxProduct>
|
||||||
bool ProductHelperHw<gfxProduct>::isPageTableManagerSupported(const HardwareInfo &hwInfo) const {
|
bool ProductHelperHw<gfxProduct>::isPageTableManagerSupported(const HardwareInfo &hwInfo) const {
|
||||||
|
|
|
@ -348,7 +348,7 @@ void ProductHelperHw<IGFX_UNKNOWN>::updateScmCommand(void *const commandPtr, con
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
void ProductHelperHw<IGFX_UNKNOWN>::updateIddCommand(void *const commandPtr, uint32_t numGrf, int32_t threadArbitrationPolicy) {
|
void ProductHelperHw<IGFX_UNKNOWN>::updateIddCommand(void *const commandPtr, uint32_t numGrf, int32_t threadArbitrationPolicy) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
|
|
Loading…
Reference in New Issue