mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 07:14:10 +08:00
fix: correct global device synchronization
skip uninitialized command stream receivers Additionally, add L0 black box for kernel with arg slm Test verifies new simplified L0 API Functions: - zerDriverGetDefaultContext - zeDeviceSynchronize - zeCommandListAppendLaunchKernelWithArguments - zerIdentifierTranslateToDeviceHandle - zerDeviceTranslateToIdentifier - zerDriverGetLastErrorDescription Definitions: - defaultCommandQueueDesc - defaultHostMemDesc - defaultDeviceMemDesc Related-To: NEO-14560 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
36f10319c4
commit
df7e114d54
@@ -2247,23 +2247,27 @@ uint32_t DeviceImp::getEventMaxKernelCount() const {
|
||||
|
||||
ze_result_t DeviceImp::synchronize() {
|
||||
for (auto &engine : neoDevice->getAllEngines()) {
|
||||
auto waitStatus = engine.commandStreamReceiver->waitForTaskCountWithKmdNotifyFallback(
|
||||
engine.commandStreamReceiver->peekTaskCount(),
|
||||
engine.commandStreamReceiver->obtainCurrentFlushStamp(),
|
||||
false,
|
||||
NEO::QueueThrottle::MEDIUM);
|
||||
if (waitStatus == NEO::WaitStatus::gpuHang) {
|
||||
return ZE_RESULT_ERROR_DEVICE_LOST;
|
||||
if (engine.commandStreamReceiver->isInitialized()) {
|
||||
auto waitStatus = engine.commandStreamReceiver->waitForTaskCountWithKmdNotifyFallback(
|
||||
engine.commandStreamReceiver->peekTaskCount(),
|
||||
engine.commandStreamReceiver->obtainCurrentFlushStamp(),
|
||||
false,
|
||||
NEO::QueueThrottle::MEDIUM);
|
||||
if (waitStatus == NEO::WaitStatus::gpuHang) {
|
||||
return ZE_RESULT_ERROR_DEVICE_LOST;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (auto &secondaryCsr : neoDevice->getSecondaryCsrs()) {
|
||||
auto waitStatus = secondaryCsr->waitForTaskCountWithKmdNotifyFallback(
|
||||
secondaryCsr->peekTaskCount(),
|
||||
secondaryCsr->obtainCurrentFlushStamp(),
|
||||
false,
|
||||
NEO::QueueThrottle::MEDIUM);
|
||||
if (waitStatus == NEO::WaitStatus::gpuHang) {
|
||||
return ZE_RESULT_ERROR_DEVICE_LOST;
|
||||
if (secondaryCsr->isInitialized()) {
|
||||
auto waitStatus = secondaryCsr->waitForTaskCountWithKmdNotifyFallback(
|
||||
secondaryCsr->peekTaskCount(),
|
||||
secondaryCsr->obtainCurrentFlushStamp(),
|
||||
false,
|
||||
NEO::QueueThrottle::MEDIUM);
|
||||
if (waitStatus == NEO::WaitStatus::gpuHang) {
|
||||
return ZE_RESULT_ERROR_DEVICE_LOST;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user