-
Notifications
You must be signed in to change notification settings - Fork 796
[Clang][Doc][NFC] Improve -offload-compress documentation and error message
#17990
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
afef6a0
Improve zstd and documentation
uditagarwal97 d498a14
Apply feedback from code reviews
uditagarwal97 79a9cb0
Apply suggestions from code review
uditagarwal97 4cf63f9
Merge remote-tracking branch 'origin/sycl' into improve_zstd_doc
uditagarwal97 6cc012c
Update no_zstd_warning.cpp
uditagarwal97 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,7 @@ and a wide range of compute accelerators such as GPU and FPGA. | |
| * [Build DPC++ toolchain with support for ARM processors](#build-dpc-toolchain-with-support-for-arm-processors) | ||
| * [Build DPC++ toolchain with support for runtime kernel fusion and JIT compilation](#build-dpc-toolchain-with-support-for-runtime-kernel-fusion-and-jit-compilation) | ||
| * [Build DPC++ toolchain with a custom Unified Runtime](#build-dpc-toolchain-with-a-custom-unified-runtime) | ||
| * [Build DPC++ toolchain with device image compression support](#build-dpc-toolchain-with-device-image-compression-support) | ||
| * [Build Doxygen documentation](#build-doxygen-documentation) | ||
| * [Deployment](#deployment) | ||
| * [Use DPC++ toolchain](#use-dpc-toolchain) | ||
|
|
@@ -47,6 +48,7 @@ and a wide range of compute accelerators such as GPU and FPGA. | |
| | [Ninja](https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages) | | | ||
| | `hwloc` | >= 2.3 (Linux only, `libhwloc-dev` or `hwloc-devel`) | | ||
| | C++ compiler | [See LLVM](https://github.com/intel/llvm/blob/sycl/llvm/docs/GettingStarted.rst#host-c-toolchain-both-compiler-and-standard-library) | | ||
| |`zstd` (optional) | >= 1.4.8 (see [ZSTD](#build-dpc-toolchain-with-device-image-compression-support)) | | ||
|
|
||
| Alternatively, you can create a Docker image that has everything you need for | ||
| building pre-installed using the [Ubuntu 24.04 build Dockerfile](https://github.com/intel/llvm/blob/sycl/devops/containers/ubuntu2404_build.Dockerfile). | ||
|
|
@@ -94,7 +96,8 @@ The easiest way to get started is to use the buildbot | |
| [compile](../../buildbot/compile.py) scripts. | ||
|
|
||
| In case you want to configure CMake manually the up-to-date reference for | ||
| variables is in these files. | ||
| variables is in these files. Note that the CMake variables set by default by the [configure.py](../../buildbot/configure.py) script are the ones commonly used by | ||
| the DPC++ developers and might not necsessarily suffice for your project-specific needs. | ||
uditagarwal97 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
uditagarwal97 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| **Linux**: | ||
|
|
||
|
|
@@ -127,6 +130,7 @@ flags can be found by launching the script with `--help`): | |
| * `-t` -> Build type (Debug or Release) | ||
| * `-o` -> Path to build directory | ||
| * `--cmake-gen` -> Set build system type (e.g. `--cmake-gen "Unix Makefiles"`) | ||
| * `--use-zstd` -> Force link zstd while building LLVM (see [ZSTD](#build-dpc-toolchain-with-device-image-compression-support)) | ||
|
|
||
| You can use the following flags with `compile.py` (full list of available flags | ||
| can be found by launching the script with `--help`): | ||
|
|
@@ -320,6 +324,34 @@ DPC++ toolchain, but add the `--disable-jit` flag. | |
| Both kernel fusion and JIT compilation of AMD and Nvidia kernels are currently | ||
| not yet supported on the Windows platform. | ||
|
|
||
| ### Build DPC++ toolchain with device image compression support | ||
|
|
||
| Device image compression enables the compression of device code (SYCL Kernels) during compilation and decompressing them on-demand at application runtime. | ||
uditagarwal97 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| This reduces the size of fat binaries for both Just-in-Time (JIT) and Ahead-of-Time (AOT) compilation. Refer to the [blog post](https://www.intel.com/content/www/us/en/developer/articles/technical/sycl-compilation-device-image-compression.html) for more details on this feature. | ||
|
|
||
| To enable device image compression, you need to build the DPC++ toolchain with the | ||
| zstd compression library. By default, zstd is optional for DPC++ builds i.e. CMake will search for zstd installation but if not found, it will not fail the build | ||
| and this feature will simply be disabled. | ||
|
|
||
| To override this behavior and force the build to use zstd, you can use the `--use-zstd` flag in the `configure.py` script. | ||
uditagarwal97 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| #### How to obtain zstd? | ||
|
|
||
| Minimum zstd version that we have tested with is *1.4.8*. | ||
|
|
||
| **Linux**: | ||
|
|
||
| You can install zstd using the package manager of your distribution. For example, on Ubuntu, you can run: | ||
| ```sh | ||
| sudo apt-get install libzstd-dev | ||
| ``` | ||
| Note that the libzstd-dev package provided on Ubuntu 24.04 has a bug and the zstd static library is not built with `-fPIC` flag. Linking to this library will result in a build failure. For example: [Issue#15935](https://github.com/intel/llvm/issues/15935). As an alternative, zstd can be built from source either manually or by using the [build_zstd_1_5_6_ub24.sh](https://github.com/intel/llvm/blob/sycl/devops/scripts/build_zstd_1_5_6_ub24.sh) script. | ||
uditagarwal97 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| **Windows** | ||
|
|
||
| For Windows, prebuilt zstd binaries can be obtained from the [facebook/zstd](https://github.com/facebook/zstd/releases/tag/v1.5.6) release page. After obtaining the zstd binaries, you can add | ||
| to the `PATH` environment variable the path to the zstd installation directory. | ||
uditagarwal97 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ### Build Doxygen documentation | ||
|
|
||
| Building Doxygen documentation is similar to building the product itself. First, | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.