IP Library Granted Patent US 10,783,004
Granted Patent B1
US 10,783,004 · App. 16/794,971 · Granted Sep 22, 2020

Method, apparatus, and electronic device for improving parallel performance of CPU

Inventors: Ling Ma (Hangzhou, CN); Wei Zhou (Hangzhou, CN); Changhua He (Hangzhou, CN)
Assignee: Alibaba Group Holding Limited
G06F9/5027G06F9/3005G06F9/30098G06F9/3836G06F9/4843
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,783,004
App. No.
16/794,971
Granted
Sep 22, 2020
Kind
B1
Abstract

Implementations of the present specification provide a method, an apparatus, and an electronic device for improving parallel performance of a CPU. The method includes: attempting to acquire data requests that are of a same type and that are allocated to the CPU core; determining a number of requests that are specified by the acquired one or more data requests; and in response to determining that the number of requests is greater than or equal to a maximum degree of parallelism: executing executable codes corresponding to the maximum degree of parallelism, wherein the maximum degree of parallelism is a maximum number of parallel threads executable by the CPU, and wherein the executable codes comprise code programs that are compiled and linked based on the maximum degree of parallelism at a time that is prior to a time of the executing.

Claims (77)

1. A method for improving parallel performance of a CPU, the method comprising:

attempting, by a CPU core, to acquire data requests that are of a same type and that are allocated to the CPU core;

determining, by the CPU core, a number of data requests that are acquired; and

in response to determining that the number of data requests that are acquired is greater than or equal to a maximum degree of parallelism:

executing, by the CPU core, executable codes corresponding to the maximum degree of parallelism, wherein the maximum degree of parallelism is a maximum number of parallel threads executable by the CPU, and wherein the executable codes comprise code programs that are compiled and linked based on the maximum degree of parallelism at a time that is prior to a time of the executing.

2. The method according to claim 1 , further comprising:

in response to determining that the number of data requests that are acquired is less than the maximum degree of parallelism, and a number of attempts made by the CPU core to acquire data requests is less than the maximum degree of parallelism:

attempting, by the CPU core, to acquire data requests that are of the same type and that are allocated to the CPU core.

3. The method according to claim 1 , further comprising:

in response to determining that the number of data requests that are acquired is less than the maximum degree of parallelism but is greater than 0, and the number of attempts made by the CPU core to acquire data requests is not less than the maximum degree of parallelism:

executing, by the CPU core, executable codes corresponding to the number of data requests that are acquired.

4. The method according to claim 3 , further comprising:

in response to determining that the number of data requests that are acquired is equal to 0 and the number of attempts made by the CPU core to acquire data requests is not less than the maximum degree of parallelism:

attempting, by the CPU core, to acquire data requests that are of the same type and that are allocated to the CPU core.

5. The method according to claim 1 , wherein in the code programs are compiled by performing operations comprising:

determining that the maximum degree of parallelism is equal to 2; and

in response to determining that the maximum degree of parallelism is equal to 2:

executing code corresponding to a first upward jump;

executing code corresponding to a second upward jump; and

setting an identifier bit to a first identifier.

6. The method according to claim 5 , wherein the operations further comprise:

determining, based on an execution result of the code, whether the code requires continued execution;

in response to determining that the execution result of the code satisfies a threshold:

determining that the code requires repeated execution; and

in response to determining that the execution result of the code does not satisfy the threshold:

determining that the code does not require repeated execution.

7. The method according to claim 1 , wherein in the code programs are compiled by performing operations comprising:

determining that the maximum degree of parallelism is equal to 2; and

in response to determining that the maximum degree of parallelism is equal to 2:

executing code corresponding to a first downward jump; and

executing code corresponding to a second downward jump.

8. The method according to claim 1 , wherein the type of data requests comprises an upward jump or a downward jump.

9. The method according to claim 1 , wherein each of the parallel threads is assigned to an equally sized group of registers.

10. A non-transitory, computer-readable medium storing one or more instructions executable by a computer system to perform operations for improving parallel performance of a CPU, the operations comprising:

attempting, by a CPU core, to acquire data requests that are of a same type and that are allocated to the CPU core;

determining, by the CPU core, a number of data requests that are acquired; and

in response to determining that the number of data requests that are acquired is greater than or equal to a maximum degree of parallelism:

executing, by the CPU core, executable codes corresponding to the maximum degree of parallelism, wherein the maximum degree of parallelism is a maximum number of parallel threads executable by the CPU, and wherein the executable codes comprise code programs that are compiled and linked based on the maximum degree of parallelism at a time that is prior to a time of the executing.

11. The non-transitory, computer-readable medium according to claim 10 , wherein the operations further comprise:

in response to determining that the number of data requests that are acquired is less than the maximum degree of parallelism, and a number of attempts made by the CPU core to acquire data requests is less than the maximum degree of parallelism:

attempting, by the CPU core, to acquire data requests that are of the same type and that are allocated to the CPU core.

12. An electronic device, comprising:

a processor; and

a memory, configured to store an instruction that can be executed by the processor; wherein

the processor is configured to perform operations for improving parallel performance of a CPU, the operations comprising:

attempting, by a CPU core, to acquire data requests that are of a same type and that are allocated to the CPU core;

determining, by the CPU core, a number of data requests that are acquired; and

in response to determining that the number of data requests that are acquired is greater than or equal to a maximum degree of parallelism:

executing, by the CPU core, executable codes corresponding to the maximum degree of parallelism, wherein the maximum degree of parallelism is a maximum number of parallel threads executable by the CPU, and wherein the executable codes comprise code programs that are compiled and linked based on the maximum degree of parallelism at a time that is prior to a time of the executing.

13. The electronic device according to claim 12 , wherein the operations further comprise:

in response to determining that the number of data requests that are acquired is less than the maximum degree of parallelism, and a number of attempts made by the CPU core to acquire data requests is less than the maximum degree of parallelism:

attempting, by the CPU core, to acquire data requests that are of the same type and that are allocated to the CPU core.

14. The electronic device according to claim 12 , wherein the operations further comprise:

in response to determining that the number of data requests that are acquired is less than the maximum degree of parallelism but is greater than 0, and the number of attempts made by the CPU core to acquire data requests is not less than the maximum degree of parallelism:

executing, by the CPU core, executable codes corresponding to the number of data requests that are acquired.

15. The electronic device according to claim 14 , wherein the operations further comprise:

in response to determining that the number of data requests that are acquired is equal to 0 and the number of attempts made by the CPU core to acquire data requests is not less than the maximum degree of parallelism:

attempting, by the CPU core, to acquire data requests that are of the same type and that are allocated to the CPU core.

16. The electronic device according to claim 12 , wherein in the code programs are compiled by performing compiling operations comprising:

determining that the maximum degree of parallelism is equal to 2; and

in response to determining that the maximum degree of parallelism is equal to 2:

executing code corresponding to a first upward jump;

executing code corresponding to a second upward jump; and

setting an identifier bit to a first identifier.

17. The electronic device according to claim 16 , wherein the compiling operations further comprise:

determining, based on an execution result of a code, whether the code requires continued execution;

in response to determining that the execution result of the code satisfies a threshold:

determining that the code requires repeated execution; and

in response to determining that the execution result of the code does not satisfy the threshold:

determining that the code does not require repeated execution.

18. The electronic device according to claim 12 , wherein in the code programs are compiled by performing compiling operations comprising:

determining that the maximum degree of parallelism is equal to 2; and

in response to determining that the maximum degree of parallelism is equal to 2:

executing code corresponding to a first downward jump; and

executing code corresponding to a second downward jump.

19. The electronic device according to claim 12 , wherein the type of data requests comprises an upward jump or a downward jump.

20. The electronic device according to claim 12 , wherein each of the parallel threads is assigned to an equally sized group of registers.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 10, 2020
From: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
To: ADVANCED NEW TECHNOLOGIES CO., LTD.
Reel/Frame 053754/0625 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 31, 2020
From: ALIBABA GROUP HOLDING LIMITED
To: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
Reel/Frame 053743/0464 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 13, 2020
From: MA, LING; ZHOU, WEI; HE, CHANGHUA
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 053489/0011 →