mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
refactor: improve handling of in-order atomic signaling
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
bd6925d51a
commit
51ae76a25f
@@ -187,6 +187,7 @@ class GfxCoreHelper {
|
||||
|
||||
virtual bool singleTileExecImplicitScalingRequired(bool cooperativeKernel) const = 0;
|
||||
virtual bool duplicatedInOrderCounterStorageEnabled(const RootDeviceEnvironment &rootDeviceEnvironment) const = 0;
|
||||
virtual bool inOrderAtomicSignallingEnabled(const RootDeviceEnvironment &rootDeviceEnvironment) const = 0;
|
||||
|
||||
virtual ~GfxCoreHelper() = default;
|
||||
|
||||
@@ -413,6 +414,7 @@ class GfxCoreHelperHw : public GfxCoreHelper {
|
||||
|
||||
bool singleTileExecImplicitScalingRequired(bool cooperativeKernel) const override;
|
||||
bool duplicatedInOrderCounterStorageEnabled(const RootDeviceEnvironment &rootDeviceEnvironment) const override;
|
||||
bool inOrderAtomicSignallingEnabled(const RootDeviceEnvironment &rootDeviceEnvironment) const override;
|
||||
|
||||
~GfxCoreHelperHw() override = default;
|
||||
|
||||
|
||||
@@ -761,4 +761,9 @@ bool GfxCoreHelperHw<GfxFamily>::duplicatedInOrderCounterStorageEnabled(const Ro
|
||||
return (debugManager.flags.InOrderDuplicatedCounterStorageEnabled.get() == 1);
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
bool GfxCoreHelperHw<GfxFamily>::inOrderAtomicSignallingEnabled(const RootDeviceEnvironment &rootDeviceEnvironment) const {
|
||||
return (debugManager.flags.InOrderAtomicSignallingEnabled.get() == 1);
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -19,10 +19,11 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
std::shared_ptr<InOrderExecInfo> InOrderExecInfo::create(TagNodeBase *deviceCounterNode, NEO::Device &device, uint32_t partitionCount, bool regularCmdList, bool atomicDeviceSignalling) {
|
||||
std::shared_ptr<InOrderExecInfo> InOrderExecInfo::create(TagNodeBase *deviceCounterNode, NEO::Device &device, uint32_t partitionCount, bool regularCmdList) {
|
||||
NEO::GraphicsAllocation *hostCounterAllocation = nullptr;
|
||||
|
||||
auto &gfxCoreHelper = device.getGfxCoreHelper();
|
||||
bool atomicDeviceSignalling = gfxCoreHelper.inOrderAtomicSignallingEnabled(device.getRootDeviceEnvironment());
|
||||
|
||||
if (gfxCoreHelper.duplicatedInOrderCounterStorageEnabled(device.getRootDeviceEnvironment())) {
|
||||
NEO::AllocationProperties hostAllocationProperties{device.getRootDeviceIndex(), MemoryConstants::pageSize64k, NEO::AllocationType::bufferHostMemory, device.getDeviceBitfield()};
|
||||
|
||||
@@ -48,7 +48,7 @@ class InOrderExecInfo : public NEO::NonCopyableClass {
|
||||
|
||||
InOrderExecInfo() = delete;
|
||||
|
||||
static std::shared_ptr<InOrderExecInfo> create(TagNodeBase *deviceCounterNode, NEO::Device &device, uint32_t partitionCount, bool regularCmdList, bool atomicDeviceSignalling);
|
||||
static std::shared_ptr<InOrderExecInfo> create(TagNodeBase *deviceCounterNode, NEO::Device &device, uint32_t partitionCount, bool regularCmdList);
|
||||
static std::shared_ptr<InOrderExecInfo> createFromExternalAllocation(NEO::Device &device, uint64_t deviceAddress, uint64_t *hostAddress, uint64_t counterValue);
|
||||
|
||||
InOrderExecInfo(TagNodeBase *deviceCounterNode, NEO::GraphicsAllocation *hostCounterAllocation, NEO::MemoryManager &memoryManager, uint32_t partitionCount, uint32_t rootDeviceIndex,
|
||||
|
||||
Reference in New Issue
Block a user