performance: share inter-module ISA allocations

Related-To: NEO-10258

Currently each module has it's own GA
for kernel ISA's. This change allows new modules to
reuse existing allocation.

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
Szymon Morek
2024-04-29 17:12:50 +00:00
committed by Compute-Runtime-Automation
parent 349a86a8dc
commit 10ed479b16
14 changed files with 414 additions and 35 deletions

View File

@@ -38,7 +38,7 @@ extern CommandStreamReceiver *createCommandStream(ExecutionEnvironment &executio
const DeviceBitfield deviceBitfield);
Device::Device(ExecutionEnvironment *executionEnvironment, const uint32_t rootDeviceIndex)
: executionEnvironment(executionEnvironment), rootDeviceIndex(rootDeviceIndex) {
: executionEnvironment(executionEnvironment), rootDeviceIndex(rootDeviceIndex), isaPoolAllocator(this) {
this->executionEnvironment->incRefInternal();
this->executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->setDummyBlitProperties(rootDeviceIndex);
@@ -69,7 +69,7 @@ Device::~Device() {
subdevices.clear();
syncBufferHandler.reset();
isaPoolAllocator.releasePools();
executionEnvironment->memoryManager->releaseSecondaryOsContexts(this->getRootDeviceIndex());
commandStreamReceivers.clear();
executionEnvironment->memoryManager->waitForDeletions();

View File

@@ -14,6 +14,7 @@
#include "shared/source/helpers/options.h"
#include "shared/source/os_interface/performance_counters.h"
#include "shared/source/os_interface/product_helper.h"
#include "shared/source/utilities/isa_pool_allocator.h"
#include "shared/source/utilities/reference_tracked_object.h"
#include <array>
@@ -180,7 +181,9 @@ class Device : public ReferenceTrackedObject<Device> {
const ProductHelper &getProductHelper() const;
const CompilerProductHelper &getCompilerProductHelper() const;
ReleaseHelper *getReleaseHelper() const;
ISAPoolAllocator &getIsaPoolAllocator() {
return isaPoolAllocator;
}
uint32_t getNumberOfRegularContextsPerEngine() const { return numberOfRegularContextsPerEngine; }
bool isMultiRegularContextSelectionAllowed(aub_stream::EngineType engineType, EngineUsage engineUsage) const;
MOCKABLE_VIRTUAL void stopDirectSubmissionAndWaitForCompletion();
@@ -270,6 +273,8 @@ class Device : public ReferenceTrackedObject<Device> {
GraphicsAllocation *rtMemoryBackedBuffer = nullptr;
std::vector<RTDispatchGlobalsInfo *> rtDispatchGlobalsInfos;
ISAPoolAllocator isaPoolAllocator;
struct {
bool isValid = false;
std::array<uint8_t, ProductHelper::uuidSize> id;