Skip to content

Commit db62fe7

Browse files
authored
[SYCL][Doc] Intel's Extension to Set Kernel Cache Configuration (#2993)
* This proposal details what is required to provide users the ability to set the kernel cache configuration. Signed-off-by: Gail Lyons <[email protected]>
1 parent 0877be6 commit db62fe7

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# SYCL(TM) Proposal: Intel's Extension to Set Kernel Cache Configuration
2+
3+
4+
**NOTE**: Khronos(R) is a registered trademark and SYCL(TM) is a trademark of the Khronos Group, Inc.
5+
6+
A new API will be added to set the cache configuration in the kernel. This information will be useful to developers tuning specifically for those devices.
7+
8+
This proposal details what is required to provide this API as a SYCL extensions.
9+
10+
## Feature Test Macro ##
11+
12+
The Feature Test Macro will be defined as:
13+
14+
#define SYCL_EXT_INTEL_KERNEL_CACHE_CONFIG 1
15+
16+
17+
# Setting the Kernel Cache Configuration #
18+
19+
The cache configuration of the kernel can be modified to favor large shared local memory (SLM) or large data. This API gives users a way to do request this change.
20+
21+
The new API is only available when using the Level Zero platform.
22+
23+
``` C++
24+
enum class kernel_cache_config {
25+
cache_large_slm,
26+
cache_large_data
27+
};
28+
29+
cl::sycl::kernel::set_cache_config(const kernel_cache_config);
30+
```
31+
32+
33+
## Example Usage ##
34+
35+
``` C++
36+
// Use Feature Test macro to see if this extension is supported.
37+
#ifdef SYCL_EXT_INTEL_KERNEL_CACHE_CONFIG
38+
// Configure the kernel to use large SLM.
39+
krn.set_cache_config(cache_large_slm);
40+
#endif
41+
42+
```

0 commit comments

Comments
 (0)