Add method to check tile only context

Related-To: NEO-6043

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
Szymon Morek
2021-07-07 12:43:54 +00:00
committed by Compute-Runtime-Automation
parent 8d22247ff2
commit c8b85bb5a9
19 changed files with 85 additions and 48 deletions

View File

@@ -470,4 +470,8 @@ Platform *Context::getPlatformFromProperties(const cl_context_properties *proper
}
return nullptr;
}
bool Context::isSingleDeviceContext() {
return devices[0]->getNumAvailableDevices() == 1 && getNumDevices() == 1;
}
} // namespace NEO

View File

@@ -142,6 +142,7 @@ class Context : public BaseObject<_cl_context> {
bool getInteropUserSyncEnabled() { return interopUserSync; }
void setInteropUserSyncEnabled(bool enabled) { interopUserSync = enabled; }
bool areMultiStorageAllocationsPreferred();
bool isSingleDeviceContext();
ContextType peekContextType() const { return contextType; }