Method and apparatus for segmenting GPU resources into virtual processing resource types and allocating to different target tasks

US12299488B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-12299488-B2
Application numberUS-202318542245-A
CountryUS
Kind codeB2
Filing dateDec 15, 2023
Priority dateNov 9, 2021
Publication dateMay 13, 2025
Grant dateMay 13, 2025

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

The present disclosure provides a resource allocation method and apparatus, a readable medium and an electronic device. The method includes: acquiring a target resource type corresponding to a target task; acquiring a plurality of resource types of a target processor, wherein each resource type corresponds to one or more virtual processor resources of the target processor; determining a specified resource type that is identical to the target resource type from the plurality of resource types; determining a target processor resource from one or more virtual processor resources corresponding to the specified resource type; and allocating the target processor resource to the target task.

First claim

Opening claim text (preview).

The invention claimed is: 1. A resource allocation method, comprising: acquiring, by a computer, a target resource type corresponding to a target task, wherein the target task comprises at least one of a machine learning task and a multimedia encoding-decoding task; segmenting, by the computer, a target processor into a plurality of virtual processor resources corresponding to a plurality of resource types and generating meta information for each of the plurality of virtual processor resources, wherein the meta information includes a resource type of the virtual processor resource, resource identification of the virtual processor resource, resource status of the virtual processor resource and resource quantity of the virtual processor resource; acquiring, by the computer, the plurality of resource types of the target processor, wherein each resource type corresponds to one or more virtual processor resources of the target processor, and wherein the target processor is a graphical processing unit (GPU) and the plurality of resource types comprise a computing resource and an encoding-decoding resource; determining, by the computer, a specified resource type that is identical to the target resource type from the plurality of resource types; determining, by the computer, a target processor resource form one or more virtual processor resources corresponding to the specified resource type; and allocating, by the computer, the target processor resource to the target task; wherein the target processor further comprises shared processor resources, and the shared processor resources are used to process the machine learning task and the multimedia encoding-decoding task; the method further comprises: acquiring, by the computer, an idle number of the shared processor resources of the target processor, acquiring, by the computer, a required number of the shared processor resources corresponding to the target task, and allocating, by the computer, the shared processor resources for the target task according to the idle number and the required number, the method further comprises: in response to the target task being the multimedia encoding-decoding task, executing a task suspension operation to release shared processor resources currently used by the multimedia encoding-decoding task for use by the machine learning task, wherein the task suspension operation is used for suspending the multimedia encoding-decoding task for a preset suspension time; and scheduling the multimedia encoding-decoding task after a suspension time of the multimedia encoding-decoding task reaches the preset suspension time. 2. The method according to claim 1 , wherein determining the target processor resource from the one or more virtual processor resources corresponding to the specified resource type comprises: acquiring one or more idle processor resources without being subjected to task allocation from the one or more virtual processor resource corresponding to the specified resource type; and in a case where the number of the idle processor resources is one, taking the one idle processor resource as the target processor resource, or, in a case where the number of the idle processor resources is plural, selecting one of a plurality of idle processor resources as the target processor resource according to a preset selection rule. 3. The method according to claim 1 , wherein allocating the shared processor resources for the target task according to the idle number and the required number comprises: in a case where the idle number is greater than or equal to the required number, allocating one or more shared processor resources, a number of which is equal to the required number, to the target task. 4. The method according to claim 1 , wherein allocating the shared processor resources for the target task according to the idle number and the required number comprises: in a case where the idle number is less than the required number, acquiring a target difference between the required number and the idle number; acquiring one or more first candidate tasks from tasks currently using the shared processor resources of the target processor according to a task priority, wherein a task priority of each first candidate task of the one or more first candidate tasks is lower than a task priority of the target task; releasing the shared processor resources currently used by the one or more first candidate tasks so as to increase the idle number of the shared processor resources of the target processor; and in a case where an increased idle number of shared processor resources is greater than or equal to the required number, allocating the shared processor resources for the target task according to the required number; or, in a case where an increased idle number of shared processor resources is less than the required number, allocating the shared processor resources for the target task according to the increased idle number of shared processor resources. 5. The method according to claim 1 , wherein the method further comprises: for each target task, allocating a memory resource number corresponding to the target resource type to the target task according to a preset resource type-memory correspondence, wherein the preset resource type-memory correspondence comprises a preset correspondence between the target resource type and the memory resource number. 6. The method according to claim 1 , wherein the target resource type corresponding to the machine learning task is the computing resource, and the resource type corresponding to the multimedia encoding-decoding task is the encoding-decoding resource. 7. The method according to claim 2 , wherein selecting one of the plurality of idle processor resources as the target processor resource according to the preset selection rule comprises: randomly selecting one of the plurality of idle processor resources as the target processor resource in a case where the preset selection rule is random selection; or, selecting one idle processor resource with higher-ranking as the target processor resource according to a preset order of the idle processor resources in a case where the preset selection rule is sequential selection. 8. The method according to claim 4 , wherein acquiring the one or more first candidate tasks according to the task priority comprises: taking all tasks with task priorities lower than the task priority of the target task as second candidate tasks; and among the second candidate tasks, selecting third candidate tasks in sequence according to a usage number of shared processor resources in use from large to small until a sum value of the usage numbers of shared processor resources of the selected third candidate tasks is greater than or equal to the target difference, and taking the third candidate tasks as the first candidate tasks; or, until all the second candidate tasks are selected as the third candidate tasks, when a sum value of the usage numbers of shared processor resources of the third candidate tasks is still less than the target difference, and taking the second candidate tasks as the first candidate tasks. 9. The method according to claim 2 , wherein the target resource type corresponding to the machine learning task is the computing resource, and the resource type corresponding to the multimedia encoding-decoding task is the encoding-decoding resource. 10. The method according to claim 3 , wherein the target resource type corresponding to the machine learning task is the computing resource, and the resource type corresponding to the multimedia encoding-decoding task is the encoding-decoding resource. 11. The method according to claim 5 , wherein the ta

Assignees

Inventors

Classifications

  • G06F9/5016Primary

    the resource being the memory · CPC title

  • Logical partitioning of resources; Management or configuration of virtualized resources (specific details on emulation or internal functioning of virtual machines G06F9/455) · CPC title

  • the resource being a machine, e.g. CPUs, Servers, Terminals · CPC title

  • Pool · CPC title

  • G06F9/50Primary

    Allocation of resources, e.g. of the central processing unit [CPU] · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US12299488B2 cover?
The present disclosure provides a resource allocation method and apparatus, a readable medium and an electronic device. The method includes: acquiring a target resource type corresponding to a target task; acquiring a plurality of resource types of a target processor, wherein each resource type corresponds to one or more virtual processor resources of the target processor; determining a specifi…
Who is the assignee on this patent?
Beijing Bytedance Network Tech Co Ltd
What technology area does this patent fall under?
Primary CPC classification G06F9/5016. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue May 13 2025 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 5 related publications on this page (citations in our corpus or others sharing the same primary CPC).