mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-07 12:42:54 +08:00
Add helper function to detect if hw mode is selected
Related-To: NEO-4208 Change-Id: Iac34e9e9cea36d7ab354d7d5b5c716e8ea3a483d Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
2343cd72c3
commit
5f4f1eb55a
@@ -64,4 +64,15 @@ bool DeviceFactory::getDevicesForProductFamilyOverride(size_t &numDevices, Execu
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DeviceFactory::isHwModeSelected() {
|
||||
int32_t csr = DebugManager.flags.SetCommandStreamReceiver.get();
|
||||
switch (csr) {
|
||||
case CSR_AUB:
|
||||
case CSR_TBX:
|
||||
case CSR_TBX_WITH_AUB:
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} // namespace NEO
|
||||
|
||||
@@ -17,6 +17,7 @@ class DeviceFactory {
|
||||
static bool getDevices(size_t &numDevices, ExecutionEnvironment &executionEnvironment);
|
||||
static bool getDevicesForProductFamilyOverride(size_t &numDevices, ExecutionEnvironment &executionEnvironment);
|
||||
static void releaseDevices();
|
||||
static bool isHwModeSelected();
|
||||
|
||||
protected:
|
||||
static size_t numDevices;
|
||||
|
||||
Reference in New Issue
Block a user