# US 2021/0286626 A1 · Control flow mechanism for execution of graphics processor instructions using active channel packing

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0286626 A1
- Document ID: US20210286626A1
- Status: Published application
- Kind: A1
- Application number: 17/213,453
- Filed: 2021-03-26
- Published: 2021-09-16
- Earliest claimed: 2017-04-21
- Assignees: Intel Corporation
- Applicants: Intel Corporation
- Inventors: Subramaniam M. Maiyuran; Guei-Yuan Lueh; Supratim Pal; Gang Chen; Ananda V. Kommaraju; Joy Chandra; Altug Koker; Prasoonkumar Surti; David Puffer; Hong Bin Liao; Joydeep Ray; Abhishek R. Appu; Ankur N. Shah; Travis T. Schluessler; Jonathan Kennedy; Devan Burke
- Web page: https://patentgrep.com/patent/US20210286626A1

## CPC

- G06F 9/30058: {Conditional branch instructions}
- G06F 9/30018: {Bit or string instructions}
- G06F 9/30036: {Instructions to perform operations on packed data, e.g. vector, tile or matrix operations}
- G06F 9/30038: {using a mask}
- G06F 9/30076: {to perform miscellaneous control operations, e.g. NOP}
- G06F 9/323: {for indirect branch instructions}
- G06F 9/3851: {from multiple instruction streams, e.g. multistreaming}
- G06F 9/3887: {controlled by a single instruction for multiple data lanes [SIMD]}
- G06F 9/3888: {controlled by a single instruction for multiple threads [SIMT] in parallel}
- G06F 9/38885: {Divergence aspects}
- G06T 1/20: Processor architectures; Processor configuration, e.g. pipelining
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

An apparatus to facilitate control flow in a graphics processing system is disclosed. The apparatus includes logic a plurality of execution units to execute single instruction, multiple data (SIMD) and flow control logic to detect a diverging control flow in a plurality of SIMD channels and reduce the execution of the control flow to a subset of the SIMD channels.

## Claims

### Claim 1

An apparatus comprising:
a graphics processor, including:
a plurality of processing resources to execute pipelined instructions using a plurality of channels; and
flow control circuitry to:
detect that a number of active channels is below a predetermined threshold percentage of the plurality of channels;
identify a code region impacted by diverging control flow;
duplicate the code region with the number of active channels;
pack the input of the active channels implemented by the code region; and
unpack the output of the active channels produced by the code region.

### Claim 2

(canceled)

### Claim 3

(canceled)

### Claim 4 (depends on 1)

The apparatus of claim 1, wherein the flow control circuitry is to pack input to the active channels into a subset of the plurality of channels responsive to a determination that the number of active channels is below the predetermined threshold percentage.

### Claim 5 (depends on 4)

The apparatus of claim 4, wherein the flow control circuitry is to detect the active channels detects whether the active channels are spread over multiple sections of the plurality of processing resources.

### Claim 6 (depends on 5)

The apparatus of claim 5, wherein the flow control circuitry prevents packing input to the active channels into the subset of the channels upon detecting that the active channels are not spread over the multiple sections.

### Claim 7 (depends on 1)

The apparatus of claim 1, wherein the flow control circuitry is to duplicate the identified code region within the subset of the SAID channels.

### Claim 8 (depends on 7)

The apparatus of claim 7, wherein the subset of the channels comprise half of the channels.

### Claim 9 (depends on 4)

The apparatus of claim 4, further comprising a register file including:
one or more bit registers; and
one or more byte registers including a plurality of registers.

### Claim 10 (depends on 9)

The apparatus of claim 9, wherein the flow control circuitry is to locate indices of register bits that are set in a bit register and write the indices to a bytes register.

### Claim 11 (depends on 4)

The apparatus of claim 4, wherein the flow control circuitry is further to unpack output from the subset of the channels into the plurality of channels.

### Claim 12 (depends on 1)

The apparatus of claim 1, wherein the flow control circuitry is further to perform consecutive channel execution upon detecting the diverging control flow.

### Claim 13 (depends on 1)

The apparatus of claim 1, wherein the flow control circuitry is further to:
detect shader branch instructions; and
reconfigure hardware resources upon detection of the shader branch instructions.

### Claim 14 (depends on 13)

The apparatus of claim 13, wherein the flow control circuitry is further to inject instructions into profile branch directions based on statistical sampling.

### Claim 15

A method comprising:
detecting that a number of active channels is below a predetermined threshold percentage of a plurality of channels of processing resources of a graphics processor;
identifying a code region impacted by diverging control flow;
duplicating the code region with the number of active channels;
packing the input of the active channels implemented by the code region; and
unpacking the output of the active channels produced by the code region.

### Claim 16

(canceled)

### Claim 17 (depends on 15)

The method of claim 15, further comprising:
detecting whether the active channels are spread over multiple sections of the processing resources; and
preventing packing input to the active channels into a subset of the channels responsive to detecting that the active channels are not spread over the multiple sections.

### Claim 18 (depends on 17)

The method of claim 17, wherein unpacking the output further comprises unpacking the output from the subset of the channels into the plurality of channels.

### Claim 19

A non-transitory computer readable medium having instructions, which when executed by one or more processors, cause the processors to:
detect that a number of active channels is below a predetermined threshold percentage of a plurality of channels of processing resources of a graphics processor of the one or more processors;
identify a code region impacted by diverging control flow;
duplicate the code region with the number of active channels;
pack the input of the active channels implemented by the code region; and
unpack the output of the active channels produced by the code region.

### Claim 20 (depends on 19)

The non-transitory computer readable medium of claim 19, having instructions, which when executed by the one or more processors, further causes the processors to:
detect whether the active channels are spread over multiple sections of the processing resources; and
prevent packing input to the active channels into a subset of the channels on responsive to detecting that the active SAID channels are not spread over the multiple sections.

### Claim 21 (depends on 19)

The non-transitory computer readable medium of claim 19, wherein unpacking the output further comprises unpacking the output from the subset of the channels into the plurality of channels.

### Claim 22 (depends on 19)

The non-transitory computer readable medium of claim 19, having instructions, which when executed by the one or more processors, further causes the processors to:
detect shader branch instructions; and
reconfigure hardware resources upon detection of the shader branch instructions.

### Claim 23 (depends on 15)

The method of claim 15, further comprising:
detecting shader branch instructions; and
reconfiguring hardware resources upon detection of the shader branch instructions.
