# US 2024/0004653 A1 · Approach for managing near-memory processing commands from multiple processor threads to prevent interference at near-memory processing elements

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

- Number: US 2024/0004653 A1
- Document ID: US20240004653A1
- Status: Published application
- Kind: A1
- Application number: 17/853,613
- Filed: 2022-06-29
- Published: 2024-01-04
- Earliest claimed: 2022-06-29
- Assignees: Advanced Micro Devices, Inc.
- Applicants: Advanced Micro Devices, Inc.
- Inventors: Johnathan Alsop; Laurent S. White; Shaizeen Aga
- Web page: https://patentgrep.com/patent/US20240004653A1

## CPC

- G06F 9/3009: {Thread control instructions}
- G06F 9/3851: {from multiple instruction streams, e.g. multistreaming}
- G06F 9/3004: {to perform operations on memory}
- G06F 9/30101: {Special purpose registers}
- G06F 15/7821: {Tightly coupled to memory, e.g. computational memory, smart memory, processor in memory}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

An approach is provided for managing near-memory processing commands (“PIM commands”) from multiple processor threads in a manner to prevent interference and maintain correctness at near-memory processing elements. A memory controller uses thread identification information and last command information to issue a PIM command sequence from a first processor thread, directed to a PIM-enabled memory element, while deferring the issuance of PIM command sequences from other processor threads, directed to the same PIM-enabled memory element. After the last PIM command in the PIM command sequence for the first processor thread has been issued, a PIM command sequence for another processor thread is issued, and so on. The approach allows multiple processor threads to concurrently issue fine grained PIM commands to the same PIM-enabled memory element without having to be aware of address-to-memory element mapping, and without having to coordinate with other threads.

## Claims

### Claim 1

A memory controller configured to:
in response to one or more bit values identifying a first processor thread, said one or more bit values being in a one or more near-memory processing commands, issue the one or more near-memory processing commands for the first processor thread while deferring issuance of one or more near-memory processing commands for a second processor thread, wherein the one or more near-memory processing commands for the first processor thread and the one or more near-memory processing commands for the second processor thread are directed to a same memory element.

### Claim 2 (depends on 1)

The memory controller of claim 1, wherein the one or more near-memory processing commands for the first processor thread are at least partially interleaved with the one or more near-memory processing commands for the second processor thread when received by the memory controller.

### Claim 3

(canceled)

### Claim 4 (depends on 1)

The memory controller of claim 1, wherein the one or more bit values in the one or more near-memory processing commands are set based upon address information in the one or more near-memory processing commands.

### Claim 5 (depends on 1)

The memory controller of claim 1, wherein the one or more bit values in the one or more near-memory processing commands are one or more command bit values, one or more requestor ID bit values, or one or more added thread ID bit values.

### Claim 6 (depends on 1)

The memory controller of claim 1, further configured to issue the one or more near-memory processing commands for the second processor thread after all of the near-memory processing commands in a near-memory processing command sequence for the first processor thread have been issued.

### Claim 7 (depends on 6)

The memory controller of claim 6, further configured to identify a last near-memory processing command in the one or more near-memory processing commands for the first processor thread based upon one or more of: one or more bit values in the last near-memory processing command or a near-memory processing command that is designated as the last near-memory processing command for the first processor thread.

### Claim 8 (depends on 1)

The memory controller of claim 1, further configured to defer issuance of the one or more near-memory processing commands for the second processor thread by one or more of:
changing a pointer to skip the one or more near-memory processing commands for the second processor thread or
reordering the one or more near-memory processing commands for the second processor thread with near-memory processing commands for the first processor thread.

### Claim 9 (depends on 1)

The memory controller of claim 1, further configured to:
cause data stored in a local storage of a near-memory processing element for the first processor thread to be stored to another location, upon completion of a near-memory processing command sequence for a third processor thread:
cause the data that was stored in the another location to be reloaded into the local storage of the near-memory processing element for the first processor thread, and
resume processing of the one or more near-memory processing commands for the first processor thread.

### Claim 10 (depends on 1)

The memory controller of claim 1, wherein the memory element is one or more registers.

### Claim 11 (depends on 1)

The memory controller of claim 1, wherein the memory controller comprises one or more of a cache, a queue, or a buffer.

### Claim 12

A processor comprising:
a first processor thread;
a second processor thread; and
a memory controller configured to:
in response to one or more bit values identifying the first processor thread, said one or more bit values being in a one or more near-memory processing commands, issue the one or more near-memory processing commands for the first processor thread while deferring issuance of one or more near-memory processing commands for the second processor thread, wherein the one or more near-memory processing commands for the first processor thread and the one or more near-memory processing commands for the second processor thread are directed to a same memory element.

### Claim 13 (depends on 12)

The processor of claim 12, wherein the one or more near-memory processing commands for the first processor thread are at least partially interleaved with the one or more near-memory processing commands for the second processor thread when received by the memory controller.

### Claim 14

(canceled)

### Claim 15 (depends on 12)

The processor of claim 12, wherein the one or more bit values in the one or more near-memory processing commands are set based upon address information in the one or more near-memory processing commands or are one or more command bit values, one or more requestor ID bit values, or one or more added thread ID bit values.

### Claim 16 (depends on 12)

The processor of claim 12, wherein the memory controller is further configured to issue the one or more near-memory processing commands for the second processor thread after all of the near-memory processing commands in a near-memory processing command sequence for the first processor thread have been issued.

### Claim 17 (depends on 16)

The processor of claim 16, wherein the memory controller is further configured to identify a last near-memory processing command in the one or more near-memory processing commands for the first processor thread based upon one or more of: one or more bit values in the last near-memory processing command or a near-memory processing command that is designated as the last near-memory processing command for the first processor thread.

### Claim 18 (depends on 12)

The processor of claim 12, wherein the memory controller is further configured to defer issuance of the one or more near-memory processing commands for the second processor thread by one or more of:
changing a pointer to skip the one or more near-memory processing commands for the second processor thread or
reordering the one or more near-memory processing commands for the second processor thread with near-memory processing commands for the first processor thread.

### Claim 19 (depends on 12)

The processor of claim 12, wherein the memory controller is further configured to:
cause data stored in a local storage of a near-memory processing element for the memory element to be stored in another location,
upon completion of a near-memory processing command sequence for a third processor thread:
cause the data that was stored in the another location to be reloaded into the local storage of the near-memory processing element for the memory element, and
resume processing of the one or more near-memory processing commands for the first processor thread.

### Claim 20 (depends on 12)

The processor of claim 12, wherein the memory element is one or more registers.
