You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: scripts/core/PROG.rst
+31-24Lines changed: 31 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,9 +32,11 @@ Drivers
32
32
33
33
A driver object represents a collection of physical devices in the system accessed by the same Level-Zero driver.
34
34
35
-
- The application may query the number of Level-Zero drivers installed on the system, and their respective handles, using ${x}DriverGet.
36
-
- More than one driver may be available in the system. For example, one driver may support two GPUs from one vendor, another driver supports a GPU from a different vendor, and finally a different driver may support an FPGA.
37
-
- Driver objects are read-only, global constructs. i.e. Multiple calls to ${x}DriverGet will return identical driver handles.
35
+
- The application may query the number of Level-Zero drivers installed on the system, and their respective handles, using zeInitDrivers, NOTE zeDriverGet is deprecated as of v1.10 of the L0 Spec.
36
+
- zeInitDrivers replaces both zeInit and zeDriverGet as of v1.10 of the L0 Spec to both initialize the driver and query the number of drivers.
37
+
- Usage of zeInitDrivers and zeDriverGet is mutually exclusive and should not be used together. Usage of them together will result in undefined behavior.
38
+
- More than one driver may be available in the system. For example, one driver may support two GPUs from one vendor, another driver supports a GPU from a different vendor, and finally a different driver may support an NPU.
39
+
- Driver objects are read-only, global constructs. i.e. Multiple calls to zeInitDrivers with the same flags will return identical driver handles.
38
40
- A driver handle is primarily used during device discovery and during creation and management of contexts.
39
41
40
42
Device
@@ -63,40 +65,45 @@ The definition of what a root-device and a sub-device is for a specific device i
63
65
Initialization and Discovery
64
66
----------------------------
65
67
66
-
The Level-Zero API must be initialized by calling ${x}Init before calling any other API function.
67
-
This function will load all Level-Zero driver(s) in the system into memory for the current process, for use by all Host threads.
68
-
Simultaneous calls to ${x}Init are thread-safe and only one instance of each driver will be loaded.
68
+
The Level-Zero API must be initialized by calling zeInitDrivers before calling any other API function. NOTE: zeInit is deprecated as of v1.10 of the L0 Spec.
69
+
These functions will load all Level-Zero driver(s) in the system into memory for the current process, for use by all Host threads.
70
+
Simultaneous calls to zeInitDrivers are thread-safe and only one instance of each driver will be loaded.
69
71
70
-
The following pseudo-code demonstrates a basic initialization and device discovery sequence:
72
+
The following pseudo-code demonstrates a basic initialization and device discovery sequence for Core Drivers:
Copy file name to clipboardExpand all lines: scripts/core/driver.yml
+9-7Lines changed: 9 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -26,8 +26,9 @@ class: $x
26
26
name: Init
27
27
decl: static
28
28
ordinal: "0"
29
-
details:
30
-
- "The application must call this function before calling any other function."
29
+
details:
30
+
- "@deprecated since 1.10. Please use zeInitDrivers()"
31
+
- "The application must call this function or zeInitDrivers before calling any other function."
31
32
- "If this function is not called then all other functions will return $X_RESULT_ERROR_UNINITIALIZED."
32
33
- "Only one instance of each driver will be initialized per process."
33
34
- "The application may call this function multiple times with different flags or environment variables enabled."
@@ -51,6 +52,8 @@ ordinal: "0"
51
52
analogue:
52
53
- clGetPlatformIDs
53
54
details:
55
+
- "@deprecated since 1.10. Please use zeInitDrivers()"
56
+
- "Usage of zeInitDrivers and zeDriverGet is mutually exclusive and should not be used together. Usage of them together will result in undefined behavior."
54
57
- "A driver represents a collection of physical devices."
55
58
- "Multiple calls to this function will return identical driver handles, in the same order."
56
59
- "The application may pass nullptr for pDrivers when only querying the number of drivers."
@@ -111,14 +114,13 @@ version: "1.10"
111
114
decl: static
112
115
ordinal: "0"
113
116
details:
114
-
- "The application must call this function or zeInit before calling any other function."
115
-
- "The application can call InitDrivers or zeInit to init the drivers on the system."
116
-
- "Calls to zeInit or InitDrivers will not alter the drivers retrieved thru either api."
117
-
- "Drivers init thru zeInit or InitDrivers will not be reInitialized once init in an application.
117
+
- "The application must call this function or zeInit before calling any other function. (zeInit is [Deprecated] and is replaced by zeInitDrivers)"
118
+
- "Calls to zeInit[Deprecated] or InitDrivers will not alter the drivers retrieved thru either api."
119
+
- "Drivers init thru zeInit[Deprecated] or InitDrivers will not be reInitialized once init in an application.
118
120
The Loader will determine if the already init driver needs to be delivered to the user thru the init type flags."
119
121
- "Already init Drivers will not be uninitialized if the call to InitDrivers does not include that driver's type.
120
122
Those init drivers which don't match the init flags will not have their driver handles returned to the user in that InitDrivers call."
121
-
- "If this function or zeInit is not called, then all other functions will return $X_RESULT_ERROR_UNINITIALIZED."
123
+
- "If this function or zeInit[Deprecated] is not called, then all other functions will return $X_RESULT_ERROR_UNINITIALIZED."
122
124
- "Only one instance of each driver will be initialized per process."
123
125
- "A driver represents a collection of physical devices."
124
126
- "Multiple calls to this function will return identical driver handles, in the same order."
0 commit comments