# US 2025/0123823 A1 · Data Processing Method, Processor, Computing Device, and Apparatus

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

- Number: US 2025/0123823 A1
- Document ID: US20250123823A1
- Status: Published application
- Kind: A1
- Application number: 18/999,308
- Filed: 2024-12-23
- Published: 2025-04-17
- Earliest claimed: 2022-06-23
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Yongnian Le; Xiaoquan Huang; Jie Peng; Qian Zhang
- Web page: https://patentgrep.com/patent/US20250123823A1

## CPC

- G06F 8/41: Compilation
- G06F 12/0875: with dedicated cache, e.g. instruction or stack
- G06F 8/4442: {Reducing the number of cache misses; Data prefetching (cache prefetching G06F12/0862)}
- G06F 11/302: {where the computing system component is a software system}
- G06F 11/3409: {for performance assessment}
- G06F 12/0862: with prefetch
- G06F 2201/86: Event-based monitoring
- G06F 2201/865: Monitoring of software
- G06F 2201/88: Monitoring involving counting
- G06F 2201/885: Monitoring specific for caches
- G06F 2212/1016: Performance improvement
- Y02D 10/00: Energy efficient computing, e.g. low power processors, power management or thermal management
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- Y02D: CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE

## Abstract

A data processing method, performed by a processor, includes obtaining executable code generated by compiling source code. The executable code includes code corresponding to an extension instruction, where the extension instruction indicates that target data needs to reside in a cache, and the target data is data to be invoked for a plurality of times in a process of executing the executable code. The method further includes executing the executable code, obtaining the target data, and storing the target data in the cache. The executable code obtained by the processor directly carries the extension instruction, and the processor executes the code corresponding to the extension instruction, so that the target data may reside in the cache.

## Claims

### Claim 1

A method comprising:
obtaining first executable code comprising code corresponding to a first extension instruction, wherein the first extension instruction indicates target data to be stored in a cache, and wherein the target data is data that is frequently invoked in a process of executing the first executable code;
executing the code;
obtaining the target data in response to executing the code; and
storing the target data in the cache.

### Claim 2 (depends on 1)

The method of claim 1, wherein obtaining the first executable code comprises:
analyzing a source code to determine the target data, wherein a first reuse score of the target data is greater than a threshold, and wherein the first reuse score indicates a reuse degree of the target data;
inserting the first extension instruction into the source code; and
compiling the source code to generate the first executable code.

### Claim 3 (depends on 1)

The method of claim 1, wherein obtaining the target data and storing the target data in the cache comprises sending a residence instruction to the cache to indicate to the cache to obtain the target data and store the target data according to the residence instruction.

### Claim 4 (depends on 1)

The method of claim 1, wherein a last level cache (LLC) of the cache is a high bandwidth memory (HBM), and wherein the first extension instruction indicates that the target data is to be stored in the LLC.

### Claim 5 (depends on 1)

The method of claim 1, further comprising clearing, by the cache when an idle space in the cache is less than a threshold, data other than the target data in the cache.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
obtaining an event from a performance monitoring unit (PMU);
updating the target data based on the event to obtain updated target data;
inserting a second extension instruction into a source code, wherein the second extension instruction indicates that the updated target data is to be stored in the cache;
re-compiling the source code to generate second executable code; and
executing the second executable code.

### Claim 7 (depends on 2)

The method of claim 2, wherein inserting the first extension instruction into the source code comprises inserting the first extension instruction into an adjacent row of code that invokes the target data for a first time in the source code.

### Claim 8 (depends on 2)

The method of claim 2, wherein analyzing the source code to determine the target data comprises:
determining a loop sequence of a function in the source code, wherein the loop sequence comprises at least one loop of the function;
calculating, for the loop sequence, a second reuse score of data corresponding to an access node comprised in the at least one loop; and
determining the target data based on the second reuse score.

### Claim 9

A processor comprising:
a logic circuit configured to:
obtain first executable code comprising code corresponding to a first extension instruction, wherein the first extension instruction indicates target data to be stored in a cache, and wherein the target data is data that is frequently invoked in a process of executing the first executable code;
execute the code;
obtain the target data; and
store the target data in the cache; and
a power supply circuit configured to supply power to the logic circuit.

### Claim 10 (depends on 9)

The processor of claim 9, wherein the logic circuit is further configured to:
analyze a source code to determine the target data, wherein a first reuse score of the target data is greater than a threshold, and wherein the first reuse score indicates a reuse degree of the target data;
insert the first extension instruction into the source code; and
compile the source code to generate the first executable code.

### Claim 11 (depends on 9)

The processor of claim 9, wherein the logic circuit is further configured to send a residence instruction to the cache to indicate to the cache to obtain the target data and store the target data according to the residence instruction.

### Claim 12 (depends on 9)

The processor of claim 9, wherein a last level cache (LLC) of the cache is a high bandwidth memory (HBM), and wherein the first extension instruction indicates that the target data is to be stored in the LLC.

### Claim 13 (depends on 9)

The processor of claim 9, wherein the logic circuit is further configured to:
obtain an event from a performance monitoring unit (PMU);
update the target data based on the event to obtain updated target data;
insert a second extension instruction into a source code, wherein the second extension instruction indicates that the updated target data is to be stored in the cache;
re-compile the source code to generate second executable code; and
execute the second executable code.

### Claim 14 (depends on 9)

The processor of claim 9, wherein the logic circuit is further configured to insert the first extension instruction into an adjacent row of code that invokes the target data for a first time in a source code.

### Claim 15 (depends on 9)

The processor of claim 9, wherein the logic circuit is further configured to:
determine a loop sequence of a function in a source code, wherein the loop sequence comprises at least one loop of the function;
calculate, for the loop sequence, a second reuse score of data corresponding to an access node comprised in the at least one loop, wherein the reuse score indicates a reuse degree of the data in the source code; and
determine the target data based on the second reuse score.

### Claim 16

A computer chip comprising:
a cache; and
a processor configured to:
obtain first executable code comprising code corresponding to a first extension instruction, wherein the first extension instruction indicates target data to be stored in the cache, and wherein the target data is data that is frequently invoked in a process of executing the first executable code;
execute the code;
obtain the target data; and
store the target data in the cache.

### Claim 17 (depends on 16)

The computer chip of claim 16, wherein the processor is further configured to:
analyze source code to determine the target data, wherein a reuse score of the target data is greater than a threshold, and wherein the reuse score indicates a reuse degree of the target data;
insert the first extension instruction into the source code; and
compile the source code to generate the first executable code.

### Claim 18 (depends on 16)

The computer chip of claim 16, wherein the processor is further configured to send a residence instruction to the cache to indicate to the cache to obtain the target data and store the target data according to the residence instruction.

### Claim 19 (depends on 16)

The computer chip of claim 16, wherein a last level cache (LLC) of the cache is a high bandwidth memory (HBM), and wherein the first extension instruction indicates that the target data is to be stored in the LLC.

### Claim 20 (depends on 16)

The computer chip of claim 16, wherein the processor is further configured to:
obtain an event from a performance monitoring unit (PMU);
update the target data based on the event to obtain updated target data;
insert a second extension instruction into a source code, wherein the second extension instruction indicates that the updated target data is to be stored in the cache;
re-compile the source code to generate second executable code; and
execute the second executable code.
