Skip to content

Commit b36bcf6

Browse files
Documentation regarding CL_CACHE
Change-Id: I8ea845d927057ed066bc8ca1159c84edffb2d172
1 parent 3a95312 commit b36bcf6

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

documentation/FAQ.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
# Frequently asked questions
23

34
## OS support
@@ -66,7 +67,43 @@ By storing the binary representations, compiling is required only the first time
6667

6768
In the working directory, manually create *cl_cache* directory.
6869
The driver will use this directory to store the binary representations of the compiled kernels.
69-
Note: This will work on all supported OSes.
70+
Note: This will work on all supported OSes.
71+
72+
### Configuring cl_cache location
73+
74+
Cached kernels can be stored in a different directory than the default one. This is useful when the application is installed into a directory for which the user doesn't have permissions.
75+
76+
#### Linux configuration
77+
78+
Set the environment variable named `cl_cache_dir` to new location of cl_cache directory.
79+
80+
#### Example:
81+
82+
If the application's directory is `/home/user/Document`, by default cl_cache will be stored in `/home/user/Document/cl_cache`.
83+
If the new path should be `/home/user/Desktop/cl_cache_place`, set environment variable `cl_cache_dir` to `/home/user/Desktop/cl_cache_place`.
84+
```bash
85+
export cl_cache_dir=/home/user/Desktop/cl_cache_place
86+
```
87+
88+
Subsequent application runs with passed source code and `cl_cache_dir` environment variable set will reuse previously cached kernel binaries instead of compiling kernels from source.
89+
90+
#### Windows configuration
91+
92+
To set the new location of cl_cache directory - in the registry `HKEY_LOCAL_MACHINE\SOFTWARE\Intel\IGFX\OCL`:
93+
1. add key `cl_cache_dir`
94+
1. add string value named <path_to_app> to `cl_cache_dir` key
95+
1. set data of added value to desired location of cl_cache
96+
97+
#### Example:
98+
99+
If application is located in `C:\Program Files\application\app.exe`, by default cl_cache will be stored in `C:\Program Files\application\cl_cache`.
100+
If the new path should be `C:\Users\USER\Documents\application\cl_cache`, to subkey `HKEY_LOCAL_MACHINE\SOFTWARE\Intel\IGFX\OCL\cl_cache_dir` add string value named `C:\Program Files\application\app.exe` with data `C:\Users\USER\Documents\application\cl_cache`.
101+
102+
e.g.
103+
string value : `HKEY_LOCAL_MACHINE\SOFTWARE\Intel\IGFX\OCL\cl_cache_dir\C:\Program Files\application\app.exe`
104+
data : `C:\Users\USER\Documents\application\cl_cache`
105+
106+
Neo will look for string value (REG_SZ) `C:\Program Files\application\app.exe` in key `HKEY_LOCAL_MACHINE\SOFTWARE\Intel\IGFX\OCL\cl_cache_dir`. Data of this string value will be used as new cl_cache dump directory for this specific application.
70107

71108
### What are the known limitations of cl_cache?
72109

0 commit comments

Comments
 (0)