mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
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:
committed by
Compute-Runtime-Automation
parent
349a86a8dc
commit
10ed479b16
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user