Calling method, device and equipment of processor

By adding a convergence layer to the computing device, using the sum of the video memory capacity of multiple processors as the video memory capacity of the virtual processor, the problem of insufficient video memory of the processor is solved, and the resource utilization rate and universality of computing devices are improved.

CN120386616APending Publication Date: 2025-07-29HANGZHOU ALICLOUD FEITIAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410124323.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-29
Publication Date
2025-07-29

AI Technical Summary

Technical Problem

The insufficient memory capacity of existing processors results in low resource utilization of multiple processors in computing devices, making it difficult to apply to large-scale AI computing tasks.

Method used

By adding a fusion layer to the computing device, it is determined that the sum of the video memory capacity of multiple processors is the virtual video memory capacity of the virtual processor, and the call request of the target application is intercepted through the fusion layer, and multiple processors are called to process the request.

Benefits of technology

It improves the resource utilization rate of multiple processors in computing devices, realizes support for large AI computing tasks, and does not need to split the computing tasks, which improves the universality of computing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120386616A_ABST
    Figure CN120386616A_ABST
Patent Text Reader

Abstract

The invention provides a processor calling method, device and equipment, the method is applied to computing equipment, a plurality of processors are arranged in the computing equipment and correspond to virtual processors, and the method comprises the steps that virtual processor information of the virtual processors is sent to a target application through a fusion layer, the virtual processor information comprises the number of virtual processors and the size of a virtual video memory corresponding to the virtual processors, and the size of the virtual video memory is the sum of the sizes of video memories of the processors; and intercepting a calling request of the target application to the virtual processor through the fusion layer, and calling the plurality of processors to process the calling request. And the resource utilization rate of a plurality of processors in the computing equipment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers, and in particular, to a method, device, and equipment for calling a processor. Background Art

[0002] A processor can execute high-performance computing tasks such as graphics rendering and artificial intelligence (AI) model calculations. The video memory of the processor can store real-time data and calculation results during the execution of the computing tasks.

[0003] Currently, with the development of AI models, the amount of real-time data during the calculation process of AI models is continuously increasing. The capacity requirement of a single model calculation task for the video memory of the processor is getting higher and higher. However, the capacity of the video memory of most current processors is small, making it difficult for existing processors to be applied to emerging large-scale AI calculation tasks, resulting in low resource utilization of multiple processors in the computing device. Summary of the Invention

[0004] Multiple aspects of this application provide a method, device, and equipment for calling a processor to improve the resource utilization of multiple processors in a computing device.

[0005] In a first aspect, an embodiment of this application provides a method for calling a processor, which is applied to a computing device. Multiple processors are provided in the computing device, and the multiple processors correspond to virtual processors. The method includes:

[0006] Sending, through a fusion layer, virtual processor information of the virtual processor to a target application, where the virtual processor information includes the number of the virtual processors and the virtual video memory capacity corresponding to the virtual processors, and the virtual video memory capacity is the sum of the video memory capacities of the multiple processors;

[0007] Intercepting, through the fusion layer, a call request of the target application for the virtual processor, and calling the multiple processors to process the call request.

[0008] In a possible implementation manner, sending, through a fusion layer, virtual processor information of the virtual processor to a target application includes:

[0009] Intercepting, through the fusion layer, an information acquisition request of the target application, where the information acquisition request is used to request to acquire processor information of the multiple processors;

[0010] Determining the virtual processor information according to the information acquisition request, and sending the virtual processor information to the target application.

[0011] In a possible implementation manner, determining the virtual processor information according to the information acquisition request includes:

[0012] According to the information acquisition request, acquiring the processor information of the multiple processors in the computing device, where the processor information includes the video memory capacity in the processor;

[0013] Determining the virtual video memory capacity according to the processor information;

[0014] Determining the virtual processor information according to the virtual video memory capacity.

[0015] In a possible implementation manner, invoking the multiple processors to process the invocation request includes:

[0016] Determining the invocation type of the invocation request, where the invocation type includes at least one of the following: initialization type, video memory allocation type, data upload type, or execution type;

[0017] Invoking the multiple processors to process the invocation request according to the invocation type.

[0018] In a possible implementation manner, determining the invocation type of the invocation request includes:

[0019] Determining the application programming interface API invoked by the invocation request;

[0020] Determining the invocation type according to the API.

[0021] In a possible implementation manner, the invocation type is the initialization type; invoking the multiple processors to process the invocation request according to the invocation type includes:

[0022] Performing initialization processing on each processor according to the initialization type to obtain a runtime handle corresponding to each processor;

[0023] Generating a virtual runtime handle according to the runtime handle corresponding to each processor;

[0024] Sending the virtual runtime handle to the target application, where the virtual runtime handle is used for the target application to invoke the multiple processors.

[0025] In a possible implementation manner, the invocation type is the video memory allocation type, and the invocation request includes a target video memory capacity to be allocated; invoking the multiple processors to process the invocation request according to the invocation type includes:

[0026] Determine at least one storage space among the multiple processors according to the target video memory capacity, where the sum of the sizes of the at least one storage space is the target video memory capacity;

[0027] Generate a virtual address according to the physical address of the at least one storage space, and send the virtual address to the target application.

[0028] In a possible implementation manner, the call type is the upload data type, and the call request includes target data to be uploaded; according to the call type, call the multiple processors to process the call request, including:

[0029] Determine the virtual address allocated to the target application;

[0030] Determine at least one physical address corresponding to the virtual address, where the at least one physical address is the address of at least one storage space among the multiple video memories of the multiple processors;

[0031] Store the target data in the at least one storage space according to the at least one physical address.

[0032] In a possible implementation manner, the call type is the execution type, and the call request includes function parameters of a function to be called; according to the call type, call the multiple processors to process the call request, including:

[0033] Determine at least one first processor among the multiple processors according to the function parameters, where the to-be-processed data corresponding to the function to be called is stored in the video memory of the first processor;

[0034] Call the at least one first processor to execute the to-be-called function according to the runtime handle of the at least one first processor and the to-be-processed data, so as to process the call request.

[0035] In a possible implementation manner, the number of the at least one first processor is greater than 1; call the at least one first processor to execute the to-be-called function according to the runtime handle of the at least one first processor and the to-be-processed data, so as to process the call request, including:

[0036] Determine a target processor and a migration processor among the at least one first processor;

[0037] Migrate the to-be-processed data in the migration processor to the target processor;

[0038] Invoke the target processor according to the runtime handle of the target processor, so that the target processor processes the data to be processed through the function to be called and obtains a processing result.

[0039] In a possible implementation manner, the method further includes:

[0040] Obtain the processing result in the video memory of the target processor, and send the processing result to the target application.

[0041] In a possible implementation manner, the method further includes:

[0042] Release the video memory in the multiple processors allocated for the target application.

[0043] In a second aspect, an embodiment of the present application provides a calling device for a processor, which is applied to a computing device. Multiple processors are provided in the computing device, and the multiple processors correspond to virtual processors. The device includes: a sending module, an intercepting module, and a calling module, where

[0044] The sending module is configured to send, through a fusion layer, virtual processor information of the virtual processor to a target application. The virtual processor information includes the number of the virtual processors and the virtual video memory capacity corresponding to the virtual processors. The virtual video memory capacity is the sum of the video memory capacities of the multiple processors;

[0045] The intercepting module is configured to intercept, through the fusion layer, a call request of the target application to the virtual processor;

[0046] The calling module is configured to call the multiple processors to process the call request.

[0047] In a possible implementation manner, the sending module is specifically configured to

[0048] Intercept, through the fusion layer, an information acquisition request of the target application. The information acquisition request is used to request to acquire processor information of the multiple processors;

[0049] Determine the virtual processor information according to the information acquisition request, and send the virtual processor information to the target application.

[0050] In a possible implementation manner, the sending module is specifically configured to

[0051] Acquire, in the computing device, processor information of the multiple processors according to the information acquisition request. The processor information includes the video memory capacity in the processors;

[0052] Determine the virtual video memory capacity according to the processor information;

[0053] Determine the virtual processor information according to the virtual video memory capacity.

[0054] In a possible implementation manner, the calling module is specifically configured to,

[0055] Determine the call type of the call request, where the call type includes at least one of the following: initialization type, video memory allocation type, data upload type, or execution type;

[0056] According to the call type, call the multiple processors to process the call request.

[0057] In a possible implementation manner, the calling module is specifically configured to,

[0058] Determine the application programming interface API called by the call request;

[0059] Determine the call type according to the API.

[0060] In a possible implementation manner, the call type is the initialization type; the calling module is specifically configured to,

[0061] According to the initialization type, perform initialization processing on each processor to obtain a runtime handle corresponding to each processor;

[0062] Generate a virtual runtime handle according to the runtime handle corresponding to each processor;

[0063] Send the virtual runtime handle to the target application, and the virtual runtime handle is used for the target application to call the multiple processors.

[0064] In a possible implementation manner, the call type is the video memory allocation type, and the call request includes a target video memory capacity to be allocated; the calling module is specifically configured to,

[0065] According to the target video memory capacity, determine at least one storage space among the multiple processors, and the sum of the sizes of the at least one storage space is the target video memory capacity;

[0066] Generate a virtual address according to the physical address of the at least one storage space, and send the virtual address to the target application.

[0067] In a possible implementation manner, the call type is the data upload type, and the call request includes target data to be uploaded; the calling module is specifically configured to,

[0068] Determine the virtual address allocated for the target application;

[0069] Determine at least one physical address corresponding to the virtual address, where the at least one physical address is the address of at least one storage space in the multiple video memories of the multiple processors;

[0070] Store the target data in the at least one storage space according to the at least one physical address.

[0071] In a possible implementation manner, the call type is the execution type, and the call request includes function parameters of the function to be called; specifically, the call module is used for,

[0072] Determine at least one first processor among the multiple processors according to the function parameters, and the to-be-processed data corresponding to the function to be called is stored in the video memory of the first processor;

[0073] Call the at least one first processor to execute the function to be called according to the runtime handle of the at least one first processor and the to-be-processed data, so as to process the call request.

[0074] In a possible implementation manner, the number of the at least one first processor is greater than 1; specifically, the call module is used for,

[0075] Determine a target processor and a migration processor among the at least one first processor;

[0076] Migrate the to-be-processed data in the migration processor to the target processor;

[0077] Call the target processor according to the runtime handle of the target processor, so that the target processor processes the to-be-processed data through the function to be called to obtain a processing result.

[0078] In a possible implementation manner, the sending module is further used for,

[0079] Obtain the processing result in the video memory of the target processor and send the processing result to the target application.

[0080] In a possible implementation manner, the device further includes a release module, and the release module is used for,

[0081] Release the video memory in the multiple processors allocated for the target application.

[0082] In a third aspect, an embodiment of the present application provides an electronic device, including: a memory and a processor;

[0083] The memory stores computer-executable instructions;

[0084] The processor executes the computer-executable instructions stored in the memory, such that the processor executes the method according to any one of the first aspect.

[0085] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the method according to any one of the first aspect when being executed by a processor.

[0086] In a fifth aspect, an embodiment of the present application provides a computer program product including a computer program, which implements the method according to any one of the first aspect when being executed by a processor.

[0087] An embodiment of the present application provides a method, apparatus and device for calling a processor. A computing device may send virtual processor information of a virtual processor to a target application through a fusion layer, intercept a call request of the target application for the virtual processor through the fusion layer, and may call a plurality of processors to process the call request. Since the virtual video memory capacity may be the sum of the video memory capacities of a plurality of processors in the computing device, that is, the virtual video memory capacity is relatively large, the target application may directly call the virtual processor to execute a computing task without splitting the computing task, avoiding splitting the computing task according to a specific computing scenario and improving the generality of computing. In addition, in the above method, the call request of the target application for the virtual processor may be processed by a plurality of processors in the computing device, such that the plurality of processors in the computing device may be fully utilized, improving the resource utilization rate of the plurality of processors in the computing device. BRIEF DESCRIPTION OF THE DRAWINGS

[0088] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments and descriptions thereof of the present application are used to explain the present application and do not constitute an improper limitation to the present application. In the drawings:

[0089] Figure 1 is a schematic structural diagram of a computing device provided for an exemplary embodiment of the present application;

[0090] Figure 2 is a schematic flowchart of a method for calling a processor provided for an exemplary embodiment of the present application;

[0091] Figure 3 is a schematic structural diagram of another computing device provided for an exemplary embodiment of the present application;

[0092] Figure 4 is a schematic structural diagram of a system software layer provided for an exemplary embodiment of the present application;

[0093] Figure 5 A schematic flowchart of another method for calling a processor provided by an exemplary embodiment of the present application;

[0094] Figure 6 A schematic diagram of the generation process of a virtual runtime provided by an exemplary embodiment of the present application;

[0095] Figure 7 A schematic diagram of the process of establishing an address mapping relationship provided by an exemplary embodiment of the present application;

[0096] Figure 8 A schematic diagram of the process of storing target data provided by an exemplary embodiment of the present application;

[0097] Figure 9 A schematic diagram of the process of function execution provided by an exemplary embodiment of the present application;

[0098] Figure 10 A schematic flowchart of yet another method for calling a processor provided by an exemplary embodiment of the present application;

[0099] Figure 11 A schematic diagram of the structure of a device for calling a processor provided by an exemplary embodiment of the present application;

[0100] Figure 12 A schematic diagram of the structure of another device for calling a processor provided by an exemplary embodiment of the present application;

[0101] Figure 13 A schematic diagram of the structure of an electronic device provided by an exemplary embodiment of the present application. Detailed implementation manners

[0102] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant laws, regulations, and standards, and corresponding operation entrances are provided for the user to select authorization or rejection.

[0103] To make the objectives, technical solutions, and advantages of the present application clearer, the technical solutions of the present application will be clearly and completely described below in conjunction with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0104] For ease of understanding, the technical terms involved in the embodiments of the present application are first explained.

[0105] Graphics Processing Unit (GPU): Refers to a hardware device used for high-performance computing such as graphics rendering and Artificial Intelligence (AI) computing.

[0106] Video memory: Refers to the dedicated volatile memory inside the GPU. Video memory can be used to store real-time data and calculation results processed by the GPU. The capacity of the video memory determines the application scenarios of the GPU.

[0107] For ease of understanding, the following combines Figure 1 , and describes the computing device involved in the embodiments of the present application.

[0108] Figure 1 FIG. is a schematic structural diagram of a computing device provided by an exemplary embodiment of the present application. Please refer to Figure 1 , the computing device may include software and hardware. The software may include Application 1, Application 2... and Application m, and the hardware may include Processor 1, Processor 2... and Processor n. Each processor may include video memory (not shown in the figure). Among them, m is an integer greater than or equal to 1, and n is an integer greater than or equal to 2. For example, the application may be a GPU application, and the processor may be a GPU.

[0109] The computing device may be any electronic device including a Figure 1 similar structure therein. For example, the computing device may be a server, etc. The specific type and structure of the computing device in the embodiments of the present application are not limited. The computing device may include more or fewer software and more or fewer hardware than shown in the figure.

[0110] The application may call the processor to execute the computing task of the application. For example, the computing task may be an image processing task, an AI model calculation task, etc. Specifically, before executing the computing task, the computing device may store the computing data required for the computing task in the video memory of the processor. The processor may complete the computing task according to the computing data in the video memory and temporarily store the computing result in the video memory.

[0111] Currently, with the development of AI models, the amount of computing data required for AI model calculations is increasing continuously. The capacity requirement of a single AI model calculation task for video memory is getting larger and larger. However, the development and iteration speed of processor hardware lags significantly behind the development speed of AI models, and the existing processors with small video memory capacity cannot be fully utilized, resulting in low resource utilization of multiple processors in the computing device.

[0112] In the related art, to improve the resource utilization rate of multiple processors in a computing device, a single computing task of an application can be split into multiple subtasks, and the multiple subtasks can be assigned to different processors to complete a computing task through multiple processors. In the above method, the video memory of each processor only needs to store the computing data required for the corresponding subtask, and does not need to store all the computing data required for the computing task. In this way, processors with a smaller video memory capacity can also be utilized.

[0113] However, the splitting methods of computing tasks for different applications are different. In the actual implementation process, each application needs to analyze and split specific computing tasks according to specific computing scenarios, and cannot provide a general processing method for all computing tasks, resulting in poor generality of the above method.

[0114] To solve the above problems, in an embodiment of the present application, a fusion layer can be added in the computing device. The fusion layer can determine the sum of the video memory capacities of multiple processors in the computing device as the virtual video memory capacity of the virtual processor, and can send the virtual video memory capacity to the application, so that the application can determine that there is a processor (virtual processor) with a larger video memory capacity in the computing device and can call the virtual processor to execute the computing task. The fusion layer can also intercept the call request of the application to the virtual processor, and can call multiple processors in the computing device to process the call request of the application. In this way, the application can directly call the virtual processor with a larger video memory capacity to execute the computing task without splitting the computing task, and the above method is applicable to the computing tasks of any application in the computing device, with good generality. In addition, the fusion layer can call multiple processors in the computing device to process the call request of the application, improving the resource utilization rate of multiple processors in the computing device.

[0115] Next, the technical solutions shown in the present application will be described in detail through specific embodiments. It should be noted that the following several embodiments can exist independently or be combined with each other, and the same or similar content will not be repeated in different embodiments.

[0116] Figure 2 It is a schematic flowchart of a method for calling a processor provided for an exemplary embodiment of the present application. Please refer to Figure 2 and the method may include:

[0117] S201. Send the virtual processor information of the virtual processor to the target application through the fusion layer.

[0118] This embodiment is applied to a computing device, and multiple processors are provided in the computing device. Among them, multiple can be two or more. For example, the computing device can be a server or a computer, etc.

[0119] The fusion layer can be a layer structure added to the system software layer of the computing device.

[0120] Next, in combination with Figure 3 , the computing device involved in this embodiment will be described.

[0121] Figure 3 It is a schematic structural diagram of another computing device provided by an exemplary embodiment of the present application. Please refer to Figure 3 , the computing device can include an application layer, a system software layer, and a hardware layer.

[0122] The hardware layer can include processor 1, processor 2... and processor n, where n is an integer greater than or equal to 2. Each processor can include video memory ( Figure 3 not shown in the figure). For example, the processor can be a GPU.

[0123] The application layer can include application 1, application 2... and application m, where m is an integer greater than or equal to 1. The applications in the application layer can call the processor to execute computing tasks. For example, the application can be a GPU application.

[0124] The target application can be any one of the applications in the application layer.

[0125] The system software layer can include a fusion layer. The fusion layer can be used to collect the processor information of multiple processors in the computing device. The processor information can include: the number of processors, and the video memory capacity of the processors, etc. The fusion layer can also be used to send virtual processor information to the applications in the application layer. The virtual processor information includes: the number of virtual processors and the virtual video memory capacity corresponding to the virtual processors, and the virtual video memory capacity is the sum of the video memory capacities of multiple processors.

[0126] The virtual processor can be a virtual device presented by the fusion layer to the applications in the application layer.

[0127] In this embodiment, multiple processors correspond to virtual processors. That is to say, two or more processors correspond to one virtual processor.

[0128] In one example, all the processors in the computing device correspond to one virtual processor. In this example, the number of virtual processors can be one, and the virtual video memory capacity corresponding to the virtual processor can be the sum of the video memory capacities of all the processors in the computing device.

[0129] In this example, the virtual video memory capacity corresponding to the virtual processor is relatively large, and the virtual processor can be applied to scenarios with a large demand for video memory capacity, so that the resource utilization rate of the virtual processor is relatively high.

[0130] In another example, multiple processors in a computing device correspond to a virtual processor, and the number of virtual processors is less than the number of processors in the computing device. In this example, the virtual video memory capacity corresponding to the virtual processor can be the sum of the video memory capacities of the multiple processors corresponding to the virtual processor.

[0131] In this example, the number of processors is relatively large, and the multiple processors can process computing tasks in parallel, resulting in a relatively high processing efficiency of the computing tasks.

[0132] S202. Intercept the call request of the target application to the virtual processor through the fusion layer.

[0133] In this embodiment, the target application can issue a call request to the virtual processor by calling an Application Programming Interface (API). The API can be set in the system software layer.

[0134] Next, in combination with Figure 4 , the API will be described.

[0135] Figure 4 FIG. is a schematic structural diagram of a system software layer provided by an exemplary embodiment of the present application. Figure 4 The shown system software layer can be Figure 3 the system software layer of the computing device provided by the embodiment. Please refer to Figure 4 , the system software layer can include a fusion layer and a user-mode driver layer.

[0136] The user-mode driver layer can include multiple APIs. For example, the multiple APIs can be API1, API2, and API3, etc. The multiple APIs included in the user-mode driver layer can be the APIs provided by the processor manufacturer and exposed to the application layer.

[0137] Specifically, the processor manufacturer can encapsulate different operations on the processor hardware into different APIs. The target application can perform different operations on the processor hardware by calling the APIs.

[0138] Exemplarily, assuming that the processor manufacturer encapsulates the operation of applying for video memory space in the processor as API3. Then the target application can apply for video memory space in the processor by calling API3.

[0139] The fusion layer can also include multiple APIs. For example, the multiple APIs can be API1, API2, and API3, etc. Some of the multiple APIs in the fusion layer can be the same as those in the user-mode driver layer.

[0140] Specifically, the user-mode driver layer may include two types of APIs. The first type of API may be related to the number of processors in the computing device and the use of video memory in the processors; the second type of API may be unrelated to the number of processors in the computing device and the use of video memory in the processors. In this embodiment, the multiple APIs included in the fusion layer may be the first type of API. That is to say, the user-mode driver layer may include the first type of API and the second type of API, and the fusion layer may include the first type of API.

[0141] In this embodiment, for any first-type API, if the caller calls the API from the user-mode driver layer, it can be considered that the caller applies to operate on the processor; if the caller calls the API from the fusion layer, it can be considered that the caller applies to operate on the virtual processor. For example, the caller may be a target application.

[0142] Exemplarily, assume that API3 can be used to apply for video memory space. If the target application calls API3 from the user-mode driver layer, it can be considered that the target application applies for the video memory space in the processor. If the target application calls API3 from the fusion layer, it can be considered that the target application applies for the virtual video memory space in the virtual processor.

[0143] In this embodiment, the call priority of the APIs in the fusion layer is higher than that of the APIs in the user-mode driver layer.

[0144] Specifically, for any first-type API, if the target application calls the API, the computing device can enable the target application to preferentially call the API from the fusion layer, so that the fusion layer can intercept the call request of the target application.

[0145] It should be noted that the API called by the target application to complete the computing task may be the first type of API. That is to say, the target application can call the API from the fusion layer to complete the computing task. The target application can call the second type of API from the user-mode driver layer to avoid excessive overhead of the fusion layer.

[0146] S203. Call multiple processors to process the call request.

[0147] In this embodiment, the call request of the target application for the virtual processor can be processed by the processor.

[0148] Specifically, after the target application issues a call request for the virtual processor by calling the API in the fusion layer, the computing device can call the corresponding API in the user-mode driver layer through the fusion layer, so that the processor can process the call request.

[0149] Exemplarily, assume that API3 can be used to apply for video memory space, and both the fusion layer and the user-mode driver layer include API3. After the target application calls API3, the computing device can intercept the call request of the target application through the fusion layer, and can call API3 in the user-mode driver layer through the fusion layer, so that the processor can allocate video memory space for the target application.

[0150] In this embodiment, the computing device can send the virtual processor information of the virtual processor to the target application through the fusion layer, intercept the call request of the target application to the virtual processor through the fusion layer, and can call multiple processors to process the call request. Since the virtual video memory capacity can be the sum of the video memory capacities of multiple processors in the computing device, that is, the virtual video memory capacity is relatively large, the target application can directly call the virtual processor to execute the computing task without splitting the computing task, avoiding splitting the computing task according to the specific computing scenario and improving the generality of the computing. In addition, in the above method, multiple processors in the computing device can be used to process the call request of the target application to the virtual processor, so that multiple processors in the computing device can be fully utilized, and the resource utilization rate of multiple processors in the computing device is improved.

[0151] Next, based on the above Figure 2 shown embodiment, combined with Figure 5 , the method of sending virtual processor information to the target application through the fusion layer and the method of calling multiple processors to process the call request will be described in detail.

[0152] Figure 5 It is a schematic flowchart of another method for calling a processor provided by an exemplary embodiment of the present application. Please refer to Figure 5 , the method may include:

[0153] S501. Intercept the information acquisition request of the target application through the fusion layer.

[0154] The information acquisition request is used to request to obtain the processor information of multiple processors.

[0155] The processor information may include the number of processors and the video memory capacity of the processors, etc.

[0156] In this embodiment, the target application can request to obtain the processor information by calling an API. For example, the target application can call the API for obtaining the processor information to achieve the purpose of obtaining the processor information.

[0157] It should be noted that since the API for obtaining processor information is the first type of API described in S202, if the target application calls the API for obtaining processor information, the computing device can enable the target application to preferentially call the API from the fusion layer, so that the fusion layer can intercept the information acquisition request of the target application.

[0158] S502. Determine virtual processor information according to the information acquisition request.

[0159] The virtual processor information may include the number of virtual processors and the virtual video memory capacity corresponding to the virtual processors.

[0160] In this embodiment, according to the information acquisition request, the processor information of multiple processors can be obtained in the computing device, where the processor information includes the video memory capacity in the processor; according to the processor information, the virtual video memory capacity is determined; and according to the virtual video memory capacity, the virtual processor information is determined.

[0161] Specifically, the API for obtaining processor information in the user-mode driver layer can be called through the fusion layer to obtain the number of multiple processors and the video memory capacity of each processor. The correspondence between multiple processors and virtual processors can be determined through the fusion layer, and the number of virtual processors and the virtual video memory capacity can be determined according to the correspondence, the number of multiple processors, and the video memory capacity of each processor.

[0162] In this embodiment, it can be determined that one virtual processor corresponds to all the processors in the computing device, so the number of virtual processors can be one, and the virtual video memory capacity can be the sum of the video memory capacities of all the processors in the computing device.

[0163] S503. Send the virtual processor information to the target application.

[0164] In this embodiment, the computing device can send the number of virtual processors and the virtual video memory capacity corresponding to the virtual processors to the target application through the fusion layer, so that the target application can know the virtual video memory capacity.

[0165] S504. Intercept the call request of the target application for the virtual processor through the fusion layer.

[0166] It should be noted that the specific implementation manner of S504 can refer to S202 and will not be elaborated here.

[0167] S505. Determine the call type of the call request.

[0168] In this embodiment, the API called by the call request can be determined; and according to the API, the call type is determined.

[0169] Specifically, there is a preset correspondence between the API and the call type. The preset correspondence may include multiple APIs and the call type corresponding to each API. The computing device may determine the call type of the call request based on the API called by the call request and the preset correspondence.

[0170] In the specific implementation process, the API called by the call request may be searched for in the preset correspondence, and the call type corresponding to the API called by the call request in the preset correspondence may be determined as the call type of the call request.

[0171] In this embodiment, the call type may at least include the following four cases:

[0172] Case 1: The call type is the initialization type.

[0173] In this case, the call request may be used to request the generation of the virtual runtime (context) of the virtual processor and obtain the virtual runtime handle of the virtual runtime, so that the target application can call the corresponding function according to the virtual runtime handle.

[0174] Case 2: The call type is the video memory allocation type.

[0175] In this case, the call request may be used to request the application for the virtual video memory space of the virtual processor, so as to store the target data into the virtual video memory space. The target data may be the data required for executing the computing task.

[0176] In this case, the call request may include the target video memory capacity to be allocated. The target video memory capacity may be the capacity size of the virtual video memory space requested to be applied for.

[0177] Case 3: The call type is the data upload type.

[0178] In this case, the call request may be used to request to store the target data into the virtual video memory space, so that the virtual processor can execute the computing task according to the target data.

[0179] In this case, the call request may include the target data to be uploaded.

[0180] Case 4: The call type is the execution type.

[0181] In this case, the call request may be used to call a function so that the virtual processor executes the corresponding function.

[0182] In this case, the call request may include the function parameters of the function to be called. The function parameters may include the virtual runtime handle and the virtual video memory address used.

[0183] The function to be called can be a computing function inside the processor.

[0184] S506. Process the call request by calling multiple processors according to the call type.

[0185] In this embodiment, after the fusion layer intercepts the call request of the target application to the virtual processor, it can call multiple processors to process the call request, so as to achieve the purpose of processing the call request of the target application by multiple processors in the computing device.

[0186] In this embodiment, if the call types are different, the methods of calling multiple processors to process the call request are also different. Processing the call request by calling multiple processors according to the call type can at least include the following four cases:

[0187] Case 1. The call type is the initialization type.

[0188] In this case, each processor can be initialized according to the initialization type to obtain the runtime handle corresponding to each processor; a virtual runtime handle can be generated according to the runtime handle corresponding to each processor; and the virtual runtime handle is sent to the target application, and the virtual runtime handle is used for the target application to call multiple processors.

[0189] The virtual runtime handle can be the runtime handle of the virtual processor.

[0190] In this embodiment, there is a mapping relationship between the virtual runtime handle and the runtime handle of each processor.

[0191] Specifically, a runtime can be established for each processor corresponding to the virtual processor according to the call request to obtain the runtime handle corresponding to each processor, and a virtual runtime handle can be generated according to the corresponding relationship between the virtual processor and multiple processors and the runtime handle corresponding to each processor.

[0192] Next, taking a computing device including two processors (GPU1 and GPU2), and these two processors corresponding to the virtual processor as an example, combined with Figure 6 , the process of generating the virtual runtime handle will be described.

[0193] Figure 6 FIG. is a schematic diagram of the generation process of a virtual runtime provided by an exemplary embodiment of the present application. Please refer to Figure 6 , assuming that the runtime handle of the runtime generated for GPU1 is runtime 1, and the runtime handle of the runtime generated for GPU2 is runtime 2.

[0194] As Figure 6As shown, the fusion layer can obtain the runtime handle of GPU1 during runtime (i.e., runtime 1) and the runtime handle of GPU2 during runtime (i.e., runtime 2), and can also generate the runtime handle of the virtual processor (i.e., virtual runtime) based on the obtained runtime handles. That is to say, there is a corresponding relationship between the virtual runtime and runtime 1 and runtime 2.

[0195] Case 2: The call type is the video memory allocation type.

[0196] In this case, at least one storage space can be determined among multiple processors according to the target video memory capacity, and the sum of the sizes of at least one storage space is the target video memory capacity; a virtual address is generated based on the physical addresses of at least one storage space, and the virtual address is sent to the target application.

[0197] At least one storage space can be the storage space on at least one processor's video memory. At least one storage space can be the free storage space on the processor's video memory.

[0198] Specifically, the computing device can determine at least one storage space through the fusion layer according to the available space in multiple processors' video memories, and can establish an address mapping relationship between the physical address and the virtual address of at least one storage space.

[0199] Next, taking a computing device that includes two processors (GPU1 and GPU2), and these two processors corresponding to a virtual processor as an example, combined with Figure 7 , the process of establishing the address mapping relationship will be described.

[0200] Figure 7 It is a schematic diagram of a process for establishing an address mapping relationship provided by an exemplary embodiment of the present application. Please refer to Figure 7 , assuming that at least one storage space is storage space 1 in GPU1 and storage space 2 in GPU2.

[0201] As Figure 7 shown, the fusion layer can obtain the physical address of storage space 1 and the physical address of storage space 2, can determine the virtual address corresponding to the physical addresses of storage space 1 and storage space 2, and can also send the virtual address to the target application.

[0202] Case 3: The call type is the data upload type.

[0203] In this case, determine the virtual address allocated to the target application; determine at least one physical address corresponding to the virtual address, and at least one physical address is the address of at least one storage space in multiple video memories of multiple processors; store the target data in at least one storage space according to at least one physical address.

[0204] Specifically, in this case, the call request may include the target data to be uploaded. The computing device may determine at least one physical address corresponding to the virtual address according to the virtual address and the address mapping relationship, and may store the target data in the video memory space corresponding to the at least one physical address.

[0205] Next, taking the computing device including two processors (GPU1 and GPU2), and the two processors corresponding to virtual processors as an example, in combination with Figure 8 , the process of storing the target data will be described.

[0206] Figure 8 FIG. is a schematic diagram of a process for storing target data provided by an exemplary embodiment of the present application. Please refer to Figure 8 , assuming that the at least one physical address corresponding to the virtual address is the physical address of storage space 1 and the physical address of storage space 2.

[0207] As Figure 8 shown, the target application may send the target data to the fusion layer through a call request. The fusion layer may determine at least one physical address according to the virtual address and the address mapping relationship, and may store the target data in the video memory space corresponding to the at least one physical address.

[0208] Case 4: The call type is an execution type.

[0209] In this case, at least one first processor may be determined among multiple processors according to the function parameters, and the data to be processed corresponding to the function to be called is stored in the video memory of the first processor; according to the runtime handle of the at least one first processor and the data to be processed, the at least one first processor is called to execute the function to be called, so as to implement processing the call request.

[0210] The function parameters may include a virtual runtime handle and a virtual video memory address used. The computing device may determine the video memory address of the processor corresponding to the virtual video memory address and determine the runtime handle of the processor corresponding to the virtual runtime handle through the fusion layer. The video memory address of the processor corresponding to the virtual video memory address may include the addresses in the video memory of the at least one first processor. The runtime handle of the processor corresponding to the virtual runtime may include the runtime handles of the at least one first processor.

[0211] In this embodiment, if the number of at least one first processor is 1, the computing device may call the first processor to execute the function to be called according to the runtime handle of the first processor and the data to be processed stored in the video memory of the first processor. If the number of at least one first processor is greater than 1, a target processor and a migration processor may be determined among the at least one first processor; the data to be processed in the migration processor is migrated to the target processor; the target processor is called according to the runtime handle of the target processor, so that the target processor processes the data to be processed through the function to be called to obtain a processing result.

[0212] It should be noted that if the number of at least one first processor is greater than 1, a target processor and a migration processor may be determined among the at least one first processor according to a preset migration policy. The preset migration policy can be set according to actual needs, and this embodiment does not limit this.

[0213] Next, taking a computing device including two processors (GPU1 and GPU2), where the two processors correspond to virtual processors as an example, in combination with Figure 9 , the case where the number of at least one first processor is greater than 1 will be described.

[0214] Figure 9 It is a schematic diagram of the process of function execution provided by an exemplary embodiment of the present application. Please refer to Figure 9 , assuming that at least one first processor is GPU1 and GPU2, the target processor is GPU2, the migration processor is GPU1, the data to be processed in GPU1 is stored in storage space 1, storage space 3 in GPU3 is an idle storage space, and the capacity of storage space 3 is greater than or equal to that of storage space 1. Then, the data to be processed in storage space 1 can be migrated to storage space 3. The computing device may call GPU2 to execute the function to be called according to the runtime handle of GPU2 and the data to be processed stored in GPU2.

[0215] It should be noted that after migrating the data to be processed in storage space 1 to storage space 3, the address mapping relationship between the physical address and the virtual address of at least one storage space may be updated to ensure the accuracy of the address mapping relationship. In this method, the video memories of multiple processors can be dynamically scheduled and used, so that the resource utilization rate of the processors is relatively high.

[0216] Optionally, after migrating the data to be processed in storage space 1 to storage space 3, storage space 1 may also be released so that storage space 1 can be reused, resulting in a relatively high space utilization rate of the storage space.

[0217] Optionally, in this case, the processing result can also be obtained from the video memory of the target processor and sent to the target application. Specifically, after the target processor executes the function to be called, the processing result can be stored in the video memory of the target processor. The computing device can obtain the processing result from the video memory of the target processor through the fusion layer and send the processing result to the target application.

[0218] Optionally, after sending the processing result to the target application, the video memory in multiple processors allocated for the target application can also be released, so that other applications can use the multiple processors, improving the resource utilization rate of the processors.

[0219] In the embodiments of the present application, the computing device can intercept the information acquisition request of the target application through the fusion layer, determine the virtual processor information according to the information acquisition request, send the virtual processor information to the target application, intercept the call request of the target application to the virtual processor through the fusion layer, determine the call type of the call request, and call multiple processors to process the call request according to the call type. Through the above method, the target application can be made aware of the virtual processor with a large virtual video memory capacity in the computing device, and the target application can directly call the virtual processor to execute the computing task without splitting the computing task, avoiding splitting the computing task according to the specific computing scenario and improving the generality of the computing. In addition, in the above method, the call request of the target application to the virtual processor can be processed by multiple processors in the computing device, so that the processor resources in the computing device can be fully utilized and the utilization rate of the processors is improved.

[0220] Next, taking the example that the computing device includes two processors (GPU1 and GPU2), and the two processors correspond to virtual processors, the method for calling the processor provided in the embodiments of the present application will be further described in detail with reference to FIG. 10 by way of a specific example. Figure 10 It is a schematic flowchart of another method for calling a processor provided in an exemplary embodiment of the present application.

[0221] As shown in Figure 10 ① in the figure, the computing device can determine the virtual processor information through the fusion layer according to the GPU1 processor information and the GPU2 processor information, and send the processor information to the target application.

[0222] After sending the processor information to the target application, the initialization type call request of the target application to the virtual processor can be intercepted through the fusion layer.

[0223] As shown in Figure 10As shown in ② in [reference], the computing device can establish runtimes for GPU1 and GPU2 respectively through the fusion layer. It can generate the runtime handle of the virtual processor (i.e., the virtual runtime) based on the runtime handle of the runtime of GPU1 (i.e., runtime 1) and the runtime handle of the runtime of GPU2 (i.e., runtime 2), and can send the virtual runtime handle to the target application.

[0224] After sending the virtual runtime handle to the target application, the fusion layer can intercept the request of the target application for the video memory allocation type call of the virtual processor.

[0225] As Figure 10 shown in ③ in [reference], based on the video memory allocation type call request, it can be determined that at least one storage space is storage space 1 in GPU1 and storage space 2 in GPU2. It can be determined that the virtual address corresponds to the physical address of storage space 1 and the physical address of storage space 2, and the virtual address can be sent to the target application.

[0226] After sending the virtual address to the target application, the fusion layer can intercept the request of the target application for the upload data type call of the virtual processor.

[0227] As Figure 10 shown in ④ in [reference], the fusion layer can store the target data in storage space 1 and storage space 2.

[0228] After storing the target data in storage space 1 and storage space 2, the fusion layer can intercept the request of the target application for the execution type call of the virtual processor.

[0229] As Figure 10 shown in ⑤ in [reference], the data to be processed stored in GPU1 can be migrated to GPU2, and the function to be called can be executed through GPU2.

[0230] As Figure 10 shown in ⑥ in [reference], after GPU2 executes the function to be called, the processing result can be stored in the video memory of GPU2. The computing device can send the processing result to the target application through the fusion layer.

[0231] Figure 11 This is a schematic structural diagram of a calling device for a processor provided by an exemplary embodiment of the present application. The calling device for the processor is applied in a computing device, and multiple processors are set in the computing device, and the multiple processors correspond to a virtual processor. Please refer to Figure 11 , the calling device 10 for the processor includes: a sending module 11, an intercepting module 12, and a calling module 13, where,

[0232] The sending module 11 is configured to send the virtual processor information of the virtual processor to the target application through the fusion layer, where the virtual processor information includes the number of the virtual processors and the virtual video memory capacity corresponding to the virtual processors, and the virtual video memory capacity is the sum of the video memory capacities of the multiple processors;

[0233] The interception module 12 is configured to intercept the call request of the target application to the virtual processor through the fusion layer;

[0234] The calling module 13 is configured to call the multiple processors to process the call request.

[0235] The calling device of the processor provided by the embodiments of the present application can execute the technical solutions shown in the above method embodiments, and the implementation principles and beneficial effects are similar, and will not be elaborated here.

[0236] In a possible implementation manner, the sending module 11 is specifically configured to,

[0237] Intercept the information acquisition request of the target application through the fusion layer, where the information acquisition request is used to request to acquire the processor information of the multiple processors;

[0238] Determine the virtual processor information according to the information acquisition request, and send the virtual processor information to the target application.

[0239] In a possible implementation manner, the sending module 11 is specifically configured to,

[0240] Acquire the processor information of the multiple processors in the computing device according to the information acquisition request, where the processor information includes the video memory capacity in the processor;

[0241] Determine the virtual video memory capacity according to the processor information;

[0242] Determine the virtual processor information according to the virtual video memory capacity.

[0243] In a possible implementation manner, the calling module 13 is specifically configured to,

[0244] Determine the call type of the call request, where the call type includes at least one of the following: initialization type, video memory allocation type, data upload type, or execution type;

[0245] Call the multiple processors to process the call request according to the call type.

[0246] In a possible implementation manner, the calling module 13 is specifically configured to,

[0247] Determine the application programming interface (API) invoked by the call request;

[0248] Determine the call type according to the API.

[0249] In a possible implementation manner, the call type is the initialization type; specifically, the call module 13 is configured to,

[0250] Initialize each processor according to the initialization type to obtain a runtime handle corresponding to each processor;

[0251] Generate a virtual runtime handle according to the runtime handle corresponding to each processor;

[0252] Send the virtual runtime handle to the target application, where the virtual runtime handle is used for the target application to call the multiple processors.

[0253] In a possible implementation manner, the call type is the video memory allocation type, and the call request includes a target video memory capacity to be allocated; specifically, the call module 13 is configured to,

[0254] Determine at least one storage space among the multiple processors according to the target video memory capacity, and the sum of the sizes of the at least one storage space is the target video memory capacity;

[0255] Generate a virtual address according to the physical addresses of the at least one storage space and send the virtual address to the target application.

[0256] In a possible implementation manner, the call type is the data upload type, and the call request includes target data to be uploaded; specifically, the call module 13 is configured to,

[0257] Determine the virtual address allocated to the target application;

[0258] Determine at least one physical address corresponding to the virtual address, where the at least one physical address is the address of at least one storage space among the multiple video memories of the multiple processors;

[0259] Store the target data in the at least one storage space according to the at least one physical address.

[0260] In a possible implementation manner, the call type is the execution type, and the call request includes function parameters of a function to be called; specifically, the call module 13 is configured to,

[0261] Determine at least one first processor among the multiple processors according to the function parameter, where the data to be processed corresponding to the function to be called is stored in the video memory of the first processor;

[0262] Call the at least one first processor to execute the function to be called according to the runtime handle of the at least one first processor and the data to be processed, so as to process the call request.

[0263] In a possible implementation manner, the number of the at least one first processor is greater than 1; specifically, the calling module 13 is configured to,

[0264] Determine a target processor and a migration processor among the at least one first processor;

[0265] Migrate the data to be processed in the migration processor to the target processor;

[0266] Call the target processor according to the runtime handle of the target processor, so that the target processor processes the data to be processed through the function to be called to obtain a processing result.

[0267] In a possible implementation manner, the sending module 11 is further configured to,

[0268] Obtain the processing result in the video memory of the target processor and send the processing result to the target application.

[0269] The calling device of the processor provided by the embodiments of the present application can execute the technical solutions shown in the above method embodiments, and its implementation principles and beneficial effects are similar, and will not be described in detail here.

[0270] Figure 12 FIG. is a structural schematic diagram of another calling device of a processor provided by an exemplary embodiment of the present application. Please refer to Figure 12 , on the basis of the embodiment shown in Figure 11 , the calling device 10 of the processor further includes: a release module 14, where

[0271] The release module 14 is configured to release the video memory in the multiple processors allocated for the target application.

[0272] The calling device of the processor provided by the embodiments of the present application can execute the technical solutions shown in the above method embodiments, and its implementation principles and beneficial effects are similar, and will not be described in detail here.

[0273] Figure 13 FIG. is a structural schematic diagram of an electronic device provided by an exemplary embodiment of the present application. Please refer to Figure 13, the electronic device 20 may include a processor 21 and a memory 22. Exemplarily, the processor 21 and the memory 22 are interconnected with each other through a bus 23.

[0274] The memory 22 stores computer-executable instructions;

[0275] The processor 21 executes the computer-executable instructions stored in the memory 22, so that the processor 21 executes the method as shown in the above method embodiment.

[0276] Figure 13 The electronic device shown in may be the computing device described in any of the above embodiments.

[0277] Correspondingly, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, they are used to implement the method described in the above method embodiment.

[0278] Correspondingly, an embodiment of the present application may further provide a computer program product, including a computer program, and when the computer program is executed by a processor, it can implement the method shown in the above method embodiment.

[0279] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes.

[0280] The present invention is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of processes and / or blocks in the flowchart and / or block diagram can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0281] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction device that implements the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 specified in one block or multiple blocks.

[0282] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operational steps are performed on the computer or other programmable device to produce a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 specified in one block or multiple blocks.

[0283] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.

[0284] The memory may include non-permanent memory in the form of computer-readable media, random access memory (RAM), and / or non-volatile memory such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.

[0285] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can store information by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory, or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD), or other optical storage, magnetic cassettes, magnetic tape disk storage, or other magnetic storage devices, or any other non-transitory media that can store information accessible by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media such as modulated data signals and carrier waves.

[0286] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or apparatus comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or elements inherent to such process, method, article or apparatus. Without further limitation, an element defined by the phrase "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising the element.

[0287] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.

Claims

1. A method for invoking a processor, characterized in that Applied to a computing device, where multiple processors are provided in the computing device, and the multiple processors correspond to virtual processors. The method includes: Sending, through a fusion layer, virtual processor information of the virtual processors to a target application, where the virtual processor information includes the number of the virtual processors and the virtual video memory capacity corresponding to the virtual processors, and the virtual video memory capacity is the sum of the video memory capacities of the multiple processors; Intercepting, through the fusion layer, a call request of the target application to the virtual processors, and invoking the multiple processors to process the call request.

2. The method according to claim 1, wherein Sending, through a fusion layer, the virtual processor information of the virtual processors to a target application includes: Intercepting, through the fusion layer, an information acquisition request of the target application, where the information acquisition request is used to request to acquire processor information of the multiple processors; Determining the virtual processor information according to the information acquisition request, and sending the virtual processor information to the target application.

3. The method according to claim 2, characterized in that Determining the virtual processor information according to the information acquisition request includes: Acquiring, in the computing device according to the information acquisition request, processor information of the multiple processors, where the processor information includes the video memory capacity in the processors; Determining the virtual video memory capacity according to the processor information; Determining the virtual processor information according to the virtual video memory capacity.

4. The method according to any one of claims 1 to 3, characterized in that, Invoking the multiple processors to process the call request includes: Determining the call type of the call request, where the call type includes at least one of the following: initialization type, video memory allocation type, data upload type, or execution type; Invoking the multiple processors to process the call request according to the call type.

5. The method according to claim 4, characterized in that Determining the call type of the call request includes: Determining the application programming interface (API) called by the call request; Determining the call type according to the API.

6. The method according to claim 4 or 5, characterized in that The call type is the initialization type; Invoking the multiple processors to process the call request according to the call type includes: Performing initialization processing on each processor according to the initialization type to obtain a runtime handle corresponding to each processor; Generating a virtual runtime handle according to the runtime handle corresponding to each processor; Sending the virtual runtime handle to the target application, where the virtual runtime handle is used for the target application to call the multiple processors.

7. The method according to claim 4 or 5, characterized in that The call type is the video memory allocation type, and the call request includes a target video memory capacity to be allocated; Invoking the multiple processors to process the call request according to the call type includes: Determining at least one storage space in the multiple processors according to the target video memory capacity, where the sum of the sizes of the at least one storage space is the target video memory capacity; Generating a virtual address according to the physical address of the at least one storage space, and sending the virtual address to the target application.

8. The method according to claim 4 or 5, characterized in that, The call type is the data upload type, and the call request includes target data to be uploaded; Invoking the multiple processors to process the invocation request according to the invocation type, including: Determining a virtual address allocated to the target application; Determining at least one physical address corresponding to the virtual address, where the at least one physical address is an address of at least one storage space in the multiple video memories of the multiple processors; Storing the target data in the at least one storage space according to the at least one physical address.

9. The method according to claim 4 or 5, characterized in that, The invocation type is the execution type, and the invocation request includes function parameters of a function to be invoked; Invoking the multiple processors to process the invocation request according to the invocation type, including: Determining at least one first processor among the multiple processors according to the function parameters, where the to-be-processed data corresponding to the function to be invoked is stored in the video memory of the first processor; Invoking the at least one first processor to execute the function to be invoked according to the runtime handle of the at least one first processor and the to-be-processed data, so as to process the invocation request.

10. The method according to claim 9, wherein The number of the at least one first processor is greater than 1; invoking the at least one first processor to execute the function to be invoked according to the runtime handle of the at least one first processor and the to-be-processed data, so as to process the invocation request, including: Determining a target processor and a migration processor among the at least one first processor; Migrating the to-be-processed data in the migration processor to the target processor; Invoking the target processor according to the runtime handle of the target processor, so that the target processor processes the to-be-processed data through the function to be invoked to obtain a processing result.

11. The method according to claim 10, characterized in that, The method further includes: Obtaining the processing result in the video memory of the target processor and sending the processing result to the target application.

12. The method according to claim 11, wherein The method further includes: Releasing the video memory in the multiple processors allocated to the target application.

13. A calling device for a processor, characterized in that, Applied to a computing device, where multiple processors are provided in the computing device, and the multiple processors correspond to virtual processors. The device includes: a sending module, an intercepting module, and an invoking module, where The sending module is configured to send virtual processor information of the virtual processor to a target application through a fusion layer, where the virtual processor information includes the number of the virtual processors and the virtual video memory capacity corresponding to the virtual processors, and the virtual video memory capacity is the sum of the video memory capacities of the multiple processors; The intercepting module is configured to intercept an invocation request of the target application for the virtual processor through the fusion layer; The invoking module is configured to invoke the multiple processors to process the invocation request.

14. An electronic device, characterized in that, Including: At least one processor; And A memory communicatively connected to the at least one processor; Wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the electronic device to execute the method according to any one of claims 1-12.

15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the method described in any one of claims 1-12 is implemented.

16. A computer program product comprising a computer program, characterized in that, When the computer program is executed by the processor, the method described in any one of claims 1-12 is implemented.