Skip to content
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

Merged
merged 9 commits into from
Sep 17, 2021

Conversation

alexbatashev
Copy link
Contributor

@alexbatashev alexbatashev commented Sep 7, 2021

Add more details about ITT annotations implementation in SYCL runtime and update feature controls documentation.

@alexbatashev alexbatashev requested a review from a team as a code owner September 7, 2021 11:28
MrSidims
MrSidims previously approved these changes Sep 7, 2021
Copy link
Contributor

@gmlueck gmlueck left a 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.

@alexbatashev
Copy link
Contributor Author

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.

@bader bader requested a review from gmlueck September 8, 2021 18:30
bader
bader previously approved these changes Sep 8, 2021
gmlueck
gmlueck previously approved these changes Sep 8, 2021
@@ -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. |
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pvchupin @bader I propose the following: I will move this variable back to EnvironmentVariables.md, and we will keep this discussion offline. I will prepare a followup patch once we have a decision.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Thanks.

@alexbatashev alexbatashev dismissed stale reviews from gmlueck and bader via d4c1fef September 9, 2021 11:24
# 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

pvchupin
pvchupin previously approved these changes Sep 9, 2021
@@ -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. |
Copy link
Contributor

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.

MrSidims
MrSidims previously approved these changes Sep 16, 2021
@@ -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. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Thanks.

@pvchupin
Copy link
Contributor

@alexbatashev, please fill PR description with what's changed in this patch (to be used as commit message on merge).

@bader bader merged commit 9c0508b into intel:sycl Sep 17, 2021
@alexbatashev alexbatashev deleted the update_itt_docs branch September 17, 2021 10:40
alexbatashev added a commit to alexbatashev/llvm that referenced this pull request Sep 18, 2021
* 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)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants