IP Library › Granted Patent US 11,366,690
Granted Patent B2
US 11,366,690 · App. 16/700,879 · Granted Jun 21, 2022

Scheduling commands in a virtual computing environment

Inventors: Zhibin Xiao (San Mateo, CA); Chunsheng Liu (San Mateo, CA); Yuan Xie (San Mateo, CA)
Assignee: Alibaba Group Holding Limited
G06F9/4881G06F9/45558G06F9/52G06F13/4027G06F13/4282G06F2213/0026
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 11,366,690
App. No.
16/700,879
Granted
Jun 21, 2022
Kind
B2
Abstract

A method and an apparatus for scheduling commands in a virtual computing environment includes picking a command. It is determined whether the command is a synchronization command or a conditional command. A synchronization command is an independent command. A conditional command is a dependent command that depends on a synchronization command. In response to the command being determined as the synchronization command, a waiting queue is enabled for the command, the waiting queue storing conditional commands dependent on a running synchronization command. The command is dispatched to a processing engine.

Claims (92)

1. A method of scheduling commands in a virtual computing environment, the method performed by a heterogeneous acceleration processing unit (HAPU) and comprising:

picking a command received by the HAPU from a host unit separate from the HAPU;

determining whether the command is a synchronization command or a conditional command, wherein a synchronization command is an independent command and a conditional command is a dependent command that depends on a synchronization command;

in response to the command being determined as the synchronization command, enabling a waiting queue for the command, wherein the waiting queue is configured to store conditional commands dependent on a running synchronization command;

in response to the command being determined as the conditional command, comparing a virtual queue ID (VID) of the command with a running command status table, the running command status table comprising a VID for each dispatched command; and

dispatching the command to a processing engine.

2. The method of claim 1 , wherein enabling the waiting queue for the command comprises:

determining whether there is a waiting queue available; and

in response to there being a waiting queue available, enabling the waiting queue for the command.

3. The method of claim 2 , further comprising:

in response to there being a waiting queue available, comparing a virtual queue ID (VID) of the command with a running command status table, the running command status table comprising a VID for each dispatched command.

4. The method of claim 3 , further comprising:

in response to there being a waiting queue available,

determining whether there is another synchronization command in the running command status table having the same VID as the command; and

in response to there being another synchronization command in the running command status table having the same VID, clearing a latest synchronization field for the another synchronization command in the running command status table.

5. The method of claim 1 , further comprising:

in response to the command being determined as the synchronization command, updating a running command status table.

6. The method of claim 1 , further comprising:

in response to the command being determined as the conditional command,

determining whether there is a matched synchronization command in the running command status table having the same VID and having a latest synchronization field being set; and

in response to there being the matched synchronization command in the running command status table, pushing the conditional command to a waiting queue corresponding to the matched synchronization command.

7. The method of claim 1 , further comprising:

in response to the command being determined as the conditional command,

determining whether there is a matched synchronization command in the running command status table having the same VID and having a latest synchronization field being set; and

in response to there being no matched synchronization command in the running command status table,

determining whether a status field in a virtual queue command status table indicates an error; and

in response to the status field being determined not indicating an error, dispatching the command to a processing engine.

8. The method of claim 7 , further comprising:

in response to there being no matched synchronization command in the running command status table, updating a running command status table.

9. The method of claim 1 , further comprising:

in response to a synchronization command having a corresponding waiting queue is successfully performed,

picking a second command from the corresponding waiting queue;

updating a running command status table; and

dispatching the second command to a processing engine.

10. A heterogeneous acceleration processing unit (HAPU), comprising:

one or more physical queues for storing commands, wherein the commands are received by the HAPU from a host unit separate from the HAPU;

one or more waiting queues for storing commands;

one or more processing engines configured to perform commands;

a scheduler communicatively coupled with the one or more physical queues, the one or more waiting queues and the one or more processing engines, the scheduler being configured to:

pick a command from a physical queue of the one or more physical queues;

determine whether the command is a synchronization command or a conditional command, wherein a synchronization command is an independent command and a conditional command is a dependent command that depends on a synchronization command;

in response to the command being determined as the synchronization command, enable a waiting queue of the one or more waiting queues for the command, wherein the waiting queue is configured to store conditional commands dependent on a running synchronization command;

in response to the command being determined as the conditional command, comparing a virtual queue ID (VID) of the command with a running command status table, the running command status table comprising a VID for each dispatched command; and

dispatch the command to a processing engine of the one or more processing engines.

11. The HAPU of claim 10 , wherein the scheduler is configured to:

determine whether there is a waiting queue available in the one or more waiting queues; and

in response to there being a waiting queue available, enable the available waiting queue for the command.

12. The HAPU of claim 11 , wherein the scheduler is configured to:

in response to there being a waiting queue available, compare a virtual queue ID (VID) of the command with a running command status table, the running command status table comprising a VID for each dispatched command.

13. The HAPU of claim 12 , wherein the scheduler is configured to:

in response to there being a waiting queue available,

determine whether there is another synchronization command in the running command status table having the same VID as the command; and

in response to there being another synchronization command in the running command status table having the same VID, clear a latest synchronization field for the another synchronization command in the running command status table.

14. The HAPU of claim 10 , wherein the scheduler is configured to:

in response to the command being determined as the synchronization command, update a running command status table.

15. The HAPU of claim 10 , wherein the scheduler is configured to:

in response to the command being determined as the conditional command,

determine whether there is a matched synchronization command in the running command status table having the same VID and having a latest synchronization field being set; and

in response to there being the matched synchronization command in the running command status table, push the conditional command to a waiting queue corresponding to the matched synchronization command.

16. The HAPU of claim 15 , wherein the scheduler is configured to:

in response to there being no matched synchronization command in the running command status table,

determine whether a status field in a virtual queue command status table indicates an error; and

in response to the status field being determined not indicating an error, dispatch the command to a processing engine of the one or more processing engines.

17. The HAPU of claim 15 , wherein the scheduler is configured to:

in response to there being no matched synchronization command in the running command status table, update a running command status table.

18. The HAPU of claim 10 , wherein the scheduler is configured to:

in response to a synchronization command having a corresponding waiting queue is successfully performed,

pick a second command from the corresponding waiting queue;

update a running command status table; and

dispatch the second command to a processing engine of the one or more processing engines.

19. The HAPU of claim 10 , wherein the scheduler comprises:

a command decoder configured to decode commands;

a memory for storing data and tables;

a controller communicatively coupled with the command decoder and the memory and configured to schedule commands from the one or more physical queues and one or more waiting queues.

20. A terminal, comprising:

a host unit; and

a heterogeneous acceleration processing unit (HAPU) communicatively coupled with the host unit, comprising:

one or more physical queues for storing commands, wherein the commands are received by the HAPU from the host unit;

one or more waiting queues for storing commands;

one or more processing engines configured to perform commands;

a scheduler communicatively coupled with the one or more physical queues, the one or more waiting queues and the one or more processing engines, the scheduler being configured to:

pick a command from a physical queue of the one or more physical queues;

determine whether the command is a synchronization command or a conditional command, wherein a synchronization command is an independent command and a conditional command is a dependent command that depends on a synchronization command;

in response to the command being determined as the synchronization command, enable a waiting queue of the one or more waiting queues for the command, wherein the waiting queue is configured to store conditional commands dependent on a running synchronization command;

in response to the command being determined as the conditional command, comparing a virtual queue ID (VID) of the command with a running command status table, the running command status table comprising a VID for each dispatched command; and

dispatch the command to a processing engine of the one or more processing engines.

21. A non-transitory computer readable storage medium storing a set of instructions that are executable by one or more processing devices to cause a heterogeneous computation unit (HCU) to perform a method comprising:

picking a command received by the HCU from a host unit separate from the HCU;

determining whether the command is a synchronization command or a conditional command, wherein a synchronization command is an independent command and a conditional command is a dependent command that depends on a synchronization command;

in response to the command being determined as the synchronization command, enabling a waiting queue for the command, wherein the waiting queue is configured to store conditional commands dependent on a running synchronization command;

in response to the command being determined as the conditional command, comparing a virtual queue ID (VID) of the command with a running command status table, the running command status table comprising a VID for each dispatched command; and

dispatching the command to a processing engine.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 14, 2020
From: XIAO, ZHIBIN; LIU, CHUNSHENG; XIE, YUAN
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 054631/0057 →
Continuity (1)
Related Publication 20210165682A1 · Jun 3, 2021
Cited By (1)
US 12,346,610