# US 2017/0289078 A1 · Systems and methods of supporting parallel processor message-based communications

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

- Number: US 2017/0289078 A1
- Document ID: US20170289078A1
- Status: Published application
- Kind: A1
- Application number: 15/084,101
- Filed: 2016-03-29
- Published: 2017-10-05
- Earliest claimed: 2016-03-29
- Assignees: Advanced Micro Devices, Inc.
- Applicants: Advanced Micro Devices, Inc.
- Inventors: Shuai Che
- Web page: https://patentgrep.com/patent/US20170289078A1

## CPC

- G06F 9/544: {Buffers; Shared memory; Pipes}
- H04L 67/1044: {Group management mechanisms (management of multicast group membership H04L12/185; reconfiguring of node membership in a computing system to eliminate errors G06F11/1425)}
- G06F 15/80: comprising an array of processing units with common control, e.g. single instruction multiple data processors (G06F15/82 takes precedence {; for correlation function computation G06F17/15})
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A method of message-based communication is provided which includes executing, on one or more accelerated processing units, a plurality of groups of work items, receiving a first message from a first group of work items of the plurality of groups of work items executing on the one or more accelerated processing units and storing the first message at a first segment of memory allocated to a second group of work items of the plurality of groups of work items executing on the accelerated processing unit.

## Claims

### Claim 1

A method of message-based communication comprising:
executing, on one or more accelerated processing units, a plurality of groups of work items;
receiving a first message from a first group of work items of the plurality of groups of work items executing on the one or more accelerated processing units; and
storing the first message at a first segment of memory allocated to a second group of work items of the plurality of groups of work items executing on the accelerated processing unit.

### Claim 2 (depends on 1)

The method of claim 1, wherein the first message is received from a portion of memory allocated to the first group of work items of the plurality of groups of work items executing on the accelerated processing unit.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
determining an updatable end of the memory allocated to the second group of work items;
storing, at the first segment, the first message beginning at the updatable end of the memory allocated to the second group of work items; and
updating the updatable end of the memory as a first updated end based on the updatable end and a size of the first message.

### Claim 4 (depends on 3)

The method of claim 3, further comprising:
receiving a second message from a portion of memory allocated to a third group of work items of the plurality of groups of work items executing on the accelerated processing unit;
determining, by the second group of work items, the first updated end of the memory allocated to the second group of work items;
storing, at a second segment of the memory allocated to the second group of work items, the second message beginning at the first updated end; and
updating the first updated end of the memory as a second updated end based on the first updated end and a size of the second message.

### Claim 5 (depends on 4)

The method of claim 4, further comprising:
storing data identifying: (i) the first group of work items sending the first message, the first segment in the memory and the size of the first message stored at the first segment; and (ii) data identifying: the third group of work items sending the second message; the second segment in the memory; and the size of the second message stored at the second segment.

### Claim 6 (depends on 4)

The method of claim 4, further comprising:
determining the updatable end of the memory by fetching the updatable end of the memory allocated to the second group of work items;
reserving the first segment based on the updatable end of the memory and the size of the first message; and
storing the first message at the reserved first segment.

### Claim 7 (depends on 4)

The method of claim 4, further comprising at least one of:
preventing, via a first barrier, the first message or the second message from being consumed by the second group of work items until the first message and second messages are received; and
preventing, via a second barrier, the receiving of one of the first message and the second message until the other of the first message and the second message is also received.

### Claim 8 (depends on 7)

The method of claim 7, wherein the first group of work items, the second group of work items and third group of work items are wavefronts, and
at least one of the first barrier and the second barrier is: (i) a workgroup barrier where each of the first group of work items, the second group of work items and third group of work items are wavefronts within the same workgroup; and (ii) a global barrier where each of the first group of work items, the second group of work items and third group of work items are wavefronts in different workgroups sharing the same global memory.

### Claim 9 (depends on 1)

The method of claim 1, further comprising:
allocating separate portions of memory to each of the plurality of work item groups; and
wherein each of the separate segments of memory is used to store one or more messages sent from one or more other work item groups of the plurality of work item groups.

### Claim 10

A processor device comprising:
one or more accelerated processing units executing a plurality of work item groups each comprising a plurality of work items; and
memory having a first portion allocated to a first one of the plurality of work item groups,
wherein the first memory portion is configured to:
receive, at a first segment, a first message from a second one of the plurality of work item groups, the second work item group being different from the first work item group.

### Claim 11 (depends on 10)

The processor device of claim 10, wherein the first memory portion allocated to the first one of the plurality of work item groups is further configured to receive the first message from a second memory portion allocated to the second one of the plurality of work item groups.

### Claim 12 (depends on 10)

The processor device of claim 10, wherein the one or more accelerated processing units are configured to:
determine an updatable end of the first portion of memory allocated to the first one of the plurality of work item groups;
store, at the first segment, the first message beginning at the updatable end of the portion of memory allocated to the first one of the plurality of work item groups; and
update the updatable end of the first portion of memory as a first updated end based on the updatable end of the first portion of memory and a size of the first message.

### Claim 13 (depends on 12)

The processor device of claim 12, wherein the one or more accelerated processing units are configured to:
receive a second message from a third portion of memory allocated to a third group of work items executing on the one or more accelerated processing units;
determine the first updated end of the portion of memory allocated to the first one of the plurality of work item groups;
store, at a second segment of the first portion of memory allocated to the first one of the plurality of work item groups, the second message beginning at the first updated end; and
update the first updated end of the first portion of memory allocated to the first one of the plurality of work item groups as a second updated end based on the first updated end of the portion of memory and a size of the second message.

### Claim 14 (depends on 13)

The processor device of claim 13, wherein the one or more accelerated processing units are further configured to:
store data identifying: (i) the first group of work items sending the first message, the first segment in the first portion of memory allocated to the first one of the plurality of work item groups and the size of the first message stored at the first segment; and (ii) data identifying the third group of work items sending the second message, the second segment in the first portion of memory allocated to the first one of the plurality of work item groups and the size of the second message stored at the second segment.

### Claim 15 (depends on 13)

The processor device of claim 13, wherein the one or more accelerated processing units are further configured to:
determine the updatable end of the first portion of memory allocated to the first one of the plurality of work item groups by fetching the end of the first portion of memory allocated to the first one of the plurality of work item groups;
reserve the first segment based on the updatable end of the first portion of memory allocated to the first one of the plurality of work item groups and the size of the first message; and
store the first message at the reserved first segment.

### Claim 16 (depends on 13)

The processor device of claim 13, wherein the one or more accelerated processing units are further configured to at least one of:
prevent, via a first barrier, the first message or the second message from being consumed by the second group of work items until the first message and second messages are received; and
prevent, via a second barrier, the receiving of one of the first message and the second message until the other of the first message and the second message is also received.

### Claim 17 (depends on 16)

The processor device of claim 16, wherein the first group of work items, the second group of work items and third group of work items are wavefronts, and
at least one of the first barrier and the second barrier is: (i) a workgroup barrier where each of the first group of work items, the second group of work items and third group of work items are wavefronts within the same workgroup; and (ii) a global barrier where each of the first group of work items, the second group of work items and third group of work items are wavefronts in different workgroups sharing the same global memory.

### Claim 18

A tangible, non-transitory computer readable medium comprising instructions for causing a computer to execute a method of message-based communication, the instructions comprising:
executing, on one or more accelerated processing units, a plurality of groups of work items;
receiving a first message from a first group of work items of the plurality of groups of work items executing on the one or more accelerated processing units; and
storing the first message at a first segment of memory allocated to a second group of work items of the plurality of groups of work items executing on the one or more accelerated processing units.

### Claim 19 (depends on 18)

The computer readable medium of claim 18, the instructions further comprising:
determining an updatable end of the memory allocated to the second group of work items;
storing, at the first segment, the first message beginning at the updatable end of the memory allocated to the second group of work items; and
updating the updatable end of the memory as a first updated end based on the updatable end and a size of the first message.

### Claim 20 (depends on 16)

The computer readable medium of claim 16, the instructions further comprising:
receiving a second message from a portion of memory allocated to a third group of work items of the plurality of groups of work items executing on the accelerated processing unit;
determining, by the second group of work items, the first updated end of the memory allocated to the second group of work items;
storing, at a second segment of the memory allocated to the second group of work items, the second message beginning at the first updated end;
and updating the first updated end of the memory as a second updated end based on the first updated end and a size of the second message.
