Skip to content

Commit dd59886

Browse files
[SYCL] Remove fusion implemention and refactor sycl-jit library (#17929)
Removes the remaining fusion implementation and refactors the `sycl-jit` library to better capture the current use-cases: SYCL runtime compilation (RTC), and specialization constant materialization (SCM). High-level notes: - Split the entrypoints for RTC, SCM and option handling, formerly in `KernelFusion[.h|.cpp]`, into separate files - A significant amount of infrastructure became unused after removing the fusion implementation. The remaining facilities are: - CMake setup to link LLVM libraries and produce a pass plugin library - Translation from LLVM module to SPIRV and PTX/AMDGCN (loading and linking multiple SPIRV or LLVM modules was unused and removed) - `JITContext` class owning "binaries" (could be SPIRV blob or PTX/AMDGCN text). At the interface, we use `JITBinaryInfo` (fka `SYCLKernelBinaryInfo`), which is a non-owning descriptor type - Option handling - Dropped "fusion" terminology, and mostly dropped "kernel" terminology, because RTC and SCM deal with device images (runtime-side) respectively LLVM modules (jit-side). One exception is the translation helper, which optionally takes a kernel name, which is in turned used by the PTX/AMDGCN translation to obtain target attributes from the corresponding kernel function. - The `sycl-jit-common` library (in `sycl-jit/common` directory) was removed because it became header-only and the headers were no longer used by the pass library (so could be moved to `sycl-jit/jit-compiler/include`) --------- Signed-off-by: Julian Oppermann <[email protected]> Co-authored-by: Steffen Larsen <[email protected]>
1 parent e1f523c commit dd59886

File tree

114 files changed

+1270
-17099
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+1270
-17099
lines changed

sycl-jit/CMakeLists.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,13 @@ if (NOT WIN32 AND NOT CYGWIN)
1313
# Set library-wide warning options.
1414
set(SYCL_JIT_WARNING_FLAGS -Wall -Wextra)
1515

16-
option(SYCL_JIT_ENABLE_WERROR "Treat all warnings as errors in SYCL kernel JIT library" ON)
16+
option(SYCL_JIT_ENABLE_WERROR "Treat all warnings as errors in SYCL JIT library" ON)
1717
if(SYCL_JIT_ENABLE_WERROR)
1818
list(APPEND SYCL_JIT_WARNING_FLAGS -Werror)
1919
endif(SYCL_JIT_ENABLE_WERROR)
2020
endif()
2121

2222

23-
add_subdirectory(common)
2423
add_subdirectory(jit-compiler)
2524
add_subdirectory(passes)
2625

sycl-jit/README.md

+16-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
1-
# SYCL Kernel Fusion Compiler
1+
# SYCL-JIT library
22

3-
Basic JIT compiler infrastructure to perform online kernel fusion of SYCL kernels at runtime.
3+
A library to make LLVM-based tooling available to the SYCL runtime.
44

5-
The experimental SYCL extension for kernel fusion is described in
6-
[this proposal](../sycl/doc/extensions/experimental/sycl_ext_codeplay_kernel_fusion.asciidoc).
5+
## Current use-cases
76

8-
The design of the JIT compiler is described in this
9-
[design document](../sycl/doc/design/KernelFusionJIT.md).
7+
- Materialization of specialization constants for third-party GPUs
8+
- Entrypoint declared in `jit-compiler/include/Materializer.h`
9+
- Runtime-compilation of SYCL code (via `kernel_compiler` extension)
10+
- Entrypoints declared in `jit-compiler/include/RTC.h`
11+
12+
## Provided infrastructure
13+
14+
- CMake setup to link LLVM and Clang libraries and produce a pass plugin library
15+
- NB: Clang can be invoked programmatically via the LibTooling API
16+
- Translation from LLVM module to SPIR-V and PTX/AMDGCN; the resulting
17+
"binaries" (i.e. SPIR-V blob or PTX/AMDGCN text) are managed by the
18+
`JITContext` singleton class
19+
- Option handling

sycl-jit/common/CMakeLists.txt

-37
This file was deleted.

0 commit comments

Comments
 (0)