performance: Flush constant cache only if any ULLS enabled

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2023-07-17 12:46:07 +00:00
committed by Compute-Runtime-Automation
parent 461ecc9b3b
commit 2407658376
4 changed files with 12 additions and 3 deletions

View File

@@ -875,6 +875,15 @@ void Device::stopDirectSubmission() {
}
}
bool Device::isAnyDirectSubmissionEnabled() {
bool enabled = false;
for (auto &engine : allEngines) {
auto csr = engine.commandStreamReceiver;
enabled |= csr->isAnyDirectSubmissionEnabled();
}
return enabled;
}
void Device::allocateRTDispatchGlobals(uint32_t maxBvhLevels) {
UNRECOVERABLE_IF(rtDispatchGlobalsInfos.size() < maxBvhLevels + 1);
UNRECOVERABLE_IF(rtDispatchGlobalsInfos[maxBvhLevels] != nullptr);

View File

@@ -167,6 +167,7 @@ class Device : public ReferenceTrackedObject<Device> {
uint32_t getNumberOfRegularContextsPerEngine() const { return numberOfRegularContextsPerEngine; }
bool isMultiRegularContextSelectionAllowed(aub_stream::EngineType engineType, EngineUsage engineUsage) const;
MOCKABLE_VIRTUAL void stopDirectSubmission();
bool isAnyDirectSubmissionEnabled();
bool isStateSipRequired() const {
return getPreemptionMode() == PreemptionMode::MidThread || getDebugger() != nullptr;
}