-
Notifications
You must be signed in to change notification settings - Fork 754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SYCL][Doc] Update ITT instrumentation docs #4503
Conversation
Co-authored-by: Alexey Bader <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this document really a DPC++ extension specification? It doesn't describe any API that the user can call from a DPC++ application. Is it supposed to be a design document instead? If so, maybe it should be moved outside of the "extensions" folder.
I moved the docs out of extension directory, converted it to markdown to match other design documents, added it to index page, and mentioned the env var on a special page. |
@@ -47,6 +47,7 @@ subject to change. Do not rely on these variables in production code. | |||
| `SYCL_CACHE_THRESHOLD` | Positive integer | Cache eviction threshold in days (default value is 7 for 1 week). Set to 0 for disabling time-based cache eviction. | | |||
| `SYCL_CACHE_MIN_DEVICE_IMAGE_SIZE` | Positive integer | Minimum size of device code image in bytes which is reasonable to cache on disk because disk access operation may take more time than do JIT compilation for it. Default value is 0 to cache all images. | | |||
| `SYCL_CACHE_MAX_DEVICE_IMAGE_SIZE` | Positive integer | Maximum size of device image in bytes which is cached. Too big kernels may overload disk too fast. Default value is 1 GB. | | |||
| `INTEL_ENABLE_OFFLOAD_ANNOTATIONS` | Any(\*) | Enables ITT Annotations support for SYCL runtime. This variable should only be used by tools, that support ITT Annotations. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's start splitting USER vars and special/experimental use vars and state clearly that these must not be used by end users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have created a separate file for env variables, that are not meant to be accessed by SYCL users. A separate file is needed so that we can put two distinct entries in https://intel.github.io/llvm-docs/. When this patch is merged, I plan to move rest of the debug variables from this file to the new one and move Environment Variables
item to Using oneAPI DPC++ for Application Development
section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pvchupin, I'm not sure why and how DPC++ should differentiate environment variables based on whom they are intended for "human" users or "tools". Could you clarify how do we define "end users"?
@alexbatashev, I think adding another table for environment variables intended for "tools" should resolve this comment and IMHO is better than adding a separate document.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bader,
My comment was mostly about "experimental/internal-use-only" vs. "production", rather than "tools" vs. "human".
I believe disclaimer we currently have is not working well anymore... some of these are used widely and some of these must never be used.
Separating these to different files sounds like a good idea. Would be good to split and categorize them clearly and draw the line more explicitly.
I would suggest to keep EnvironmentVariables.md (as it was referred many times in the past) and move the most of the variables to InternalEnvironmentVariables.md.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My comment was mostly about "experimental/internal-use-only" vs. "production", rather than "tools" vs. "human".
I believe disclaimer we currently have is not working well anymore... some of these are used widely and some of these must never be used.
I believe variables that "must never be used" must be removed.
I also suggest disabling by default (what I think you mean by "production") features which are "experimental/internal-use-only". There should be an option to enable those if needed, but this must be conscious action.
I don't see how moving around documentation can solve the usage problem. If feature is available, it's going to be used by someone eventually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somebody added them, so I assume there was/is "experimental" reason at least. It's probably fine to disable by default or remove some, on the other hand there could be cases where experiment can be done randomly on existing build, e.g. during triaging.
I believe there are many vars now and categorizing them properly should help to at least some extent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Thanks.
# Internal Environment Variables | ||
|
||
**Warning:** the environment variables described in this document are used for | ||
development and debugging of DPC++ compiler and runtime. Their semantics are |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
development and debugging of DPC++ compiler and runtime. Their semantics are | |
development and debugging of DPC++ compiler and runtime or for interaction with other tools. Their semantics are |
@@ -47,6 +47,7 @@ subject to change. Do not rely on these variables in production code. | |||
| `SYCL_CACHE_THRESHOLD` | Positive integer | Cache eviction threshold in days (default value is 7 for 1 week). Set to 0 for disabling time-based cache eviction. | | |||
| `SYCL_CACHE_MIN_DEVICE_IMAGE_SIZE` | Positive integer | Minimum size of device code image in bytes which is reasonable to cache on disk because disk access operation may take more time than do JIT compilation for it. Default value is 0 to cache all images. | | |||
| `SYCL_CACHE_MAX_DEVICE_IMAGE_SIZE` | Positive integer | Maximum size of device image in bytes which is cached. Too big kernels may overload disk too fast. Default value is 1 GB. | | |||
| `INTEL_ENABLE_OFFLOAD_ANNOTATIONS` | Any(\*) | Enables ITT Annotations support for SYCL runtime. This variable should only be used by tools, that support ITT Annotations. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bader,
My comment was mostly about "experimental/internal-use-only" vs. "production", rather than "tools" vs. "human".
I believe disclaimer we currently have is not working well anymore... some of these are used widely and some of these must never be used.
Separating these to different files sounds like a good idea. Would be good to split and categorize them clearly and draw the line more explicitly.
I would suggest to keep EnvironmentVariables.md (as it was referred many times in the past) and move the most of the variables to InternalEnvironmentVariables.md.
@@ -47,6 +47,7 @@ subject to change. Do not rely on these variables in production code. | |||
| `SYCL_CACHE_THRESHOLD` | Positive integer | Cache eviction threshold in days (default value is 7 for 1 week). Set to 0 for disabling time-based cache eviction. | | |||
| `SYCL_CACHE_MIN_DEVICE_IMAGE_SIZE` | Positive integer | Minimum size of device code image in bytes which is reasonable to cache on disk because disk access operation may take more time than do JIT compilation for it. Default value is 0 to cache all images. | | |||
| `SYCL_CACHE_MAX_DEVICE_IMAGE_SIZE` | Positive integer | Maximum size of device image in bytes which is cached. Too big kernels may overload disk too fast. Default value is 1 GB. | | |||
| `INTEL_ENABLE_OFFLOAD_ANNOTATIONS` | Any(\*) | Enables ITT Annotations support for SYCL runtime. This variable should only be used by tools, that support ITT Annotations. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Thanks.
@alexbatashev, please fill PR description with what's changed in this patch (to be used as commit message on merge). |
* upstream/sycl: (36 commits) [SYCL] Add SYCL2020 target::device enumeration value (intel#4587) [SYCL][Doc] Update ITT instrumentation docs (intel#4503) [SYCL][L0] Make all L0 events have device-visibility (intel#4534) [SYCL] Updated Level-Zero backend spec according to SYCL 2020 standard (intel#4560) [SYCL] Add error_code support for SYCL 1.2.1 exception classes (intel#4574) [SYCL][CI] Provide --ci-defaults option for config script (intel#4583) [CI] Switch GitHub Actions to Ubuntu 20.04 (intel#4582) [SYCL][CUDA] Fix context clearing in PiCuda tests (intel#4483) [SYCL] Hide SYCL service kernels (intel#4519) [SYCL][L0] Fix mismatched ZE call count (intel#4559) [SYCL] Remove function pointers extension (intel#4459) [GitHub Actions] Uplift clang version in post-commit validation (intel#4581) [SYCL] Ignore usm prefetch dummy flag (intel#4568) [SYCL][Group algorithms] Add group sorting algorithms implementation (intel#4439) [SYCL] Resolve name clash with a user defined symbol (intel#4570) [clang-offload-wrapper] Do not create .tgtimg section with -emit-reg-funcs=0 (intel#4577) [SYCL][FPGA] Remove deprecated attribute functionality (intel#4532) [SYCL] Remove _class aliases (intel#4465) [SYCL][CUDA][HIP] Report every device in its own platform (intel#4571) [SYCL][L0] make_device shouldn't need platform as an input (intel#4561) ...
Add more details about ITT annotations implementation in SYCL runtime and update feature controls documentation.