mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
refactor: pass additional flag to getDefaultCopyOffloadMode method
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
b9db012ae7
commit
efbf505744
@@ -273,7 +273,7 @@ void CommandListImp::enableCopyOperationOffload() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->copyOffloadMode = device->getL0GfxCoreHelper().getDefaultCopyOffloadMode();
|
this->copyOffloadMode = device->getL0GfxCoreHelper().getDefaultCopyOffloadMode(device->getProductHelper().useAdditionalBlitProperties());
|
||||||
|
|
||||||
if (this->copyOffloadMode != CopyOffloadModes::dualStream || !isImmediateType()) {
|
if (this->copyOffloadMode != CopyOffloadModes::dualStream || !isImmediateType()) {
|
||||||
// No need to create internal bcs queue
|
// No need to create internal bcs queue
|
||||||
|
|||||||
@@ -268,7 +268,10 @@ ze_result_t DeviceImp::createCommandList(const ze_command_list_desc_t *desc,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool copyOffloadAllowed = cmdList->isInOrderExecutionEnabled() && !getProductHelper().isDcFlushAllowed() && (getL0GfxCoreHelper().getDefaultCopyOffloadMode() != CopyOffloadModes::dualStream);
|
auto &productHelper = getProductHelper();
|
||||||
|
|
||||||
|
const bool copyOffloadAllowed = cmdList->isInOrderExecutionEnabled() && !productHelper.isDcFlushAllowed() &&
|
||||||
|
(getL0GfxCoreHelper().getDefaultCopyOffloadMode(productHelper.useAdditionalBlitProperties()) != CopyOffloadModes::dualStream);
|
||||||
|
|
||||||
if (copyOffloadHint && copyOffloadAllowed) {
|
if (copyOffloadHint && copyOffloadAllowed) {
|
||||||
cmdList->enableCopyOperationOffload();
|
cmdList->enableCopyOperationOffload();
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ class L0GfxCoreHelper : public NEO::ApiGfxCoreHelper {
|
|||||||
virtual std::unique_ptr<NEO::TagAllocatorBase> getInOrderTimestampAllocator(const RootDeviceIndicesContainer &rootDeviceIndices, NEO::MemoryManager *memoryManager, size_t initialTagCount, size_t packetsCountPerElement, size_t tagAlignment,
|
virtual std::unique_ptr<NEO::TagAllocatorBase> getInOrderTimestampAllocator(const RootDeviceIndicesContainer &rootDeviceIndices, NEO::MemoryManager *memoryManager, size_t initialTagCount, size_t packetsCountPerElement, size_t tagAlignment,
|
||||||
NEO::DeviceBitfield deviceBitfield) const = 0;
|
NEO::DeviceBitfield deviceBitfield) const = 0;
|
||||||
virtual uint64_t getOaTimestampValidBits() const = 0;
|
virtual uint64_t getOaTimestampValidBits() const = 0;
|
||||||
virtual CopyOffloadMode getDefaultCopyOffloadMode() const = 0;
|
virtual CopyOffloadMode getDefaultCopyOffloadMode(bool additionalBlitPropertiesSupported) const = 0;
|
||||||
virtual bool isDefaultCmdListWithCopyOffloadSupported() const = 0;
|
virtual bool isDefaultCmdListWithCopyOffloadSupported() const = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -172,7 +172,7 @@ class L0GfxCoreHelperHw : public L0GfxCoreHelper {
|
|||||||
std::unique_ptr<NEO::TagAllocatorBase> getInOrderTimestampAllocator(const RootDeviceIndicesContainer &rootDeviceIndices, NEO::MemoryManager *memoryManager, size_t initialTagCount, size_t packetsCountPerElement, size_t tagAlignment,
|
std::unique_ptr<NEO::TagAllocatorBase> getInOrderTimestampAllocator(const RootDeviceIndicesContainer &rootDeviceIndices, NEO::MemoryManager *memoryManager, size_t initialTagCount, size_t packetsCountPerElement, size_t tagAlignment,
|
||||||
NEO::DeviceBitfield deviceBitfield) const override;
|
NEO::DeviceBitfield deviceBitfield) const override;
|
||||||
uint64_t getOaTimestampValidBits() const override;
|
uint64_t getOaTimestampValidBits() const override;
|
||||||
CopyOffloadMode getDefaultCopyOffloadMode() const override;
|
CopyOffloadMode getDefaultCopyOffloadMode(bool additionalBlitPropertiesSupported) const override;
|
||||||
bool isDefaultCmdListWithCopyOffloadSupported() const override;
|
bool isDefaultCmdListWithCopyOffloadSupported() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ bool L0GfxCoreHelperHw<Family>::threadResumeRequiresUnlock() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename Family>
|
template <typename Family>
|
||||||
CopyOffloadMode L0GfxCoreHelperHw<Family>::getDefaultCopyOffloadMode() const {
|
CopyOffloadMode L0GfxCoreHelperHw<Family>::getDefaultCopyOffloadMode(bool additionalBlitPropertiesSupported) const {
|
||||||
if (NEO::debugManager.flags.OverrideCopyOffloadMode.get() != -1) {
|
if (NEO::debugManager.flags.OverrideCopyOffloadMode.get() != -1) {
|
||||||
return static_cast<CopyOffloadMode>(NEO::debugManager.flags.OverrideCopyOffloadMode.get());
|
return static_cast<CopyOffloadMode>(NEO::debugManager.flags.OverrideCopyOffloadMode.get());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user