-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: events deadlock detection in validation layer
Related-To: NEO-12810 Signed-off-by: Chandio, Bibrak Qamar <[email protected]>
- Loading branch information
Showing
4 changed files
with
739 additions
and
0 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
source/layers/validation/checkers/events_checker/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
target_sources(${TARGET_NAME} | ||
PRIVATE | ||
${CMAKE_CURRENT_LIST_DIR}/zel_events_checker.h | ||
${CMAKE_CURRENT_LIST_DIR}/zel_events_checker.cpp | ||
|
||
${CMAKE_SOURCE_DIR}/third_party/xla/graphcycles.cc | ||
) | ||
|
||
target_include_directories(${TARGET_NAME} | ||
PRIVATE | ||
${CMAKE_SOURCE_DIR}/third_party | ||
) |
44 changes: 44 additions & 0 deletions
44
source/layers/validation/checkers/events_checker/DESIGN.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Events Deadlock Checker Design Document | ||
This document outlines the design and implementation details of the events checker. | ||
|
||
## Introduction | ||
The Events Checker validates usage of events. | ||
- It is designed to detect potential deadlocks that might occur due to improper event usage in the Level Zero API. It prints out warning messages for user when it detects a potential deadlock. | ||
- It may also detect whether an event is being used more than once without being reset. Consider a case in which a single event is signaled from twice. | ||
|
||
## Objectives | ||
- Detect potential deadlocks caused by event usage. | ||
- Provide detailed information to help developers identify and resolve deadlock issues. | ||
|
||
## Design Overview | ||
The checker creates an internal Directed Acyclic Graph (DAG) of dependencies between API calls (the actions that are nodes in the graph) and events (the edges in the graph). It also maintains a topological sort and when an attempt is made to insert an edge that causes a cycle in the graph it warns the user of a potential deadlock and returns without inserting that edge. | ||
|
||
## API Implemented | ||
### zeEventCreate | ||
### zeEventDestroy | ||
### zeCommandListAppendMemoryCopy | ||
### zeCommandListAppendWriteGlobalTimestamp | ||
### zeCommandListAppendBarrier | ||
### zeCommandListAppendMemoryRangesBarrier | ||
### zeCommandListAppendMemoryFill | ||
### zeCommandListAppendMemoryCopyRegion | ||
### zeCommandListAppendMemoryCopyFromContext | ||
### zeCommandListAppendImageCopy | ||
### zeCommandListAppendImageCopyRegion | ||
### zeCommandListAppendImageCopyToMemory | ||
### zeCommandListAppendImageCopyFromMemory | ||
### zeCommandListAppendSignalEvent | ||
### zeCommandListAppendWaitOnEvents | ||
### zeEventHostSignal | ||
### zeCommandListAppendEventReset | ||
### zeEventHostReset | ||
### zeCommandListAppendQueryKernelTimestamp | ||
### zeCommandListAppendLaunchKernel | ||
### zeCommandListAppendLaunchCooperativeKernel | ||
### zeCommandListAppendLaunchKernelIndirect | ||
### zeCommandListAppendLaunchMultipleKernelsIndirect | ||
### zeCommandListUpdateMutableCommandSignalEventExp | ||
### zeCommandListUpdateMutableCommandWaitEventsExp | ||
### zeCommandListAppendImageCopyToMemoryExt | ||
### zeCommandListAppendImageCopyFromMemoryExt | ||
### zeCommandListImmediateAppendCommandListsExp |
Oops, something went wrong.