US 12,299,488 B2
Method and apparatus for segmenting GPU resources into virtual processing resource types and allocating to different target tasks
Zongqiang Zhang, Beijing (CN); Sikai Qi, Beijing (CN); Zhiyi Xia, Beijing (CN); Siyang Li, Beijing (CN); Shengli Liu, Beijing (CN); Zishuai Lou, Beijing (CN); Binbin Xu, Beijing (CN); Zherui Liu, Beijing (CN); and Jian Wang, Beijing (CN)
Assigned to BEIJING BYTEDANCE NETWORK TECHNOLOGY CO., LTD., Beijing (CN)
Filed by Beijing Bytedance Network Technology Co., Ltd., Beijing (CN)
Filed on Dec. 15, 2023, as Appl. No. 18/542,245.
Application 18/542,245 is a continuation of application No. PCT/CN2022/124608, filed on Oct. 11, 2022.
Claims priority of application No. 202111322466.X (CN), filed on Nov. 9, 2021.
Prior Publication US 2024/0118928 A1, Apr. 11, 2024
Int. Cl. G06F 9/50 (2006.01)
CPC G06F 9/5016 (2013.01) 19 Claims
OG exemplary drawing
 
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.