Remove TSP atomic dependency tracking

This reverts commit d17668f023bee409ee68e766bbc7d5f16ce8d52b.

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2021-06-23 10:34:31 +00:00
committed by Compute-Runtime-Automation
parent 13b9f54c7d
commit e1f42c2ae1
24 changed files with 58 additions and 459 deletions

View File

@@ -40,9 +40,7 @@ void TagNodeBase::returnTag() {
}
bool TagNodeBase::canBeReleased() const {
return (!doNotReleaseNodes) &&
(isCompleted()) &&
(getImplicitGpuDependenciesCount() == getImplicitCpuDependenciesCount());
return !doNotReleaseNodes;
}
} // namespace NEO

View File

@@ -54,21 +54,15 @@ class TagNodeBase : public NonCopyableOrMovableClass {
bool isProfilingCapable() const { return profilingCapable; }
void incImplicitCpuDependenciesCount() { implicitCpuDependenciesCount++; }
uint32_t getImplicitCpuDependenciesCount() const { return implicitCpuDependenciesCount.load(); }
const TagAllocatorBase *getAllocator() const { return allocator; }
// TagType specific calls
virtual bool isCompleted() const = 0;
virtual void assignDataToAllTimestamps(uint32_t packetIndex, void *source) = 0;
virtual size_t getGlobalStartOffset() const = 0;
virtual size_t getContextStartOffset() const = 0;
virtual size_t getContextEndOffset() const = 0;
virtual size_t getGlobalEndOffset() const = 0;
virtual size_t getImplicitGpuDependenciesCountOffset() const = 0;
virtual uint64_t getContextStartValue(uint32_t packetIndex) const = 0;
virtual uint64_t getGlobalStartValue(uint32_t packetIndex) const = 0;
@@ -83,8 +77,6 @@ class TagNodeBase : public NonCopyableOrMovableClass {
virtual size_t getSinglePacketSize() const = 0;
virtual uint32_t getImplicitGpuDependenciesCount() const = 0;
virtual MetricsLibraryApi::QueryHandle_1_0 &getQueryHandleRef() const = 0;
protected:
@@ -95,7 +87,6 @@ class TagNodeBase : public NonCopyableOrMovableClass {
MultiGraphicsAllocation *gfxAllocation = nullptr;
uint64_t gpuAddress = 0;
std::atomic<uint32_t> refCount{0};
std::atomic<uint32_t> implicitCpuDependenciesCount{0};
bool doNotReleaseNodes = false;
bool profilingCapable = true;
@@ -113,7 +104,6 @@ class TagNode : public TagNodeBase, public IDNode<TagNode<TagType>> {
void initialize() override {
tagForCpuAccess->initialize();
implicitCpuDependenciesCount.store(0);
setProfilingCapable(true);
}
@@ -121,13 +111,10 @@ class TagNode : public TagNodeBase, public IDNode<TagNode<TagType>> {
void assignDataToAllTimestamps(uint32_t packetIndex, void *source) override;
bool isCompleted() const override;
size_t getGlobalStartOffset() const override;
size_t getContextStartOffset() const override;
size_t getContextEndOffset() const override;
size_t getGlobalEndOffset() const override;
size_t getImplicitGpuDependenciesCountOffset() const override;
uint64_t getContextStartValue(uint32_t packetIndex) const override;
uint64_t getGlobalStartValue(uint32_t packetIndex) const override;
@@ -142,8 +129,6 @@ class TagNode : public TagNodeBase, public IDNode<TagNode<TagType>> {
size_t getSinglePacketSize() const override;
uint32_t getImplicitGpuDependenciesCount() const override;
MetricsLibraryApi::QueryHandle_1_0 &getQueryHandleRef() const override;
};

View File

@@ -164,15 +164,6 @@ size_t TagNode<TagType>::getGlobalEndOffset() const {
}
}
template <typename TagType>
size_t TagNode<TagType>::getImplicitGpuDependenciesCountOffset() const {
if constexpr (TagType::getTagNodeType() == TagNodeType::TimestampPacket) {
return tagForCpuAccess->getImplicitGpuDependenciesCountOffset();
} else {
UNRECOVERABLE_IF(true);
}
}
template <typename TagType>
uint64_t TagNode<TagType>::getContextStartValue(uint32_t packetIndex) const {
if constexpr (TagType::getTagNodeType() != TagNodeType::HwPerfCounter) {
@@ -250,15 +241,6 @@ uint32_t TagNode<TagType>::getPacketsUsed() const {
}
}
template <typename TagType>
uint32_t TagNode<TagType>::getImplicitGpuDependenciesCount() const {
if constexpr (TagType::getTagNodeType() == TagNodeType::TimestampPacket) {
return tagForCpuAccess->getImplicitGpuDependenciesCount();
} else {
return 0;
}
}
template <typename TagType>
size_t TagNode<TagType>::getSinglePacketSize() const {
if constexpr (TagType::getTagNodeType() == TagNodeType::TimestampPacket) {
@@ -279,15 +261,6 @@ void TagNode<TagType>::assignDataToAllTimestamps(uint32_t packetIndex, void *sou
}
}
template <typename TagType>
bool TagNode<TagType>::isCompleted() const {
if constexpr (TagType::getTagNodeType() == TagNodeType::TimestampPacket) {
return tagForCpuAccess->isCompleted();
} else {
return true;
}
}
template <typename TagType>
MetricsLibraryApi::QueryHandle_1_0 &TagNode<TagType>::getQueryHandleRef() const {
if constexpr (TagType::getTagNodeType() == TagNodeType::HwPerfCounter) {