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
[SYCL] Repurpose SYCL_CACHE_TRACE to enable fine-grained tracing of SYCL caches (#15822)
Currently, we use SYCL_CACHE_TRACE for events in persistent cache only.
This PR repurposes SYCL_CACHE_TRACE to also enable tracing of in-memory
cache and kernel_compiler.
After this change, SYCL_CACHE_TRACE will accept the following bit-masks:
| Bit-mask | Corresponding cache tracing |
| ------ | ----------- |
| 0x01 | Enable tracing of persistent cache |
| 0x02 | Enable tracing of in-memory cache |
| 0x04 | Enable tracing of `kernel_compiler` cache |
Any valid combination of the above bit-masks can be used to
enable/disable tracing of the corresponding caches.
---------
Co-authored-by: Steffen Larsen <[email protected]>
Copy file name to clipboardExpand all lines: sycl/doc/EnvironmentVariables.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -210,7 +210,7 @@ variables in production code.</span>
210
210
|`SYCL_USE_KERNEL_SPV`| Path to the SPIR-V binary | Load device image from the specified file. If runtime is unable to read the file, `sycl::runtime_error` exception is thrown. The image is assumed to have been created using the `-fno-sycl-dead-args-optimization` option. |
211
211
|`SYCL_DUMP_IMAGES`| Any(\*) | Dump device image binaries to file. Control has no effect if `SYCL_USE_KERNEL_SPV` is set. |
212
212
|`SYCL_HOST_UNIFIED_MEMORY`| Integer | Enforce host unified memory support or lack of it for the execution graph builder. If set to 0, it is enforced as not supported by all devices. If set to 1, it is enforced as supported by all devices. |
213
-
|`SYCL_CACHE_TRACE`|Any(\*)|If the variable is set, messages are sent to std::cerr when caching events or non-blocking failures happen (e.g. unable to access cache item file). |
213
+
|`SYCL_CACHE_TRACE`|Described [below](#sycl_cache_trace-options).|Enable tracing for different SYCL and `kernel_compiler` caches. |
214
214
|`SYCL_PARALLEL_FOR_RANGE_ROUNDING_TRACE`| Any(\*) | Enables tracing of `parallel_for` invocations with rounded-up ranges. |
215
215
|`SYCL_PI_SUPPRESS_ERROR_MESSAGE`| Any(\*) | Suppress printing of error message, only used for CI in order not to interrupt errors generated by underlying toolchains; note that the variable only modifies the printing of the error message (error value, name, description and location), the handling of error return code and aborting/throwing behaviour remains unchanged. |
216
216
|`SYCL_JIT_COMPILER_DEBUG`| Any(\*) | Passes can specify their own debug types, `sycl-spec-const-materializer` enables debug output generation in specialization constants materialization pass. |
@@ -245,6 +245,17 @@ Supported tracing levels are in the table below
245
245
| 2 | Enable tracing of the UR calls |
246
246
| -1 | Enable all levels of tracing |
247
247
248
+
### `SYCL_CACHE_TRACE` Options
249
+
250
+
`SYCL_CACHE_TRACE` accepts a bit-mask to control the tracing of different SYCL caches. The input value is parsed as an integer and the following bit-masks are used to determine the tracing behavior:
251
+
| Bit-mask | Corresponding cache tracing |
252
+
| ------ | ----------- |
253
+
| 0x01 | Enable tracing of persistent cache |
254
+
| 0x02 | Enable tracing of in-memory cache |
255
+
| 0x04 | Enable tracing of `kernel_compiler` cache |
256
+
257
+
Any valid combination of the above bit-masks can be used to enable/disable tracing of the corresponding caches. If the input value is not 0 and not a valid number, the disk cache tracing will be enabled (deprecated behavior).
0 commit comments