refactor: improve handling of in-order atomic signaling

Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2024-03-01 14:33:52 +00:00
committed by Compute-Runtime-Automation
parent bd6925d51a
commit 51ae76a25f
12 changed files with 46 additions and 28 deletions

View File

@@ -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;

View File

@@ -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

View File

@@ -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()};

View File

@@ -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,