Information processing method, device and system
By simplifying the accelerator configuration process using configuration templates, the problem of configuring each data task individually for general-purpose processors is solved, enabling more efficient data processing task transmission and execution.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2026-03-17
AI Technical Summary
When a general-purpose processor sends data processing tasks to an accelerator, it needs to configure the parameters of each task individually, resulting in a large workload and low efficiency.
By using configuration templates, the processing parameters of the data processing task and the pointer to the target storage space are pre-set. The general-purpose processor only needs to send the configuration template instruction information, and the accelerator will obtain and configure it automatically.
It reduces the amount of operations and data transfer on general-purpose processors, improving the efficiency of data processing tasks. In particular, tasks of the same type can share a single template, further enhancing the efficiency of multitasking.
Smart Images

Figure CN121680914A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and more specifically to information processing methods, apparatus and systems. Background Technology
[0002] In the field of information technology, general-purpose processors can send data processing tasks they generate or receive to accelerators for processing. Accelerators can have superior processing capabilities compared to general-purpose processors in certain types of computation, thereby improving the efficiency of data processing tasks. During the process of a general-purpose processor sending a data processing task to an accelerator, the task parameters of the data processing task need to be configured for the accelerator so that the accelerator can execute the data processing task according to the task parameters.
[0003] Currently, when a general-purpose processor sends data processing tasks to an accelerator, it performs a separate configuration operation for each data processing task to configure the various task parameters of each data processing task to the accelerator. As a result, the general-purpose processor performs many operations in the accelerator configuration process, which is not efficient. Summary of the Invention
[0004] This application provides an information processing method, apparatus, and system that can reduce the amount of processor operations and data transmission during the process of a general-purpose processor sending data processing tasks to an accelerator, thereby improving the processing efficiency of the process.
[0005] In a first aspect, an information processing method is provided. The method includes acquiring a data processing task, which includes processing parameters for data processing and data indication parameters for indicating the data; and configuring an accelerator according to a configuration template of the data processing task. The configuration template includes processing parameters for the data processing task and a pointer to a target storage space, the target storage space being used to store the data indication parameters. The accelerator is used to acquire the processing parameters and data indication parameters according to the configuration result, and to execute the data processing task according to the processing parameters and data indication parameters.
[0006] The information processing method provided in this application embodiment allows for convenient and simple configuration of the accelerator during the process of sending data processing tasks to the accelerator. This is achieved by storing the data indication parameters (e.g., data address parameters) of the data processing tasks in the target storage space and directly using a configuration template. The configuration template can be existing and includes fixed processing parameters for the data processing tasks and pointers to the target storage space. Thus, the method provided in this application embodiment reduces the processor workload, processes a smaller amount of data, and achieves higher processing efficiency during the process of sending data processing tasks to the accelerator. Furthermore, the processing parameters for multiple data processing tasks of the same type can be identical. Based on this, in the information processing method provided in this application embodiment embodiment, multiple data processing tasks of the same type can also use the same configuration template to configure the accelerator. This further reduces the processor workload during the process of sending multiple data processing tasks to the accelerator and improves processing efficiency.
[0007] In some possible implementations, the method includes obtaining the configuration template of the data processing task from at least one configuration template of at least one data processing task.
[0008] Different types of data processing tasks have significantly different task parameters. Therefore, by setting at least one corresponding configuration template for at least one data processing task, the appropriate configuration template can be obtained for one or more types of data processing tasks, allowing for simple, convenient, and accurate configuration of the accelerator.
[0009] In some other possible implementations, at least one configuration template includes a first configuration template and a second configuration template. The first configuration template includes processing parameters for a first process and a pointer to a first target storage space. The second configuration template includes processing parameters for a second process and a pointer to a second target storage space.
[0010] Different types of data processing tasks may have different processing parameters and data indication parameters. Different types of configuration templates will also include different processing parameters and pointers. Therefore, configuring accelerators according to different types of configuration templates will not affect each other. This ensures the accuracy of configuring accelerators according to the corresponding configuration templates for various types of data processing tasks.
[0011] In some other possible implementations, at least one configuration template includes a first configuration template, the first configuration template includes multiple configuration templates, the multiple configuration templates include a third configuration template and a fourth configuration template, the third configuration template includes processing parameters of the first process and a pointer to a third target storage space, and the fourth configuration template includes processing parameters of the first process and a pointer to a fourth target storage space.
[0012] In some cases, multiple data processing tasks of the same type may be sent concurrently to the accelerator. By setting multiple configuration templates for the same type of task, each task can easily obtain the corresponding template to configure the accelerator when these tasks are sent concurrently. Furthermore, data processing tasks of the same type generally share the same processing parameters but differ in their data pointer parameters. Multiple configuration templates of the same type include the same processing parameters but different pointers. Thus, during the concurrent sending of multiple data processing tasks to the accelerator, configuring the accelerator concurrently using multiple configuration templates does not interfere with each other, ensuring the accuracy of concurrent accelerator configuration.
[0013] In some other possible implementations, the data processing tasks include a first data processing task and a second data processing task. The first data processing task instructs a first type of processing on first data, and the second data processing task instructs a second type of processing on second data. Furthermore, configuring the accelerator according to a configuration template of the data processing task includes: configuring the accelerator according to a configuration template of the first data processing task, the configuration template of the first data processing task including processing parameters for the first processing and a pointer to a first target storage space, the first target storage space being used to store data indication parameters of the first data; and configuring the accelerator according to a configuration template of the second data processing task, the configuration template of the second data processing task including processing parameters for the second processing and a pointer to a second target storage space, the second target storage space being used to store data indication parameters of the second data.
[0014] Different types of data processing tasks generally have different processing parameters and data indication parameters. The information processing method provided in this application allows for storing the data indication parameters of multiple data processing tasks of different types in different target storage spaces, and enabling easy and convenient configuration of the accelerator directly based on the corresponding type's configuration template. This achieves the simple and efficient sending of multiple data processing tasks of different types to the accelerator, with a small processor workload, a small amount of data processed, and high processing efficiency.
[0015] In some other possible implementations, the second data mentioned above is the result of processing the first data using the first method.
[0016] In some scenarios, it is necessary to distribute multiple data processing tasks of different types to multiple accelerators in sequence, so that the multiple accelerators execute the multiple data processing tasks sequentially. Thus, in the information processing method provided in this application embodiment, for the first and second data processing tasks that need to be executed sequentially: the target storage space indicated by the pointer included in the configuration template of the second data processing task is used to store the processing result of the first data processing task, and the accelerators are configured directly using the configuration templates of the first and second processing tasks respectively. This method achieves a simple and convenient way to distribute multiple data processing tasks sequentially to multiple accelerators, and the process involves a small amount of processor operations, a small amount of data processed, and high processing efficiency.
[0017] In some other possible implementations, the data processing tasks include a third data processing task and a fourth data processing task. The third data processing task performs a first type of processing on the third data, and the fourth data processing task performs the first type of processing on the fourth data. Furthermore, configuring the accelerator according to a configuration template for the data processing tasks includes configuring the accelerator according to the configuration template of the third data processing task, which includes processing parameters for the first type of processing and a pointer to a third target storage space, the third target storage space being used to store data indication parameters for the third data. Similarly, configuring the accelerator according to a configuration template for the fourth data processing task, which includes processing parameters for the first type of processing and a pointer to a fourth target storage space, the fourth target storage space being used to store data indication parameters for the fourth data.
[0018] Multiple data processing tasks of the same type can have the same processing parameters but different data indication parameters. In the information processing method provided in this application embodiment, the data indication parameters of multiple data processing tasks of the same type are stored in different target storage spaces, and the accelerator is easily and conveniently configured directly according to the corresponding type's configuration template. This method enables the simple and efficient concurrent sending of multiple data processing tasks of the same type to the accelerator, and the process involves relatively small processor operations, small data processing volume, and high processing efficiency.
[0019] In some other possible implementations, the data indication parameters include address parameters indicating the storage location of the data. The address parameters for the data processing task include input data address parameters and output data address parameters. Specifically, the input data address parameter indicates the storage location of the data, and the output data address parameter indicates the storage location of the processed data.
[0020] The data processing task can specify the storage address for its input data and the storage address for its output data. Thus, in the information processing method provided in this embodiment, the input data address parameters and output data address parameters of the data processing task can be stored in the target storage space. This method ensures that when configuring the accelerator according to the configuration template of the data processing task, the task parameters of the data processing task are accurately written to the accelerator.
[0021] In some other possible implementations, the information processing system includes a general-purpose processor and the accelerator. Configuring the accelerator according to a configuration template of a data processing task includes: the general-purpose processor sending instruction information of the configuration template of the data processing task to the accelerator; the accelerator obtaining the configuration template of the data processing task according to the instruction information; and configuring the accelerator according to the configuration template of the data processing task.
[0022] In the information processing method provided in this application embodiment, the general-purpose processor can send only the instruction information of the configuration template to the accelerator, and the accelerator can automatically obtain the configuration template and configure itself according to the instruction information. This ensures that the amount of operation and communication data of the general-purpose processor is relatively small during the process of sending data processing tasks to the accelerator.
[0023] In some other possible implementations, configuring the accelerator according to the configuration template of the data processing task includes configuring the storage space of the accelerator according to the configuration template of the data processing task, such that the processing parameters included in the configuration template and the pointer indicating the target storage space are stored in the storage space of the accelerator.
[0024] Writing instruction-related information into the accelerator's storage space (e.g., the accelerator's registers) enables the instruction to be sent to the registers. Based on this, in the information processing method provided in the embodiments of this application, the accelerator can be easily and conveniently configured by storing the processing parameters and pointers included in the configuration template in the accelerator's storage space, so that the accelerator can perform data processing tasks.
[0025] Secondly, an information processing apparatus is provided, comprising a task acquisition module and a configuration module. The task acquisition module acquires a data processing task, which includes processing parameters for data processing and data indication parameters for indicating the data. The configuration module configures an accelerator according to a configuration template for the data processing task. The configuration template includes processing parameters and a pointer to a target storage space for storing the data indication parameters. The accelerator acquires the processing parameters and data indication parameters based on the configuration result, and executes the data processing task based on the processing parameters and data indication parameters.
[0026] In some possible implementations, the configuration module is also used to obtain the configuration template of the data processing task from at least one configuration template of at least one data processing task.
[0027] In some other possible implementations, at least one configuration template includes a first configuration template and a second configuration template. The first configuration template includes processing parameters for a first process and a pointer to a first target storage space. The second configuration template includes processing parameters for a second process and a pointer to a second target storage space.
[0028] In some other possible implementations, at least one configuration template includes a first configuration template, the first configuration template includes multiple configuration templates, the multiple configuration templates include a third configuration template and a fourth configuration template, the third configuration template includes processing parameters of the first process and a pointer to a third target storage space, and the fourth configuration template includes processing parameters of the first process and a pointer to a fourth target storage space.
[0029] In some possible implementations, the data processing task includes a first data processing task and a second data processing task. The first data processing task instructs a first type of processing on first data, and the second data processing task instructs a second type of processing on second data. The configuration module is further configured to: configure the accelerator according to a configuration template for the first data processing task, the configuration template including processing parameters for the first processing and a pointer to a first target storage space, the first target storage space being used to store data indication parameters of the first data. The configuration module is also further configured to: configure the accelerator according to a configuration template for the second data processing task, the configuration template including processing parameters for the second processing and a pointer to a second target storage space, the second target storage space being used to store data indication parameters of the second data. In some possible implementations, the aforementioned second data is the processing result obtained by performing the first processing on the first data.
[0030] In some other possible implementations, the data processing tasks include a third data processing task and a fourth data processing task. The third data processing task is used to perform a first type of processing on the third data, and the fourth data processing task is used to perform a first type of processing on the fourth data. The configuration module is further configured to: configure the accelerator according to a configuration template for the third data processing task, the configuration template of which includes processing parameters for the first type of processing and a pointer to a third target storage space, the third target storage space being used to store data indication parameters for the third data. Furthermore, the configuration module is also configured to: configure the accelerator according to a configuration template for the fourth data processing task, the configuration template of which includes processing parameters for the first type of processing and a pointer to a fourth target storage space, the fourth target storage space being used to store data indication parameters for the fourth data.
[0031] In some other possible implementations, the data indication parameters include address parameters indicating the storage location of the data, and the address parameters of the data processing task include input data address parameters and output data address parameters. Specifically, the input data address parameter indicates the storage location of the data, and the output data address parameter indicates the storage location of the data processing result.
[0032] In some possible implementations, the configuration module further includes a first configuration module and a second configuration module. The first configuration module can be located on a general-purpose processor, and the second configuration module can be located on an accelerator. The first configuration module is used to send instruction information of the configuration template for the data processing task to the accelerator. The second configuration module is used to obtain the configuration template for the data processing task based on the instruction information, and to configure the accelerator according to the configuration template.
[0033] In some other possible implementations, the configuration module is also used to: configure the accelerator's storage space according to the configuration template of the data processing task, so that the processing parameters included in the configuration template and the pointer indicating the target storage space are stored in the accelerator's storage space.
[0034] Thirdly, an information processing system is provided, comprising a general-purpose processor and an accelerator, the general-purpose processor and the accelerator being used to collaboratively execute the information processing method as described in the first aspect.
[0035] Fourthly, a chip system is provided, including a processor and a power supply circuit, the power supply circuit being used to supply power to the processor, and the processor being used to execute the information processing method as described in the first aspect.
[0036] Fifthly, a computing device is provided, comprising a processor and a memory; the processor is configured to execute instructions stored in the memory to cause the computing device to perform the information processing method as described in the first aspect.
[0037] In a sixth aspect, a computer program product comprising instructions is provided, which, when executed by at least one computing device, cause the at least one computing device to perform the information processing method as described in the first aspect.
[0038] In a seventh aspect, a computer-readable storage medium is provided, including computer program instructions, which, when executed by a computing device, cause the computing device to perform the information processing method as described in the first aspect.
[0039] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods.
[0040] The following description includes more specific details about the implementation methods provided for the above aspects. Attached Figure Description
[0041] Figure 1 This is a schematic diagram of the architecture of the information processing system provided in the embodiments of this application;
[0042] Figure 2 Flowchart of the information processing method provided in the embodiments of this application Figure 1 ;
[0043] Figure 3 Flowchart of the information processing method provided in the embodiments of this application Figure 2 ;
[0044] Figure 4 Flowchart of the information processing method provided in the embodiments of this application Figure 3 ;
[0045] Figure 5 This is a schematic diagram of the structure of the information processing device provided in the embodiments of this application;
[0046] Figure 6 A schematic diagram of the structure of a computing device provided in an embodiment of this application. Detailed Implementation
[0047] A general-purpose processor is a type of processor that can be used in a variety of applications and perform various types of calculations. Examples of general-purpose processors include central processing units (CPUs), microprocessor units (MPUs), and field-programmable gate arrays (FPGAs).
[0048] An accelerator is also a type of processor, referring to a processor dedicated to one or more types of computation, or one with strong processing power in one or more types of computation. For example, accelerators can include Graphics Processing Units (GPUs), Neural Processing Units (NPUs), Tensor Processing Units (TPUs), etc. Different types of accelerators can be dedicated to different types of computation or have strong processing power in different types of computation.
[0049] Thus, accelerators can outperform general-purpose processors in some types of computing, and some types of accelerators also have smaller power consumption and smaller area than general-purpose processors.
[0050] General-purpose processors can collaborate with accelerators, sending the data processing tasks they generate or receive to the accelerators for processing. This can improve the processing efficiency of data processing tasks, reduce power consumption during task processing, and improve the quality of data processing results.
[0051] During the process of the general-purpose processor sending data processing tasks to the accelerator, the task parameters of the data processing tasks need to be configured for the accelerator so that the accelerator can execute the data processing tasks according to the task parameters.
[0052] Currently, when a general-purpose processor sends data processing tasks to an accelerator, each data processing task is configured separately to assign its various task parameters to the accelerator. As a result, the general-purpose processor performs many processor operations and processes a large amount of data during the process of sending data processing tasks to the accelerator, leading to low processing efficiency.
[0053] For example, in some implementations, during the process of sending data processing tasks to the accelerator, the general-purpose processor configures and writes each task parameter of the data processing task into the accelerator's registers one by one. Thus, when the number of task parameters is large (e.g., a data processing task may have hundreds or thousands of parameters), the general-purpose processor needs to perform a large number of register write operations each time it sends a data processing task to the accelerator, resulting in low processing efficiency.
[0054] For example, in some implementations, during the process of sending data processing tasks to the accelerator, the general-purpose processor generates a separate task parameter configuration list for each data processing task and stores it in memory. The task parameter configuration list includes the task parameters to be configured for the accelerator. Furthermore, the general-purpose processor assigns the memory address of the task parameter configuration list to the accelerator, and the accelerator reads the task parameter configuration list from memory for accelerator configuration. Thus, for each data processing task sent to the accelerator, the general-purpose processor needs to generate a separate task parameter configuration list and perform the operation of writing the task parameter configuration list into memory. The number of memory operations and the parameters written in memory are still relatively large, resulting in low processing efficiency.
[0055] This application provides an information processing method, which includes obtaining a data processing task. The data processing task includes data indication parameters for indicating data and processing parameters used to process the data, and configuring an accelerator according to a configuration template of the data processing task. The configuration template includes processing parameters of the data processing task and a pointer to a target storage space. The target storage space is used to store the data indication parameters of the data processing task. The accelerator is used to obtain the processing parameters and data indication parameters according to the configuration result, and to execute the data processing task according to the processing parameters and data indication parameters.
[0056] The information processing method provided in this application embodiment allows for convenient and simple configuration of the accelerator during the process of sending data processing tasks to the accelerator. This is achieved by saving the data instruction parameters (e.g., data address parameters) of the data processing tasks in the target storage space and directly using a configuration template. The configuration template can be pre-set and saved, including fixed processing parameters for the data processing tasks and a pointer to the target storage space. Compared to methods that configure data processing tasks individually, the method provided in this application embodiment involves fewer operations, processes less data, and has higher processing efficiency. Furthermore, in the information processing method provided in this application embodiment, multiple data processing tasks of the same type (e.g., multiple data processing tasks with the same processing parameters) can use the same configuration template to configure the accelerator, further reducing the amount of operations involved in sending multiple data processing tasks to the accelerator and improving processing efficiency.
[0057] The information processing method provided in this application can be applied to various scenarios where data processing tasks from a general-purpose processor need to be sent to an accelerator for processing. For example, when a general-purpose processor generates a data processing task while running an application, and the general-purpose processor needs to send the data processing task to an accelerator for processing, the information processing method provided in this application can be used to configure the accelerator.
[0058] Furthermore, in the information processing method provided in the embodiments of this application, the data can be various types of data such as images, text, and audio, and the data processing task can be various types of data processing tasks, such as image processing tasks, data encoding tasks, etc.
[0059] The system architecture provided in the embodiments of this application is described below.
[0060] Figure 1 This is a schematic diagram of the architecture of an information processing system provided in an embodiment of this application. The information processing system 100 can be used to implement the information processing method proposed in the embodiments of this application. Figure 1 As shown, the information processing system 100 includes a general-purpose processor 110, an accelerator 120, and a storage medium 130.
[0061] The general-purpose processor 110 can be used to run various applications and perform various tasks. The general-purpose processor 110 can also be used to communicate with other devices, such as other servers and terminals.
[0062] The general-purpose processor 110 can acquire data processing tasks; for example, it can generate data processing tasks or receive data processing tasks sent by other devices. As an example, the general-purpose processor 110 runs an image processing application and generates an image processing task. As yet another example, the general-purpose processor 110 receives an image processing task sent by a client.
[0063] The general-purpose processor 110 may include one or more general-purpose processors, such as a combination of one or more of CPU, MPU, FPGA, etc.
[0064] Accelerator 120 can be one or more of various types of accelerators such as GPU, NPU, and TPU.
[0065] Accelerator 120 can be used to communicate with general-purpose processor 110, and data processing tasks acquired by general-purpose processor 110 can be executed by accelerator 120.
[0066] In some embodiments, the general-purpose processor 110 can work in conjunction with the accelerator 120 to execute the information processing method provided in the embodiments of this application, so as to send the data processing tasks of the general-purpose processor 110 to the accelerator 120 for processing.
[0067] For example, after the general-purpose processor 110 obtains the data processing task, the general-purpose processor 110 can work with the accelerator 120 to configure the accelerator 120 according to the configuration template of the data processing task. The configuration template includes the processing parameters of the data processing task and a pointer to the target storage space. The target storage space is used to store the data indication parameters of the data processing task.
[0068] The target storage space may refer to the allocated storage space used to store data indication parameters for data processing tasks, for example... Figure 1 The second storage space in storage medium 130.
[0069] The process of writing data indication parameters of a data processing task to a target storage space can be performed by either the general-purpose processor 110 or the accelerator 120. For example, after acquiring a data processing task, the general-purpose processor 110 writes the data indication parameters of the data processing task to the target storage space. Alternatively, after acquiring a data processing task, the general-purpose processor 110 sends the data indication parameters of the data processing task to the accelerator 120, and the accelerator 120 writes the data indication parameters of the data processing task to the target storage space.
[0070] In some embodiments, the storage medium 130 may store a pre-set configuration template (e.g., Figure 1 The first storage space in the storage medium 130 may store a configuration template, so that when the general-purpose processor 110 and the accelerator 120 work together to configure the accelerator 120 according to the configuration template of the data processing task, the configuration template of the data processing task can be obtained from the storage medium 130.
[0071] Storage medium 130 may include various types or combinations of storage media such as optical discs, disks (including floppy disks, hard disks, etc.), and solid-state drives.
[0072] As an example, the general-purpose processor 110 and the accelerator 120 can collaborate to configure the accelerator 120 according to a configuration template for a data processing task in the following manner: the general-purpose processor 110 sends indication information of the configuration template for the data processing task to the accelerator 120; the accelerator 120 retrieves the configuration template for the data processing task from the storage medium 130 according to the received indication information; and the accelerator 120 configures itself according to the retrieved configuration template. For example, the accelerator 120 writes the processing parameters and data indication parameters of the data processing task into its parameter storage space (such as a register or other storage space) according to the configuration template.
[0073] For more details regarding the collaborative execution of the information processing method provided in this application embodiment by the general-purpose processor 110 and the accelerator 120, please refer to the embodiments of this application. Figure 2 , Figure 3 , Figure 4 And its related descriptions.
[0074] Accelerator 120 can also be used to obtain the processing parameters and data indication parameters of the data processing task according to the configuration results, and to execute the data processing task according to the processing parameters and data indication parameters of the data processing task.
[0075] The accelerator 120 can also feed back the processing results of the data processing task to the general-purpose processor 110 so that the general-purpose processor 110 can know the processing results.
[0076] In some embodiments, accelerator 120 may include a plurality of accelerators 120-1, 120-2, etc. A data processing task of the general-purpose processor 110 may be sent to one or more accelerators 120 for processing as needed, and the accelerators may be configured during the process of sending the data processing task to the accelerators using the information processing method provided in the embodiments of this application.
[0077] In some embodiments, the plurality of accelerators 120-1, 120-2... may include one or more types of accelerators, and different types of accelerators may be used to process different types of data processing tasks. For example, an image processing accelerator is used to process image processing tasks such as image rendering, and an image encoding accelerator is used to process image encoding tasks, etc.
[0078] Among them, each accelerator in the multiple accelerators 120-1, 120-2... can be a different processor (e.g., a different GPU), or multiple accelerators can also be set on a single processor (e.g., a GPU includes multiple processing components, each of which acts as an accelerator).
[0079] In some embodiments, the general-purpose processor 110 and the accelerator 120 may be located on the same computing device, such as the same server, terminal, or other computing device. In this way, the computing device can execute the information processing method provided in the embodiments of this application to send the data processing tasks of the general-purpose processor 110 in the computing device to the accelerator 120 in the computing device for processing.
[0080] In some embodiments, accelerators 110 and 120 may be disposed on different computing devices, for example, general-purpose processor 110 may be disposed on a first computing device. Figure 1 The accelerator 120 is mounted on the second computing device (not shown in the image). Figure 1 (Not shown in the image). Thus, the first computing device and the second computing device can collaboratively execute the information processing method provided in the embodiments of this application to send the data processing task of the general-purpose processor 110 in the first computing device to the accelerator 120 in the second computing device for processing.
[0081] Figure 1 This is merely a schematic diagram of the architecture of an information processing system provided in this application embodiment. The positional relationships between the devices, components, modules, etc. shown in the figure do not constitute any limitation.
[0082] For example, in Figure 1 In this configuration, both the first and second storage spaces are housed within the same storage medium 130. In other cases, the first and second storage spaces may be housed within different storage media. For example, the first storage space may be housed within the first storage medium, and the second storage space within the second storage medium. The first storage medium can be either an external storage medium of the accelerator 120 or an internal storage medium of the accelerator 120.
[0083] For example, in Figure 1 In this context, storage medium 130 is a component outside of accelerator 120. In other cases, storage medium 130 may also be a storage medium inside accelerator 120.
[0084] The information processing method provided in the embodiments of this application is described in detail below. Figure 1 It is implemented on the information processing system 100 shown.
[0085] Figure 2 Flowchart of the information processing method provided in the embodiments of this application Figure 1 . Figure 2 The information processing method shown can be executed by a computing device or a processing device.
[0086] For example, the computing device includes a general-purpose processor 110 and an accelerator 120 in the information processing system 100, and the computing device can perform... Figure 2 The information processing method shown is used to configure the accelerator 120 included in the computing device.
[0087] For example, Figure 2 The information processing method shown can be executed collaboratively by the general-purpose processor 110 and the accelerator 120 in the information processing system 100.
[0088] For ease of understanding, in Figure 2 This paper introduces a method for information processing that involves the collaborative execution of a general-purpose processor and an accelerator. Specifically, operations performed by the general-purpose processor can independently constitute an information processing method executed by the general-purpose processor, and operations performed by the accelerator can independently constitute an information processing method executed by the accelerator.
[0089] like Figure 2 As shown, the method includes the following steps.
[0090] Step 210: Obtain data processing tasks.
[0091] In step 210, the general-purpose processor may acquire the data processing task. For example, the general-purpose processor may run an application to generate the data processing task, or other devices may send the data processing task to the general-purpose processor, thus enabling the general-purpose processor to acquire the data processing task.
[0092] Data processing tasks are used to instruct the processing / operation of data to obtain a result. The data can be of various types, such as images, text, and audio. Furthermore, data processing tasks can be of various types, such as image cropping tasks and image encoding tasks.
[0093] A data processing task may include task parameters involved in or used in executing the task. Task parameters may include processing parameters and data indication parameters of the data processing task.
[0094] Data indication parameters refer to parameters used to indicate data-related information. These can include parameters indicating various information related to the data being processed by the data processing task. For example, data indication parameters include data address parameters, time parameters, and data size parameters.
[0095] Address parameters can refer to parameters used to indicate the storage address of data. In some embodiments, data address parameters may include input data address parameters and output data address parameters.
[0096] The input data address parameter is used to indicate the storage address of the input data (i.e., the data being processed) for the data processing task.
[0097] The output data address parameter is used to indicate the storage address of the output data of the data processing task (that is, the processing result obtained by processing the data).
[0098] The time parameter of data refers to the parameter used to indicate the time corresponding to the data. For example, if the data processing task needs to process data between the first and second moments of February 1st, the time parameter of the data is the time between the first and second moments of February 1st.
[0099] The data size parameter refers to a parameter used to indicate the size of the corresponding data. For example, if the data processing task needs to process a data block in a dataset, and the data block size is 200KB, then the data size parameter is 200KB.
[0100] Processing parameters refer to the parameters used to process data, and can include various parameters related to the processing performed by the data processing task. For example, taking an image cropping task as an example, the data processing parameters may include the resolution before cropping, the resolution after cropping, the image cropping size parameters, and the shape parameters of the image cropping region.
[0101] Data processing tasks can have a large number of parameters, such as hundreds or thousands. In contrast, data processing tasks have a smaller number of data indication parameters.
[0102] In step 210, the general-purpose processor may acquire one or more data processing tasks and may send these one or more data processing tasks to the accelerator for processing.
[0103] The general-purpose processor can acquire multiple data processing tasks simultaneously or sequentially in chronological order.
[0104] The multiple data processing tasks acquired by a general-purpose processor can include one or more types of data processing tasks.
[0105] Multiple data processing tasks of the same type are used to perform the same type of data processing. For example, tasks A1 and A2 are of the same type; task A1 is used to perform columnar projection processing on image 1, and task A2 is used to perform columnar projection processing on image 2.
[0106] These are multiple data processing tasks of different types, each used for different types of data processing. For example, tasks A1 and B1 are of different types; task A1 is used to perform histogram projection on image 1, and task B1 is used to perform histogram detection on the image.
[0107] Step 220: Configure the accelerator according to the configuration template of the data processing task.
[0108] During the process of a general-purpose processor sending a data processing task to an accelerator, the task parameters of the data processing task need to be configured for the accelerator. Configuring the accelerator may refer to storing the task parameters of the data processing task internally within the accelerator.
[0109] Thus, after configuring the accelerator, the accelerator can obtain the task parameters of the data processing task based on the configuration results, and execute the data processing task based on the task parameters.
[0110] There are various ways to configure an accelerator to store the task parameters of a data processing task inside the accelerator. For example, the task parameters of the data processing task can be written into the instruction and the instruction can be stored in the accelerator's storage space (such as registers), or the task parameters of the data processing task can be directly written into the accelerator's storage space (such as registers), and so on.
[0111] Taking writing task parameters of a data processing task to the accelerator's registers as an example, each parameter in the task parameters can be written to one register in the accelerator. In this way, for each data processing task sent to the accelerator, when configuring the accelerator, task parameters can be written to multiple registers (e.g., hundreds or thousands) in the accelerator.
[0112] Different data processing tasks are used to process different types of data, and the data indication parameters (such as address parameters) in the task parameters of each data processing task may be different. For multiple data processing tasks of the same type, they are all used to perform the same type of data processing, and the processing parameters in the task parameters of each data processing task may be the same.
[0113] Thus, for multiple data processing tasks of the same type, the data indication parameters in their task parameters may be different, but the processing parameters in their task parameters may be the same.
[0114] Based on this, in this embodiment of the application, a configuration template for a data processing task can be generated. The configuration template may include processing parameters from the task parameters included in the data processing task, and a target pointer. The target pointer is used to indicate a target storage space, which is used to store data indication parameters from the task parameters included in the data processing task.
[0115] During the process of the general-purpose processor sending data processing tasks to the accelerator, the accelerator can be configured according to a configuration template, such that the processing parameters and target pointer in the configuration template are stored inside the accelerator. Additionally, the data instruction parameters of the data processing task can be written to the target storage space.
[0116] After configuring the accelerator, the accelerator can obtain the task parameters (including processing parameters and address parameters) of the data processing task based on the configuration results, and execute the data processing task according to the task parameters.
[0117] The process of the accelerator obtaining the task parameters of the data processing task based on the configuration results may include: the accelerator first obtains the processing parameters and target pointer of the data processing task based on the configuration results, and then the accelerator obtains the data indication parameters of the data processing task from the target storage space based on the target pointer, thus obtaining the processing parameters and data indication parameters of the data processing task.
[0118] As an example, the accelerator is configured by writing the task parameters of the data processing task into the accelerator's registers. In this case, the configuration template may include the processing parameters of the data processing task and the corresponding accelerator register for each processing parameter, as well as the target pointer and the corresponding accelerator register (the accelerator includes multiple registers). When configuring the accelerator according to the configuration template, the processing parameters and target pointer can be written into the corresponding accelerator registers according to the configuration template. Furthermore, the accelerator can read the processing parameters and target pointer from the registers to obtain the task parameters such as processing parameters and data indication parameters, and execute the data processing task based on these task parameters, including processing parameters and address parameters.
[0119] In this embodiment of the application, for multiple data processing tasks of the same type, the accelerator can be configured according to the same configuration template when sending them to the accelerator.
[0120] As an example, a corresponding configuration template T1 can be generated for columnar projection processing. The configuration template includes the processing parameters p1 and the target pointer n1 for columnar projection processing. The target pointer n1 is used to indicate the memory block M1 (i.e., the target storage space) in memory.
[0121] The general-purpose processor first sends task A1 to the accelerator for processing. Task A1 is used to perform columnar projection processing on image 1. Task A1 includes the address parameter d1 of image 1 and the processing parameter p1 for columnar projection processing.
[0122] At this point, the data indication parameter d1 of task A1 can be stored in memory block M1, and the accelerator can be configured according to configuration template T1, such that the processing parameter p1 and target pointer n1 in configuration template T1 are stored inside the accelerator. Thus, the accelerator can obtain the processing parameter p1 and target pointer n1 of task A1 according to the configuration result, and obtain the data indication parameter d1 of image 1 from memory block M1 indicated by target pointer n1, and execute task A1 according to these obtained task parameters (including processing parameter p1 and data indication parameter d1).
[0123] Then, the general-purpose processor sends task A2 to the accelerator for processing. Task A2 is used to perform columnar projection processing on image 2. Task A2 includes data indication parameter d2 of image 2 and processing parameter p1 for columnar projection processing.
[0124] At this point, the address parameter d2 of task A2 can be stored in memory block M1, and the accelerator can still be configured according to configuration template T1, such that the processing parameter p1 and target pointer n1 in configuration template T1 are stored inside the accelerator. Thus, the accelerator can obtain the processing parameter p1 and target pointer n1 of task A1 according to the configuration result, and obtain the data indication parameter d2 of image 2 from memory block M1 indicated by target pointer n1, and execute task A2 according to these obtained task parameters (including processing parameter p1 and data indication parameter d2).
[0125] In some embodiments, the configuration template can be saved in a storage medium after it is generated, so that the required configuration template can be retrieved from the storage medium when needed.
[0126] The configuration template can be generated using any available processing device. For example, it can be generated using a general-purpose processor, accelerator, or other device.
[0127] Configuration templates can be stored in any available storage medium. For example, a computing device may include a general-purpose processor, an accelerator, and memory; the configuration template can be stored in the computing device's memory, from which the general-purpose processor or accelerator can retrieve the required configuration template. Alternatively, the configuration template can also be stored in the accelerator's internal memory, from which the general-purpose processor or accelerator can retrieve the required configuration template.
[0128] In some embodiments, various configuration templates can be generated for different types of data processing tasks. The processing parameters and target pointers included in different types of configuration templates may vary.
[0129] In step 220, for each data processing task, a configuration template corresponding to the task type of the data processing task can be obtained from a variety of configuration templates and used as the configuration template for the data processing task.
[0130] As an example, multiple configuration templates may include a first configuration template, a second configuration template, etc. The first configuration template is for the first type of data processing task, and the second configuration template is for the second type of data processing task. The first and second templates are only used to distinguish different types of configuration templates and different types of data processing tasks; they do not impose restrictions on the configuration templates or data processing tasks.
[0131] The first data processing task is used to instruct the first data to undergo the first type of processing. The first configuration template includes processing parameters for the first type of processing and a first target pointer, which indicates a first target storage space. The first target storage space is used to store the data indication parameters of the first data processing task (including data indication parameters of the first data, such as the address parameters of the first data).
[0132] The second data processing task is used to instruct the second data to undergo a second type of processing. The second configuration template includes processing parameters for the second processing and a second target pointer, which indicates a second target storage space. The second target storage space is used to store data indication parameters for the second data processing task (including data indication parameters for the second data, such as the address parameters of the second data).
[0133] The first and second are only used to distinguish different data and different target storage spaces, and do not impose restrictions on the data or target storage spaces.
[0134] Thus, when a general-purpose processor acquires multiple data processing tasks, and these multiple data processing tasks include a first type of data processing task and a second type of data processing task of different types:
[0135] For the first type of data processing task, which is used to instruct the first type of processing to be performed on the first data, the corresponding configuration template is the first configuration template. The first configuration template includes the processing parameters for the first type of processing and a first target pointer (indicating the first target storage space).
[0136] In step 220, the data indication parameters of the first data processing task can be stored in the first target storage space, and the accelerator can be configured according to the first configuration template. The accelerator can obtain the processing parameters and data indication parameters of the first data processing task according to the configuration result, and execute the first data processing task according to the obtained processing parameters and data indication parameters.
[0137] The second type of data processing task is used to instruct the second type of processing on the second data, and its corresponding configuration template is the second configuration template. The second configuration template includes the processing parameters for the second type of processing and a second target pointer (indicating the second target storage space).
[0138] In step 220, the data indication parameters of the second data processing task can be stored in the second target storage space, and the accelerator can be configured according to the second configuration template. The accelerator can obtain the processing parameters and data indication parameters of the second data processing task according to the configuration result, and execute the second data processing task according to the obtained processing parameters and data indication parameters.
[0139] In some embodiments, for a type of data processing task, the generated configuration template may include multiple configuration templates. These multiple configuration templates may contain the same processing parameters, but may contain different target pointers.
[0140] Based on this, when a general-purpose processor obtains multiple data processing tasks of the same type, and in step 220 these multiple data processing tasks need to be sent to the accelerator in parallel (e.g., sent to one accelerator or sent to multiple accelerators respectively): for any one of the data processing tasks, the corresponding configuration template can be obtained to configure the accelerator.
[0141] As an example, the first configuration template can be any type of configuration template, and it includes multiple configuration templates, such as a third configuration template, a fourth configuration template, etc. These multiple configuration templates contain the same processing parameters, but differ in their data indication parameters.
[0142] For example, the first configuration template is a configuration template for the first data processing task, which is used to indicate the first type of processing of the data.
[0143] The third configuration template includes the processing parameters of the first processing and a third target pointer, which indicates the third target storage space.
[0144] The fourth configuration template includes the processing parameters of the first processing and a fourth target pointer, which indicates the fourth target storage space.
[0145] The first method is for ease of description only and does not impose restrictions on configuration templates or data processing tasks. Similarly, the third and fourth methods are only used to distinguish different types of configuration templates and different target storage spaces, and do not impose restrictions on configuration templates or target storage spaces.
[0146] Thus, when a general-purpose processor acquires multiple data processing tasks, and these multiple data processing tasks include a third data processing task and a fourth data processing task of the same type:
[0147] For the third data processing task, which is used to instruct the third data to be processed in the first way, the configuration template of the obtained third data processing task can be the third configuration template in the first configuration template.
[0148] In step 220, the data indication parameters of the third data processing task can be stored in the third target storage space, and the accelerator can be configured according to the third configuration template. The accelerator can obtain the processing parameters and data indication parameters of the third data processing task according to the configuration result, and execute the third data processing task according to the obtained processing parameters and data indication parameters.
[0149] For the fourth data processing task, it is used to instruct the fourth data to be processed in the first way, and its corresponding configuration template can be the fourth configuration template in the first configuration template.
[0150] In step 220, the data indication parameters of the fourth data processing task can be saved in the fourth target storage space, and the accelerator can be configured according to the fourth configuration template. The accelerator can obtain the processing parameters and data indication parameters of the fourth data processing task according to the configuration result, and execute the fourth data processing task according to the obtained processing parameters and data indication parameters.
[0151] In step 220, the accelerator can be configured according to the configuration template of the data processing task, which can be performed collaboratively by the general-purpose processor and the accelerator. There are several ways in which the general-purpose processor and the accelerator can work together.
[0152] In some implementations, the general-purpose processor can obtain a configuration template for the data processing task and send it to the accelerator. The accelerator configures itself based on the received configuration template, such as configuring the accelerator's storage space.
[0153] In other implementations, the general-purpose processor may determine the configuration template for the data processing task from at least one existing configuration template, and the general-purpose processor may send indication information of the configuration template for the data processing task to the accelerator. The accelerator obtains the configuration template for the data processing task based on the received indication information, and the accelerator configures itself based on the obtained configuration template.
[0154] In this embodiment, during the process of sending data processing tasks to the accelerator, the general-purpose processor only needs to send instruction information for the configuration template of the data processing task to the accelerator. The accelerator can then automatically obtain the configuration template and configure itself based on the instruction information. The amount of operations performed by the general-purpose processor and the amount of communication data with the accelerator in this process are relatively small, resulting in high processing efficiency.
[0155] The configuration template indication information can be used to indicate how to obtain the configuration template. For example, at least one configuration template is stored in the storage medium, and each configuration template has a corresponding identifier. The indication information includes the identifier of the required configuration template, and the accelerator can obtain the required configuration template from among multiple configuration templates based on this identifier. As another example, at least one configuration template is stored in the storage medium, and each configuration template has a corresponding storage address. The indication information includes the storage address of the required configuration template, and the accelerator can obtain the required configuration template from that storage address.
[0156] In addition, in step 220, the address parameters of the data processing task can be written into the target storage medium for storage by a general-purpose processor or accelerator, depending on the scenario or requirements.
[0157] For ease of understanding, the following will be explained... Figure 3 and Figure 4 Exemplary information processing methods that involve the collaborative execution of general-purpose processors and accelerators in different scenarios, as well as the operations performed by the general-purpose processor and accelerators respectively in the methods, are introduced.
[0158] Figure 3 Flowchart of the information processing method provided in the embodiments of this application Figure 2 . Figure 3 The information processing method shown can be executed collaboratively by the general-purpose processor 110 and the accelerator 120 in the information processing system 100.
[0159] Figure 3 The information processing method is applicable to scenarios where general-purpose processors directly send data processing tasks to accelerators for processing. For any data processing task, it can be achieved through... Figure 3 The Chinese method implements collaborative execution by a general-purpose processor and an accelerator, configuring the accelerator according to a configuration template for the data processing task.
[0160] like Figure 3 As shown, the method may include:
[0161] Step 310: The general-purpose processor acquires the data processing task.
[0162] Step 320: The general-purpose processor writes the data indication parameters of the data processing task into the target storage space, which is the storage space indicated by the target pointer in the configuration template of the data processing task.
[0163] Step 330: The general-purpose processor sends an instruction message for the configuration template of the data processing task to the accelerator.
[0164] Step 340: The accelerator obtains the configuration template of the data processing task according to the instruction information of the configuration template of the data processing task.
[0165] The configuration template for a data processing task includes the processing parameters and target pointer for the data processing task.
[0166] Step 350: Configure the accelerator according to the configuration template of the data processing task.
[0167] Thus, when the accelerator executes a data processing task, it can read the processing parameters and target pointer of the data processing task according to the configuration result, and can also read the data indication parameters of the data processing task from its target storage space according to the target pointer. Then the accelerator can execute the data processing task according to the processing parameters and data indication parameters of the data processing task.
[0168] The specific details of each operation in steps 310-350 and Figure 2 The operation is similar in Chinese; please refer to [link / reference]. Figure 2 And related explanations.
[0169] In some scenarios, the data processing task obtained by the general-purpose processor (referred to as the target data processing task for ease of description) is used to instruct various data processing operations to be performed on the target data. Furthermore, multiple accelerators are needed to process multiple data processing tasks separately to complete the target data processing task.
[0170] Multiple accelerators can process multiple data processing tasks sequentially. For example, these multiple data processing tasks include a first data processing task and a second data processing task. The first accelerator processes the first data processing task, which instructs the target data to undergo a first type of processing. The second accelerator processes the second data processing task, which instructs the processing result of the first data processing task (i.e., the processing result obtained from the first type of processing on the target data) to undergo a second type of processing.
[0171] The first and second are only used to distinguish different processing tasks and accelerators, and do not impose restrictions on processing tasks or accelerators.
[0172] As an example, the general-purpose processor obtains the target image processing task - image processing task C1, which instructs the camera to perform noise removal processing on the image (i.e., target data) (referred to as the noise removal task), to perform target recognition processing on the noise-removed image (referred to as the target recognition task), and to perform image encoding processing on the target-recognized image (referred to as the image encoding task).
[0173] To complete image processing task C1, accelerator 1 must first process the noise removal task, then accelerator 2 must process the target recognition task, and then accelerator 3 must process the image encoding task.
[0174] In this application, the information processing method provided in the embodiments can be used to configure the accelerator for each data processing task that the accelerator needs to process, during the process of sending the data processing task to the accelerator.
[0175] Figure 4 Flowchart of the information processing method provided in the embodiments of this application Figure 3 . Figure 4 The information processing method shown can be executed collaboratively by a general-purpose processor 110 and an accelerator 120 in the information processing system 100. The accelerator 120 may include multiple accelerators.
[0176] Figure 4 The information processing method can be applied to the aforementioned scenarios where multiple accelerators are needed to process multiple data processing tasks to complete the target data processing task. Figure 4 The information processing method can be used in this scenario to configure multiple accelerators in the process of scheduling multiple accelerators to perform various data processing.
[0177] In some embodiments, Figure 4 The method shown can be implemented using a dedicated device or component to configure multiple accelerators; this dedicated device or component can be called a scheduler. The scheduler can be implemented in software or hardware; a hardware-based scheduler can be called a hardened scheduler.
[0178] For example, the scheduler can be implemented by a hardware component in a general-purpose processor or accelerator or other processing device, or by software running on a general-purpose processor or accelerator or other processing device.
[0179] exist Figure 4 The explanation mainly uses the example of a scheduler configuring multiple accelerators (e.g., accelerator 1, accelerator 2, accelerator 3, etc.), with the scheduler being implemented by the hardware part of the accelerator (e.g., any one of accelerators 1, 2, 3).
[0180] like Figure 4 As shown, the method may include:
[0181] Step 410: The general-purpose processor acquires the target data processing task.
[0182] The target data processing task is used to instruct various data processing on the target data. For example, the target image processing task - image processing task C1 instructs to perform noise removal processing on the image (called noise removal task), target recognition processing on the noise-removed image (called target recognition task), and image encoding processing on the target-recognized image (called image encoding task).
[0183] Step 420: The general processor sends the indication information of multiple configuration templates of the target data processing task and the task information of the target data processing task to the scheduler.
[0184] The target data processing task indicates that multiple data processing operations should be performed on the target data, that is, it indicates that multiple data processing tasks should be performed. Therefore, the configuration template of the target data processing task may include the configuration template of each of the multiple data processing tasks, that is, it includes multiple configuration templates (e.g., configuration template of the first data processing task, configuration template of the second data processing task, and configuration template of the third data processing task).
[0185] Taking the aforementioned target image processing task - image processing task C1 as an example, the multiple configuration templates for image processing task C1 include: configuration templates for noise removal task, configuration templates for target recognition task, and configuration templates for image encoding task.
[0186] The task information of the target data processing task can be used to indicate the various data processing required to achieve the target data processing task, and can also be used to indicate the data that the target data processing task needs to process.
[0187] Therefore, the task information of the target data processing task sent by the general-purpose processor to the scheduler may include: indication information of various data processing required to implement the target data processing task, and data indication parameters of the target data processing task (such as the address parameters of the target data processing task).
[0188] The data processing instructions can be represented in various feasible data formats to indicate the processing method. For example, the data processing instructions can be text descriptions, commands, etc.
[0189] The address parameters of the target data processing task may include: the input data address parameters and the output data address parameters of the target data processing task.
[0190] The input data address parameter of the target data processing task is used to indicate the storage address of the input data (i.e. the data being processed) of the target data processing task.
[0191] The output data address parameter of the target data processing task is used to indicate the storage address of the output data of the target data processing task (that is, the processing result obtained by processing the data).
[0192] Step 430: The scheduler configures multiple accelerators based on the indication information of multiple configuration templates for the target data processing task and the task information of the target data processing task.
[0193] In step 430, the scheduler can sequentially configure multiple accelerators according to the processing order of various data processing tasks indicated by the target data processing task. In this way, the multiple accelerators can process multiple data processing tasks in sequence to complete the target data processing task.
[0194] The following section uses the aforementioned target image processing task - image processing task C1 - as an example to introduce the process of configuring multiple accelerators in the scheduler.
[0195] Image processing task C1 instructs the following steps: noise removal processing of the image (i.e., target data) (referred to as noise removal task), target recognition processing of the noise-removed image (referred to as target recognition task), and image encoding processing of the target-recognized image (referred to as image encoding task).
[0196] To complete image processing task C1, accelerator 1 must first process the noise removal task, then accelerator 2 must process the target recognition task, and then accelerator 3 must process the image encoding task.
[0197] In some embodiments, accelerator 1 is used to process the image signal output from the image signal sensor and can be referred to as an Image Signal Processor (ISP) accelerator. Accelerator 2 is used to perform various required processing on the image output from the ISP accelerator and can be referred to as an image processing accelerator. Accelerator 3 is used to encode the image output from the image processing accelerator and can be referred to as an encoding accelerator.
[0198] The image processing task C1 has several configuration templates, including: a configuration template for noise removal, a configuration template for object recognition, and a configuration template for image encoding.
[0199] The process by which the scheduler configures multiple accelerators (including accelerator 1, accelerator 2, and accelerator 3) includes the following steps S1 to S3:
[0200] S1, The scheduler executes the configuration operation for accelerator 1.
[0201] In S1, the scheduler can send the configuration template indication information for the first type of data processing task received—the configuration template indication information for the noise removal task—to the accelerator 1. This allows the accelerator 1 to obtain the configuration template for the noise removal task based on the indication information, and to configure the accelerator 1 (e.g., configure the storage space of the accelerator 1) based on the configuration template for the noise removal task.
[0202] The configuration template for the noise removal task includes the processing parameters for the noise removal task and a first target pointer. The first target pointer indicates a first target storage space, which is used to store the data indication parameters for the noise removal task.
[0203] The data indication parameters for the noise removal task include the address parameters of the noise removal task, and the address parameters of the noise removal task include the input data address parameters of the noise removal task (that is, the input data address parameters of the target data processing task) and the output data address parameters (which can be generated by the scheduler or accelerator 1 and other processing devices as needed).
[0204] This section describes the specific operations for configuring Accelerator 1 based on the configuration template. Figure 2 Step 220 is similar; please refer to the relevant instructions for step 220.
[0205] Furthermore, the scheduler can write the data indication parameters of the noise removal task into the first target storage space. For example, the scheduler is implemented by an accelerator, and the accelerator can write the data indication parameters of the noise removal task into the first target storage space.
[0206] Thus, after configuring accelerator 1, accelerator 1 can obtain the task parameters of the noise removal task according to the configuration result, and execute the noise removal task according to the task parameters.
[0207] S2, The scheduler executes the accelerator 2 configuration operation.
[0208] In S2, the scheduler can send indication information of the configuration template for the second type of data processing task received—indication information of the configuration template for the target recognition task—to the accelerator 2. This allows the accelerator 2 to obtain the configuration template for the target recognition task based on the indication information, and to configure the accelerator 2 (e.g., configure the storage space of the accelerator 2) according to the configuration template for the target recognition task.
[0209] The configuration template for the target recognition task includes the processing parameters for the target recognition task and a second target pointer. The second target pointer indicates a second target storage space, which is used to store the data indication parameters for the target recognition task.
[0210] The data indication parameters for the target recognition task include the address parameters of the target recognition task, which include the input data address parameters (i.e., the output data address parameters of the noise removal task) and the output data address parameters (which can be generated by the scheduler or accelerator 2 and other processing devices as needed).
[0211] This section details the specific operations for configuring Accelerator 2 based on the configuration template. Figure 2 Step 220 is similar; please refer to the relevant instructions for step 220.
[0212] Furthermore, the scheduler can write the data indication parameters of the target recognition task into the second target storage space. For example, the scheduler is implemented by an accelerator, and the accelerator can write the data indication parameters of the target recognition task into the second target storage space.
[0213] Thus, after configuring accelerator 2, accelerator 2 can obtain the task parameters of the target recognition task according to the configuration result, and execute the target recognition task according to the task parameters.
[0214] S3, the scheduler executes the accelerator 3 configuration operation.
[0215] In S3, the scheduler can send the configuration template indication information for the received third data processing task—the configuration template indication information for the image encoding task—to the accelerator 3. This allows the accelerator 3 to obtain the configuration template for the image encoding task based on the indication information, and to configure the accelerator 3 (e.g., configure the storage space of the accelerator 3) according to the configuration template for the image encoding task.
[0216] The configuration template for the image coding task includes the processing parameters of the image coding task and a third target pointer. The third target pointer indicates a third target storage space, which is used to store the data indication parameters of the image coding task.
[0217] The data indication parameters for the image coding task include the address parameters of the image coding task, which include the input data address parameters (i.e., the output data address parameters of the target recognition task) and the output data address parameters (i.e., the output data address parameters of the target data processing task).
[0218] This section details the specific operations for configuring Accelerator 3 based on the configuration template. Figure 2 Step 220 is similar; please refer to the relevant instructions for step 220.
[0219] Furthermore, the scheduler can write data indication parameters of the image encoding task to a third target storage space. For example, the scheduler is implemented using an accelerator, and the accelerator can write the data indication parameters of the image encoding task to the third target storage space.
[0220] Thus, after configuring accelerator 3, accelerator 3 can obtain the task parameters of the image encoding task according to the configuration result, and execute the image encoding task according to the task parameters.
[0221] After accelerators 1, 2, and 3 have completed their respective data processing tasks, the target data processing task - image processing task C1 - is completed.
[0222] The information processing method proposed in the embodiments of this application (e.g.) Figure 4The method shown in the figure can automatically configure multiple accelerators in scenarios where multiple accelerators are needed to process multiple data processing tasks to complete the target data processing task. This can be achieved by the scheduler through simpler and less complex operations such as instructing the multiple accelerators to use the required configuration templates and writing the data instruction parameters of multiple data processing tasks to the target storage space.
[0223] The above text combines Figures 2 to 4 This document describes in detail the information processing method provided according to embodiments of this application. The following will combine... Figure 5 This application describes the apparatus provided according to the present application. These apparatuses can be used to implement the functions of the processor in the above method embodiments, and thus can also achieve the beneficial effects of the above method embodiments.
[0224] Figure 5 This is a schematic diagram of the structure of the information processing apparatus provided in an embodiment of this application. Figure 5 As shown, the information processing device 500 includes a task acquisition module 510 and a configuration module 520.
[0225] The task acquisition module 510 is used to acquire data processing tasks, which include processing parameters used for data processing and data indication parameters used to indicate the data.
[0226] The configuration module 520 is used to configure the accelerator according to the configuration template of the data processing task. The configuration template includes processing parameters and a pointer to the target storage space. The target storage space is used to store the data indication parameters. The accelerator is used to obtain the processing parameters and data indication parameters according to the configuration result, and to execute the data processing task according to the processing parameters and data indication parameters.
[0227] In some possible implementations, configuration module 520 is also used to obtain the configuration template of the data processing task from at least one configuration template of at least one data processing task.
[0228] In some possible implementations, at least one configuration template includes a first configuration template and a second configuration template. The first configuration template includes processing parameters for a first process and a pointer to a first target storage space. The second configuration template includes processing parameters for a second process and a pointer to a second target storage space.
[0229] In some possible implementations, at least one configuration template includes a first configuration template, the first configuration template includes multiple configuration templates, the multiple configuration templates include a third configuration template and a fourth configuration template, the third configuration template includes processing parameters of the first process and a pointer to a third target storage space, and the fourth configuration template includes processing parameters of the first process and a pointer to a fourth target storage space.
[0230] In some possible implementations, the data processing task includes a first data processing task and a second data processing task, wherein the first data processing task is used to instruct a first type of processing on the first data, and the second data processing task is used to instruct a second type of processing on the second data.
[0231] In some possible implementations, the configuration module 520 is further configured to: configure the accelerator according to a configuration template for a first data processing task, the configuration template including processing parameters for a first type of processing and a pointer to a first target storage space, the first target storage space being used to store data indication parameters of the first data; and configure the accelerator according to a configuration template for a second data processing task, the configuration template including processing parameters for a second type of processing and a pointer to a second target storage space, the second target storage space being used to store data indication parameters of the second data. In some possible implementations, the aforementioned second data is the processing result obtained by performing the first type of processing on the first data.
[0232] In some possible implementations, the data processing tasks include a third data processing task and a fourth data processing task, wherein the third data processing task is used to perform the first type of processing on the third data, and the fourth data processing task is used to perform the first type of processing on the fourth data.
[0233] In some possible implementations, the configuration module 520 is further configured to: configure the accelerator according to a configuration template for a third data processing task, the configuration template of the third data processing task including processing parameters for a first processing and a pointer to a third target storage space, the third target storage space being used to store data indication parameters for the third data; and configure the accelerator according to a configuration template for a fourth data processing task, the configuration template of the fourth data processing task including processing parameters for a first processing and a pointer to a fourth target storage space, the fourth target storage space being used to store data indication parameters for the fourth data.
[0234] In some possible implementations, the data indication parameters include address parameters indicating the storage address of the data. The address parameters of the data processing task include at least one of an input data address parameter and an output data address parameter. Specifically, the input data address parameter indicates the storage address of the data, and the output data address parameter indicates the storage address of the data processing result.
[0235] In some possible implementations, the configuration module 520 is also used to: configure the accelerator's storage space according to the configuration template of the data processing task, so that the processing parameters included in the configuration template and the pointer indicating the target storage space are stored in the accelerator's storage space.
[0236] Optionally, the task acquisition module 510 and the configuration module 520 may each include multiple sub-modules, which can be deployed separately to implement some of the functions of the corresponding module, such as implementing the aforementioned... Figures 2-4 One or more steps of the provided information processing method.
[0237] In some possible implementations, configuration module 520 further includes a first configuration module and a second configuration module. Figure 5 (not shown in the image), wherein the first configuration module can be set on the general-purpose processor, and the second configuration module can be set on the accelerator.
[0238] The first configuration module is used to send the instruction information of the configuration template for the data processing task to the accelerator.
[0239] The second configuration module is used to obtain the configuration template of the data processing task according to the instruction information, and to configure the accelerator according to the configuration template of the data processing task.
[0240] In some possible implementations, the second configuration module is also used to configure the accelerator's storage space according to the configuration template of the data processing task, so that the processing parameters included in the configuration template and the pointer indicating the target storage space are stored in the accelerator's storage space.
[0241] In some possible implementations, the data instruction parameters of the data processing task can be written into the target storage space by either the first configuration module or the second configuration module.
[0242] All devices can be implemented in software or hardware. For example, the implementation of information processing device 500 will be described below.
[0243] As an example of a software functional unit, the information processing device 500 may include code running on a computing instance. This computing instance can be at least one of a physical host (computing device), a virtual machine, a container, or other computing devices. Furthermore, the aforementioned computing instance may be one or more. For example, the information processing device 500 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code can be distributed within the same region or in different regions. Further, the multiple hosts / virtual machines / containers used to run the code can be distributed within the same availability zone (AZ) or in different AZs, each AZ including one or more geographically proximate data centers. Typically, a region may include multiple AZs.
[0244] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.
[0245] As an example of a hardware functional unit, the information processing device 500 may include at least one computing device, such as a server. Alternatively, the information processing device 500 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be implemented using a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof.
[0246] The information processing device 500 includes multiple computing devices that can be distributed in the same region or in different regions. Similarly, the multiple computing devices included in the information processing device 500 can be distributed in the same Availability Zone (AZ) or in different AZs. Likewise, the multiple computing devices included in the information processing device 500 can be distributed in the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0247] This application also provides a computing device 600. For example... Figure 6 As shown, the computing device 600 includes: a bus 602, a processor 604, a memory 606, and a communication interface 608. The processor 604, memory 606, and communication interface 608 communicate with each other via the bus 602. The computing device 600 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 600. Optionally, the processor 604 of the computing device 600 can be connected to a display or input device via the communication interface 608. Figure 6 (Not shown in the image).
[0248] Bus 602 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be divided into address buses, data buses, control buses, etc. For ease of representation, Figure 6 The bus 602 may be represented by a single line, but this does not mean that there is only one bus or one type of bus. The bus 602 may include a path for transmitting information between various components of the computing device 600 (e.g., memory 606, processor 604, communication interface 608).
[0249] Processor 604 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP). In this embodiment, processor 604 is used to execute the functions described in this embodiment. Figures 2-4 The steps or operations in the information processing method proposed in the paper.
[0250] Memory 606 may include volatile memory, such as random access memory (RAM). Processor 604 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).
[0251] The memory 606 stores executable program code, and the processor 604 executes the executable program code to implement the functions of the aforementioned task acquisition module 510 and configuration module 520, thereby realizing the embodiments of this application. Figures 2-4 The information processing method proposed in the present application. That is, the memory 606 stores information for executing the embodiments of this application. Figures 2-4 The instructions for the information processing method proposed in [the document].
[0252] The communication interface 608 uses transceiver modules, such as, but not limited to, network interface cards and transceivers, to enable communication between the computing device 600 and other devices or communication networks.
[0253] The display may include various display devices capable of display functions, such as plasma displays and liquid crystal displays. The computing device 600 can implement the functions described in the embodiments of this application through the display. Figures 2-4 The information processing method proposed in the paper involves display functions.
[0254] Input devices can include various input devices that enable information / signal input, such as keyboards, mice, and touch screens.
[0255] This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions, capable of running on a computing device or stored on any usable medium. The instructions contained in the computer program product may include instructions for performing the embodiments of this application. Figures 2-4 The instructions for the steps or operations in the information processing method proposed herein. When the computer program product is run on at least one computing device, the at least one computing device performs the actions described in the embodiments of this application. Figures 2-4 The steps or operations of the information processing method proposed in the paper.
[0256] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute the embodiments of this application. Figures 2-4 The steps or operations of the information processing method proposed in the paper.
[0257] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of this application.
[0258] The terms “first,” “second,” “third,” and “fourth,” etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to define a specific order.
[0259] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
Claims
1. An information processing method characterized by comprising: The method comprises: obtaining a data processing task, the data processing task comprising processing parameters used for data processing and data indication parameters used for indicating the data; configuring an accelerator according to a configuration template of the data processing task, the configuration template comprising the processing parameters and a pointer indicating a target storage space used for storing the data indication parameters, the accelerator being used for obtaining the processing parameters and the data indication parameters according to a configuration result, and performing the data processing task according to the processing parameters and the data indication parameters.
2. The method of claim 1, wherein, The method further comprises: obtaining the configuration template of the data processing task in at least one configuration template of at least one data processing task.
3. The method of claim 2, wherein, The at least one configuration template comprises a first configuration template and a second configuration template, the first configuration template comprising processing parameters of a first processing and a pointer indicating a first target storage space, and the second configuration template comprising processing parameters of a second processing and a pointer indicating a second target storage space.
4. The method according to claim 2 or 3, characterized in that, The at least one configuration template comprises a first configuration template, the first configuration template comprising a plurality of configuration templates, the plurality of configuration templates comprising a third configuration template and a fourth configuration template, the third configuration template comprising processing parameters of a first processing and a pointer indicating a third target storage space, and the fourth configuration template comprising the processing parameters of the first processing and a pointer indicating a fourth target storage space.
5. The method according to any one of claims 1-4, characterized in that, The data processing task comprises a first data processing task and a second data processing task, the first data processing task being used for indicating a first processing on first data, and the second data processing task being used for indicating a second processing on second data; The configuring the accelerator according to the configuration template of the data processing task comprises: configuring the accelerator according to a configuration template of the first data processing task, the configuration template of the first data processing task comprising the processing parameters of the first processing and a pointer indicating a first target storage space used for storing data indication parameters of the first data; configuring the accelerator according to a configuration template of the second data processing task, the configuration template of the second data processing task comprising the processing parameters of the second processing and a pointer indicating a second target storage space used for storing data indication parameters of the second data.
6. The method according to any one of claims 1-5, characterized in that, The data processing task comprises a third data processing task and a fourth data processing task, the third data processing task being used for a first processing on third data, and the fourth data processing task being used for a first processing on fourth data; The configuring the accelerator according to the configuration template of the data processing task comprises: configuring the accelerator according to a configuration template of the third data processing task, the configuration template of the third data processing task comprising the processing parameters of the first processing and a pointer indicating a third target storage space used for storing data indication parameters of the third data; The accelerator is configured according to the configuration template of the fourth data processing task, the configuration template of the fourth data processing task comprising the processing parameter of the first processing and a pointer indicating a fourth target storage space used for storing the data indication parameter of the fourth data.
7. The method of claim 5, wherein, The second data is a processing result obtained by performing the first processing on the first data.
8. The method according to any one of claims 1-7, characterized in that, The data indication parameter comprises an address parameter used for indicating a storage address of the data, the address parameter comprising at least one of an input data address parameter and an output data address parameter; The input data address parameter is used for indicating the storage address of the data, and the output data address parameter is used for indicating the storage address of the processing result of the data.
9. The method according to any one of claims 1-8, characterized in that, The information processing system comprises a general processor and the accelerator, and the accelerator is configured according to the configuration template of the data processing task, comprising: The general processor sends indication information of the configuration template of the data processing task to the accelerator; The accelerator acquires the configuration template of the data processing task according to the indication information, and configures the accelerator according to the configuration template of the data processing task.
10. The method according to any one of claims 1-9, characterized in that, The accelerator is configured according to the configuration template of the data processing task, comprising: The storage space of the accelerator is configured according to the configuration template of the data processing task, so that the processing parameter and the pointer indicating the target storage space comprised in the configuration template are stored in the storage space of the accelerator.
11. An information processing method characterized by comprising: The method is executed by a general processor, and the method comprises: Acquiring a data processing task, the data processing task comprising a processing parameter used for data processing and a data indication parameter used for indicating the data; Sending indication information of the configuration template of the data processing task to an accelerator, the indication information being used for indicating the configuration template of the data processing task, the configuration template of the data processing task being used for configuring the accelerator, the configuration template comprising the processing parameter and a pointer indicating a target storage space, the target storage space being used for storing the data indication parameter.
12. The method of claim 11, wherein, The method further comprises: Determining the configuration template of the data processing task in at least one configuration template of at least one data processing task.
13. The method of claim 12, wherein, The at least one configuration template comprises a first configuration template and a second configuration template, the first configuration template comprising a processing parameter of a first processing and a pointer indicating a first target storage space, and the second configuration template comprising a processing parameter of a second processing and a pointer indicating a second target storage space.
14. The method according to claim 12 or 13, characterized in that, The at least one configuration template comprises a first configuration template, the first configuration template comprising a plurality of configuration templates, the plurality of configuration templates comprising a third configuration template and a fourth configuration template, the third configuration template comprising a processing parameter of a first processing and a pointer indicating a third target storage space, and the fourth configuration template comprising the processing parameter of the first processing and a pointer indicating a fourth target storage space.
15. An information processing method characterized by comprising: The method is executed by an accelerator, and the method comprises: Receiving indication information of a configuration template of a data processing task; According to the indication information, a configuration template of the data processing task is acquired, and the accelerator is configured according to the configuration template of the data processing task, the data processing task including processing parameters used for data processing and data indication parameters used for indicating the data, and the configuration template including the processing parameters and a pointer indicating a target storage space used for storing the data indication parameters; The accelerator is configured according to the configuration result to acquire the processing parameters and the data indication parameters, and to execute the data processing task according to the processing parameters and the data indication parameters.
16. The method of claim 15, wherein, The data processing task includes a first data processing task and a second data processing task, the first data processing task being used for indicating first processing of first data, and the second data processing task being used for indicating second processing of second data; The configuration of the accelerator according to the configuration template of the data processing task includes: The configuration of the accelerator according to the configuration template of the first data processing task includes processing parameters of the first processing and a pointer indicating a first target storage space used for storing data indication parameters of the first data; The configuration of the accelerator according to the configuration template of the second data processing task includes processing parameters of the second processing and a pointer indicating a second target storage space used for storing data indication parameters of the second data.
17. The method according to claim 15 or 16, characterized in that, The data processing task includes a third data processing task and a fourth data processing task, the third data processing task being used for first processing of third data, and the fourth data processing task being used for first processing of fourth data; The configuration of the accelerator according to the configuration template of the data processing task includes: The configuration of the accelerator according to the configuration template of the third data processing task includes processing parameters of the first processing and a pointer indicating a third target storage space used for storing data indication parameters of the third data; The configuration of the accelerator according to the configuration template of the fourth data processing task includes processing parameters of the first processing and a pointer indicating a fourth target storage space used for storing data indication parameters of the fourth data.
18. The method of claim 16, wherein, The second data is a processing result of the first processing of the first data.
19. The method of any one of claims 15-17, wherein, The configuration of the accelerator according to the configuration template of the data processing task includes: The configuration of the storage space of the accelerator according to the configuration template of the data processing task is performed, so that the processing parameters and the pointer indicating the target storage space included in the configuration template are stored in the storage space of the accelerator.
20. An information processing apparatus for implementing the method of any one of claims 1-19, comprising: The apparatus includes: A task acquisition module is configured to acquire a data processing task, the data processing task including processing parameters used for data processing and data indication parameters used for indicating the data; The task acquisition module is configured to acquire a data processing task, the data processing task including processing parameters used for data processing and data indication parameters used for indicating the data; A configuration module is configured to configure the accelerator according to a configuration template of the data processing task, the configuration template including the processing parameters and a pointer indicating a target storage space for storing the data indication parameters, and the accelerator is configured to obtain the processing parameters and the data indication parameters according to the configuration result, and execute the data processing task according to the processing parameters and the data indication parameters.
21. An information processing system, characterized by comprising: The system includes a general processor configured to perform the method of any one of claims 11-14, and an accelerator configured to perform the method of any one of claims 15-19.
22. A chip system, characterized by The chip system includes a processor and a power supply circuit configured to supply power to the processor, and the processor is configured to perform the operation steps of the method of any one of claims 1-19.
23. A computing device, comprising: The computing device includes a processor and a memory, and the processor is configured to execute instructions stored in the memory to cause the computing device to perform the method of any one of claims 1-19.
24. A computer program product comprising instructions, characterized in that, The instructions, when executed by at least one computing device, cause the at least one computing device to perform the method of any one of claims 1-19.
25. A computer readable storage medium, characterized in that, Computer program instructions, when executed by a computing device, cause the computing device to perform the method of any one of claims 1-19.