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: doc/loader_api.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,25 @@ This document does not cover APIs specific to individual layers (ie. tracing) or
9
9
10
10
Exposed Loader APIs will be defined in header files located in this repository at `include/loader`, and installed to `<prefix>/include/level_zero/loader`
11
11
12
+
### zelGetLoaderVersion
13
+
14
+
This API is used to retrieve the version information of the loader itself. Unlike `zelLoaderGetVersions`, this API provides a simplified interface to get only the loader's version without needing to query all components.
15
+
16
+
-__*version__ Pointer to a `zel_component_version_t` structure that will be filled with the loader's version information. Must be a valid, non-null pointer.
17
+
18
+
This function:
19
+
- Returns `ZE_RESULT_SUCCESS` on successful retrieval of the loader version
20
+
- Returns `ZE_RESULT_ERROR_INVALID_NULL_POINTER` if `version` is `nullptr`
21
+
- Returns `ZE_RESULT_ERROR_UNINITIALIZED` if the loader library cannot be found or loaded (only possible in static builds with misconfigured library paths)
22
+
- Does not require `zeInit()` or `zeInitDrivers()` to be called prior to invocation
23
+
- Works with both static and dynamic loader builds without initialization
24
+
- Is thread-safe and can be called from multiple threads
25
+
26
+
The returned `zel_component_version_t` structure contains:
27
+
-`component_name`: Set to `"loader"`
28
+
-`spec_version`: The Level Zero API specification version (`ZE_API_VERSION_CURRENT`)
29
+
-`component_lib_version`: The loader library version with `major`, `minor`, and `patch` fields
30
+
12
31
### zelLoaderGetVersions
13
32
14
33
This API is used to retreive the version information of the loader itself and of any layers that are enabled.
@@ -64,3 +83,4 @@ The function returns:
64
83
-`ZE_RESULT_ERROR_INVALID_NULL_POINTER` if the `enabled` pointer is null
65
84
66
85
This is a read-only, thread-safe operation that can be called multiple times concurrently. The tracing layer state is global to the process and reflects the current reference count maintained by `zelEnableTracingLayer` and `zelDisableTracingLayer` - the layer is considered enabled when the reference count is greater than zero.
0 commit comments