mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 12:23:05 +08:00
fix: Check if provided CCS number is correct
Check if `ZEX_NUMBER_OF_CCS` env variable provided by the user is correct. If it isn't then return false and print debug message. After this change if `zeInit` is called with invalid `ZEX_NUMBER_OF_CCS`, then it fails with `ZE_RESULT_ERROR_UNINITIALIZED`. Related-To: NEO-15230, GSD-11251 Signed-off-by: Kindracki, Jakub Tomasz <jakub.tomasz.kindracki@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
f31341fe01
commit
67963bed4b
@@ -246,12 +246,19 @@ BuiltIns *RootDeviceEnvironment::getBuiltIns() {
|
||||
return this->builtins.get();
|
||||
}
|
||||
|
||||
void RootDeviceEnvironment::setNumberOfCcs(uint32_t numberOfCcs) {
|
||||
hwInfo->gtSystemInfo.CCSInfo.NumberOfCCSEnabled = std::min(hwInfo->gtSystemInfo.CCSInfo.NumberOfCCSEnabled, numberOfCcs);
|
||||
bool RootDeviceEnvironment::setNumberOfCcs(uint32_t numberOfCcs) {
|
||||
if (hwInfo->gtSystemInfo.CCSInfo.NumberOfCCSEnabled < numberOfCcs || numberOfCcs == 0) {
|
||||
NEO::printDebugString(NEO::debugManager.flags.PrintDebugMessages.get(), stderr, "Error: Invalid number of CCS - %u (max: %u)\n", numberOfCcs, hwInfo->gtSystemInfo.CCSInfo.NumberOfCCSEnabled);
|
||||
return false;
|
||||
}
|
||||
|
||||
hwInfo->gtSystemInfo.CCSInfo.NumberOfCCSEnabled = numberOfCcs;
|
||||
limitedNumberOfCcs = true;
|
||||
if (aubCenter) {
|
||||
aubCenter->getAubManager()->setCCSMode(hwInfo->gtSystemInfo.CCSInfo.NumberOfCCSEnabled);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
uint32_t RootDeviceEnvironment::getNumberOfCcs() const {
|
||||
|
||||
Reference in New Issue
Block a user