vISA QW_GATHER
intel_gpu_visa)Intel Gen9–Gen12 / Xe-LP / Xe-HPG / Xe-HPC / Xe2
master
userSummary
Intel GPU vISA QW_GATHER instruction.
Syntax / Encoding
[(<P>)] QW_GATHER.<num_blocks> (<exec_size>) <surface> <offset> <dst>
Binary Encodings (1)
| Width | Format | Bit Pattern | Mask / Match |
|---|---|---|---|
| Intel-vISA | | / |
Operands
| Name | Description |
|---|---|
Exec_size | Execution size |
Pred | Predication control |
Surface | Index of the surface variable. T0 (SLM) is supported |
Offset | The first Exec_size elements of the operand will be used as the byte offsets into the surface. Must have type UD |
Dst | The general variable storing the results of the read. Must have type Q,UQ,DF |
Reference Notes
## Opcode
QW_GATHER = 0x86
## Format
| | | | | | | |
| --- | --- | --- | --- | --- | --- | --- |
| 0x86(QW_GATHER) | Exec_size | Pred | Num_blocks | Surface | Offset | Dst |
## Semantics
```
for (i = 0; i < exec_size; ++i) {
if (ChEn[i]) {
for (j = 0; j < num_blocks; ++j) {
dst[j*exec_size+i] = Surface[Offset[i] + j]; // 8 byte
}
}
}
```
## Description
```
Performs <exec_size> element scattered read from <surface> and stores the
result into <dst>. For each channel <num_blocks> * 8 bytes are read.
```
- **Exec_size(ub):** Execution size
- Bit[2..0]: size of the region for source and destination operands
- 0b000: 1 element (scalar)
- 0b001: 2 elements
- 0b010: 4 elements
- 0b011: 8 elements
- 0b100: 16 elements
- Bit[7..4]: execution mask (explicit control over the enabled channels)
- 0b0000: M1
- 0b0001: M2
- 0b0010: M3
- 0b0011: M4
- 0b0100: M5
- 0b0101: M6
- 0b0110: M7
- 0b0111: M8
- 0b1000: M1_NM
- 0b1001: M2_NM
- 0b1010: M3_NM
- 0b1011: M4_NM
- 0b1100: M5_NM
- 0b1101: M6_NM
- 0b1110: M7_NM
- 0b1111: M8_NM
- **Pred(uw):** Predication control
- **Num_blocks(ub):**
- Bit[1..0]: encodes the number of blocks to read for each address
- 0b00: 1 block
- **Surface(ub):** Index of the surface variable. T0 (SLM) is supported
- **Offset(raw_operand):** The first Exec_size elements of the operand will be used as the byte offsets into the surface. Must have type UD
- **Dst(raw_operand):** The general variable storing the results of the read. Must have type Q,UQ,DF
#### Properties
- **Out-of-bound Access:** On read: zeroes are returned.
## Text
```
[(<P>)] QW_GATHER.<num_blocks> (<exec_size>) <surface> <offset> <dst>
```
## Notes