File: DESIGN.md

package info (click to toggle)
level-zero 1.28.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,308 kB
  • sloc: cpp: 149,246; ansic: 16,655; python: 12,807; makefile: 5
file content (44 lines) | stat: -rw-r--r-- 2,180 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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