You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added 'Overridable' column to the dump products reference table. Documented which dump product can be overriden via ShaderOverride. Listed overridable products from recompilation outputs.
Copy file name to clipboardExpand all lines: documentation/shader_dumps_instruction.md
+26-13Lines changed: 26 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,19 +24,19 @@ To compile a standalone `*.cl` shader file use `ocloc` compiler frontend executa
24
24
25
25
Shader dumps include (in order of creation):
26
26
27
-
| Product | Description |
28
-
|-|-|
29
-
|`*.cl` file | Original shader file. Passed to `clang` wrapped with `opencl-clang`. |
30
-
|`*.spv` file | SPIR-V binary produced by `opencl-clang`. Passed to IGC's baked-in [SPIRVReader](https://github.com/intel/intel-graphics-compiler/blob/master/IGC/AdaptorOCL/SPIRV/SPIRVReader.cpp). |
31
-
|`*.spvasm` file | Disassembled SPIR-V binary only for debugging purposes. |
32
-
|`*_beforeUnification.ll` file | Result of `*.spv` translation. Start of IGC compilation. |
33
-
|`*_afterUnification.ll` file | Result of all unification passes. |
34
-
|`*_optimized.ll` file | Result of all optimization passes. |
35
-
|`*_codegen.ll` file | Result of all codegen passes. |
36
-
|`*.visa.ll` files | Mappings between LLVM IR ↔ vISA. May not be legal LLVM IR representation. |
37
-
|`*.visaasm` files | vISA assembly file. |
38
-
|`*.asm` files | Kernels in assembly form. |
39
-
|`*.isa` files | Kernels' binaries. |
27
+
| Product | Description | Overridable |
28
+
|-|-|-|
29
+
|`*.cl` file | Original shader file. Passed to `clang` wrapped with `opencl-clang`. | Skip |
30
+
|`*.spv` file | SPIR-V binary produced by `opencl-clang`. Passed to IGC's baked-in [SPIRVReader](https://github.com/intel/intel-graphics-compiler/blob/master/IGC/AdaptorOCL/SPIRV/SPIRVReader.cpp). | Skip |
31
+
|`*.spvasm` file | Disassembled SPIR-V binary only for debugging purposes. | Skip |
32
+
|`*_beforeUnification.ll` file | Result of `*.spv` translation. Start of IGC compilation. | Yes |
33
+
|`*_afterUnification.ll` file | Result of all unification passes. | Yes |
34
+
|`*_optimized.ll` file | Result of all optimization passes. | Yes |
35
+
|`*_codegen.ll` file | Result of all codegen passes. | Crash |
36
+
|`*.visa.ll` files | Mappings between LLVM IR ↔ vISA. May not be legal LLVM IR representation. | Skip |
37
+
|`*.visaasm` files | vISA assembly file. | Yes |
38
+
|`*.asm` files | Kernels in assembly form. | Yes |
39
+
|`*.isa` files | Kernels' binaries. | Skip |
40
40
41
41
There are also additional products that are not a part of compilation pipeline:
42
42
@@ -48,6 +48,13 @@ There are also additional products that are not a part of compilation pipeline:
48
48
#### Notes
49
49
1. There is a separate SPIR-V translator for `*.cl`→`*.spv` translation (`opencl-clang`'s) and another for `*.spv`→`*.ll` translation (baked into into IGC).
50
50
2. vISA is an intermediate language for IGC backend.
51
+
3. Values in the *Overridable* column indicate how the ShaderOverride mechanism treats each dump product:
52
+
| Value | Meaning |
53
+
| - | - |
54
+
| Yes | The dump can be successfully overridden. |
55
+
| Crash | IGC detects the override attempt and tries to apply it, but **the process results in a crash**. |
56
+
| Skip | IGC **does not attempt to override** the product. Dumps with this status are ignored by the ShaderOverride mechanism. |
57
+
4. Main dump products generated during recompilation are distinguished by an additional numeric identifier in the filename (for example: `*_1_beforeUnification.ll`). Hovever, individual compilation passes continue their numbering sequence (for example the first unification pass may start from `*_0321_Unify_after_PreprocessSPVIR.ll`).
51
58
52
59
### Additional options
53
60
@@ -158,6 +165,12 @@ To enable overrides you need to set an environmental variable:
158
165
export IGC_ShaderOverride=1
159
166
```
160
167
168
+
### Overridable and Non-Overridable dumps
169
+
170
+
1.**Main dump products** that can be overridden are explicitly marked in the reference table (see the *Overridable* column in [List of dump products](#list-of-dump-products)).
171
+
2. Passes that occur between main dump products **cannot be overridden** (for example: `*_after_DeadCodeElimination.ll`).
172
+
3. Among **recompilation outputs**, only `.visaasm` and `.asm` dumps **can be successfully overridden** without causing a crash. Rest of the products are going to cause a crash during overriding attempt.
0 commit comments