Storage resource management method, processor and computer system

By dynamically adjusting the storage capacity of the accelerator in the AI ​​chip and flexibly configuring the storage resources, the problem of low storage resource utilization in the AI ​​chip is solved, achieving more efficient storage resource management and lower manufacturing costs.

CN120066386APending Publication Date: 2025-05-30HUAWEI TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202311631673.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-29
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

The storage space allocation of accelerators in AI chips requires manual re-planning, resulting in low utilization of storage resources and the lack of reserved storage space will lead to waste of resources.

Method used

A storage resource management method is provided, through the management module, the storage capacity of the accelerator is dynamically adjusted, and the storage area is allocated from the storage resource pool according to the requirements of the accelerator, so as to realize flexible storage resource configuration for each accelerator.

Benefits of technology

It improves the utilization rate of storage resources in AI chips, reduces chip manufacturing costs, and improves commercial competitiveness, while avoiding wasting storage resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120066386A_ABST
    Figure CN120066386A_ABST
Patent Text Reader

Abstract

The invention discloses a storage resource management method, a processor and a computer system. The method is applied to the field of computers. The special processor comprises a plurality of accelerators, a storage resource pool and a management module, the plurality of accelerators comprise a first accelerator, and the method comprises the following steps: the management module obtains storage capacity required by the first accelerator and allocates a first storage area to the first accelerator from the storage resource pool. Wherein the storage capacity of the first storage area meets the storage capacity required by the first accelerator. The first storage area is used for storing data of a service indicated by the first accelerator acceleration processing general processor. Therefore, the special processor can dynamically adjust the storage capacity allocated to the accelerator according to the storage capacity demand of the accelerator, thereby realizing flexible configuration of storage resources for each accelerator in the special processor, and improving the utilization rate of the storage resources of the special processor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers, and in particular, to a storage resource management method, a processor, and a computer system. Background Art

[0002] As the core device in the field of artificial intelligence, an artificial intelligence (AI) chip can provide higher computing power compared to a general-purpose processor. During the design and manufacturing process of an AI chip, it is necessary to manually allocate a fixed storage space used by the accelerator according to the computing power and specifications of the accelerator in the AI chip, so as to store instructions, tasks, computing data, parameters, etc. of the accelerator. For different types or models of AI chips, the design of the accelerator in the AI chip is different, and it is necessary to manually re-plan the storage space used by the accelerator. Generally, the storage space used by the accelerator during the use of the AI chip is not easily changed. In order to ensure that the storage space allocated to the accelerator meets the storage requirements when the accelerator executes computing tasks, a relatively large storage space is allocated to the accelerator. However, reserving too much storage space will result in waste of storage resources, and the utilization rate of storage resources in the AI chip is relatively low. Summary of the Invention

[0003] This application provides a storage resource management method, a processor, and a computer system, thereby improving the utilization rate of storage resources in an AI chip.

[0004] In a first aspect, a storage resource management method is provided. The method is applied to a dedicated processor. The dedicated processor includes multiple accelerators, a storage resource pool, and a management module. The multiple accelerators include a first accelerator. The method includes: the management module obtains the storage capacity required by the first accelerator, and allocates a first storage area to the first accelerator from the storage resource pool. The storage capacity of the first storage area meets the storage capacity required by the first accelerator. The first storage area is used to store data for the first accelerator to accelerate and process a computing task indicated by a general-purpose processor.

[0005] Compared with the traditional solution, that is, before the dedicated processor leaves the factory, a sufficient amount of storage capacity is manually allocated according to the computing power and specifications of the accelerator in the dedicated processor, and the storage capacity of each accelerator in the dedicated processor is fixed and unchanged, resulting in low utilization rate of the storage resources of the dedicated processor. The solution provided in this application enables the dedicated processor to dynamically adjust the storage capacity allocated to the accelerator according to the storage capacity requirements of the accelerator, realizes flexible configuration of storage resources for each accelerator in the dedicated processor, and improves the utilization rate of the storage resources of the dedicated processor.

[0006] In a possible implementation, the method further includes: updating the storage configuration record of the first accelerator according to the storage capacity of the first storage area. The storage configuration record of the first accelerator is used to indicate the storage capacity allocated to the first accelerator.

[0007] Use the storage configuration record to record the storage capacity allocated to the accelerator. After adjusting the storage capacity of the accelerator, update the storage configuration record in a timely manner, so as to accurately record the storage capacity allocated to the accelerator, realize flexible configuration of storage resources for the accelerator, and improve the utilization rate of the storage resources of the dedicated processor.

[0008] In another possible implementation, the storage area allocated to the first accelerator includes a first storage area and a second storage area; the storage capacity of the first accelerator indicated by the storage configuration record of the first accelerator is equal to the sum of the storage capacity of the first storage area and the storage capacity of the second storage area.

[0009] In another possible implementation, the first storage area is allocated after the second storage area allocated to the first accelerator. The address of the second storage area is continuous with the address of the first storage area.

[0010] Thus, when the accelerator processes a computing task, it accesses continuous storage areas, which can improve the utilization rate and access rate of the storage resources of the dedicated processor.

[0011] In another possible implementation, the multiple accelerators further include a second accelerator, and the first storage area is allocated from a third storage area allocated to the second accelerator; the method further includes: updating the address of the third storage area in the storage configuration record of the second accelerator according to the storage capacity of the first storage area, and the storage capacity of the third storage area remains unchanged.

[0012] In another possible implementation, the address of the second storage area is not continuous with the address of the first storage area.

[0013] Thus, allocate storage areas for the accelerators from the idle areas in the storage medium, which can improve the utilization rate of the storage resources of the dedicated processor and avoid changing the addresses of the storage areas of other accelerators.

[0014] In another possible implementation, obtaining the storage capacity required by the first accelerator includes: obtaining a resource application request of the first accelerator, and the resource application request is used to indicate the storage capacity required by the first accelerator.

[0015] By obtaining the resource application request actively sent by the accelerator, allocate the storage capacity that meets the requirements of the accelerator to the accelerator in a timely manner, flexibly configure the storage resources for the accelerator, improve the utilization rate of the storage resources of the dedicated processor, and also enable the accelerator to have sufficient storage areas to store data when processing the computing tasks indicated by the general-purpose processor.

[0016] In another possible implementation, obtaining the storage capacity required by the first accelerator includes: determining the storage capacity required by the first accelerator according to the computing tasks that the general-purpose processor instructs the first accelerator to process.

[0017] Before the accelerator applies for storage resources, the management module allocates in advance to the accelerator the storage capacity that meets the requirements of the accelerator according to the computing tasks that the accelerator needs to process, avoiding the accelerator applying to the management module for storage resources when it needs storage resources, which may affect the rate at which the accelerator processes computing tasks. Thus, the storage resources are flexibly configured for the accelerator, the utilization rate of the storage resources of the dedicated processor is improved, and the accelerator also has sufficient storage areas to store data when processing the computing tasks instructed by the general-purpose processor.

[0018] In another possible implementation, obtaining the storage capacity required by the first accelerator includes: when the first accelerator processes the computing tasks instructed by the general-purpose processor, obtaining the storage capacity required by the first accelerator.

[0019] When the accelerator processes the computing tasks instructed by the general-purpose processor, the storage capacity that meets the requirements of the accelerator is allocated to the accelerator in a timely manner. Thus, the storage resources are flexibly configured for the accelerator, the utilization rate of the storage resources of the dedicated processor is improved, and the accelerator also has sufficient storage areas to store data when processing the computing tasks instructed by the general-purpose processor.

[0020] In another possible implementation, the storage resource pool includes multiple types of storage media. Allocating a first storage area to the first accelerator from the storage resource pool includes: allocating a first storage area to the first accelerator from one type of storage media.

[0021] Multiple types of storage media are configured in the dedicated processor to meet the requirements of the accelerator for storage resources, flexibly configure the storage resources for the accelerator, and improve the utilization rate of the storage resources of the dedicated processor.

[0022] In another possible implementation, the first storage area is the storage area outside the faulty area in the storage resource pool.

[0023] When the storage media in the dedicated processor fails, the storage resources can also be flexibly reallocated to the accelerator, improving the reliability of the dedicated processor.

[0024] For example, allocating a first storage area to the first accelerator from the storage resource pool includes: allocating a first storage area to the first accelerator from the storage area outside the faulty area in the storage resource pool.

[0025] In another possible implementation, the method further includes: after the first accelerator finishes executing the computing task instructed by the general-purpose processor, releasing the storage area allocated to the first accelerator.

[0026] When the accelerator finishes executing the computing task instructed by the general-purpose processor without using storage resources, by releasing the storage resources allocated to the accelerator, it is convenient for other accelerators in the dedicated processor to use the storage resources, thereby improving the utilization rate of the storage resources of the dedicated processor.

[0027] In another possible implementation, before obtaining the storage capacity required by the first accelerator, the method further includes: when the dedicated processor is started, updating the default storage configuration record of the first accelerator according to the system configuration file to obtain the storage configuration record of the first accelerator.

[0028] Updating the default storage configuration record of the accelerator according to the system configuration file so that the storage area allocated to the accelerator meets the actual requirements for storage resources.

[0029] In a second aspect, a processor is provided, and the processor includes various modules that perform the operation steps of the method in the first aspect or any possible implementation manner of the first aspect. For example, the processor includes a plurality of accelerators, a storage resource pool, and a management module. The plurality of accelerators includes a first accelerator.

[0030] The management module is used to obtain the storage capacity required by the first accelerator; the management module is further used to allocate a first storage area to the first accelerator from the storage resource pool, and the storage capacity of the first storage area meets the storage capacity required by the first accelerator; the first accelerator is used to accelerate the processing of the computing task instructed by the general-purpose processor, and the first storage area is used to store the data for the first accelerator to accelerate the processing of the computing task instructed by the general-purpose processor.

[0031] In a possible implementation manner, the management module is further used to update the storage configuration record of the first accelerator according to the storage capacity of the first storage area. The storage configuration record of the first accelerator is used to indicate the storage capacity allocated to the first accelerator.

[0032] In another possible implementation manner, the storage area allocated to the first accelerator includes a first storage area and a second storage area; the storage capacity of the first accelerator indicated by the storage configuration record of the first accelerator is equal to the sum of the storage capacity of the first storage area and the storage capacity of the second storage area.

[0033] In another possible implementation manner, the first storage area is allocated after the second storage area allocated to the first accelerator. The address of the second storage area is continuous with the address of the first storage area.

[0034] In another possible implementation, the multiple accelerators further include a second accelerator, and the first storage area is allocated from a third storage area assigned to the second accelerator; the management module is further configured to update the address of the third storage area in the storage configuration record of the second accelerator according to the storage capacity of the first storage area, and the storage capacity of the third storage area remains unchanged.

[0035] In another possible implementation, the address of the second storage area is not continuous with the address of the first storage area.

[0036] In another possible implementation, when the management module obtains the storage capacity required by the first accelerator, it is specifically configured to: obtain a resource application request of the first accelerator, where the resource application request is used to indicate the storage capacity required by the first accelerator.

[0037] In another possible implementation, when the management module obtains the storage capacity required by the first accelerator, it is specifically configured to: determine the storage capacity required by the first accelerator according to the computing tasks that the first accelerator is instructed to process by the general-purpose processor.

[0038] In another possible implementation, when the management module obtains the storage capacity required by the first accelerator, it is specifically configured to: obtain the storage capacity required by the first accelerator when the first accelerator processes the computing tasks instructed by the general-purpose processor.

[0039] In another possible implementation, the storage resource pool includes multiple types of storage media. When the management module allocates the first storage area to the first accelerator from the storage resource pool, it is specifically configured to: allocate the first storage area to the first accelerator from one type of storage media.

[0040] In another possible implementation, the first storage area is a storage area outside the faulty area in the storage resource pool.

[0041] In another possible implementation, the management module is further configured to release the storage area allocated to the first accelerator after the first accelerator finishes executing the computing tasks instructed by the general-purpose processor.

[0042] In another possible implementation, the management module is further configured to: when the dedicated processor is started, update the default storage configuration record of the first accelerator according to the system configuration file to obtain the storage configuration record of the first accelerator.

[0043] In a third aspect, a chip is provided, and the chip includes a logic circuit and a power supply circuit; wherein, the power supply circuit is used to supply power to the logic circuit; the logic circuit is used to execute the operation steps of the method in the first aspect or any one of the possible implementation manners of the first aspect.

[0044] Fourthly, a computer system is provided. The computer system includes a general-purpose processor and a dedicated processor as described in the second aspect or any one of the possible implementation manners of the second aspect. When the dedicated processor executes a set of computer instructions, it performs the operation steps of the method in the first aspect or any one of the possible implementation manners of the first aspect.

[0045] Fifthly, a computer system is provided. The computer system includes multiple computer devices. Each computer device includes a general-purpose processor and a dedicated processor as described in the second aspect or any one of the possible implementation manners of the second aspect. When the dedicated processor executes a set of computer instructions, it performs the operation steps of the method in the first aspect or any one of the possible implementation manners of the first aspect.

[0046] Sixthly, a computer-readable storage medium is provided. Instructions are stored in the computer-readable storage medium. When the instructions run on a computer, the computer is caused to execute the methods described in the above aspects.

[0047] For the technical effects brought by any one of the design manners in the second aspect to the sixth aspect, reference can be made to the technical effects brought by the first aspect or different design manners in the first aspect, which will not be elaborated here.

[0048] Based on the implementation manners provided in the above aspects of the present application, further combinations can be made to provide more implementation manners. Description of the Drawings

[0049] Figure 1 A schematic diagram of storage resource allocation for a dedicated processor provided for the prior art;

[0050] Figure 2 A schematic diagram of a computer system provided for the present application;

[0051] Figure 3 A schematic diagram of the relationship between a general-purpose processor and a dedicated processor provided for the present application;

[0052] Figure 4 A schematic diagram of a storage configuration table provided for the present application;

[0053] Figure 5 A schematic diagram of the flow of a storage resource management method provided for the present application;

[0054] Figure 6 A schematic diagram of the update of a storage configuration record provided for the present application;

[0055] Figure 7 A schematic diagram of the structure of a processor provided for the present application;

[0056] Figure 8A structural schematic diagram of a computer system provided by this application. Detailed implementation manners

[0057] For ease of understanding, the main terms involved in this application are first explained.

[0058] Artificial Intelligence (AI) chip: A module specifically used to process a large number of computing tasks in artificial intelligence applications. The central processing unit (CPU) processes other non-computing tasks. An AI chip can also be referred to as an AI accelerator, a computing card, or a dedicated processor. A general-purpose processor can refer to the central processing unit (CPU). AI chips mainly include high-power computing units with computing capabilities such as graphics processing unit (GPU), data processing unit (DPU), neural processing unit (NPU), and embedded neural-network processing unit (NPU).

[0059] With the development of dedicated processors, a dedicated processor can be a system on chip (SOC) containing multiple functional modules. Each functional module independently provides a function, and the storage resources in the dedicated processor are used by the functional modules. For example, a dedicated processor includes multiple accelerators and storage media. The multiple accelerators provide one type of calculation or multiple types of calculations, such as scalar calculation, vector calculation, and matrix calculation. Each accelerator can use a storage area in the storage media to store data. Exemplarily, as Figure 1 shown, the dedicated processor 100 includes n accelerators and a storage media 110. The storage media 110 includes operating spaces corresponding to the n accelerators. The operating spaces are used to store task information executed by the accelerators, execution results output by the accelerators, exception information and status information output during the operation of the accelerators, etc. The remaining storage space in the storage media 110 can be used to store data during the process of the accelerators processing computing tasks.

[0060] To support the storage requirements of the accelerator, before the dedicated processor leaves the factory, a storage area with consecutive addresses is allocated to the accelerator from the storage medium in the dedicated processor. The storage space is allocated to the accelerator according to the computing power of the accelerator. The stronger the computing power of the accelerator, the larger the storage area allocated to the accelerator. Additionally, to avoid insufficient storage area when the accelerator executes computing tasks, an excessive amount of storage area can be allocated to the accelerator. Since the accelerator exclusively uses the corresponding storage area, it results in waste of storage resources in the dedicated processor and low utilization rate of storage resources.

[0061] To solve the problem of low utilization rate of storage resources in the AI chip, this application provides a storage resource management method. The method is applied to a dedicated processor, which includes multiple accelerators, a storage resource pool, and a management module. The multiple accelerators include a first accelerator. The method includes: The management module obtains the storage capacity required by the first accelerator and allocates a first storage area to the first accelerator from the storage resource pool. Among them, the storage capacity of the first storage area meets the storage capacity required by the first accelerator. The first storage area is used to store the data of the first accelerator for accelerating the processing of the services instructed by the general-purpose processor.

[0062] Compared with the traditional solution, that is, before the dedicated processor leaves the factory, manually allocate enough storage capacity according to the computing power and specifications of the accelerators in the dedicated processor, and the storage capacity of each accelerator in the dedicated processor remains fixed, resulting in low utilization rate of the storage resources of the dedicated processor. In the solution provided by this application, the dedicated processor can dynamically adjust the storage capacity allocated to the accelerator according to the storage capacity requirements of the accelerator, realizing flexible configuration of storage resources for each accelerator in the dedicated processor, and improving the utilization rate of the storage resources of the dedicated processor. During the design, manufacturing, and use processes of the dedicated processor, storage resources can be flexibly configured for the accelerator, reducing the manufacturing cost of the chip and enhancing the commercial competitiveness of the chip.

[0063] If the method provided by this application is applied to a computer system including a general-purpose processor and a dedicated processor, then the computer system can provide AI acceleration computing capabilities, and the computer system can be applied to different AI application scenarios, such as scenarios of neural network inference and training, etc.

[0064] The storage resource management method provided by this application will be introduced in detail below with reference to the accompanying drawings. Figure 2 It is a schematic diagram of a computer system provided by this application. As Figure 2As shown, computer system 200 includes a general-purpose processor 210 and multiple dedicated processors. The computer system 200 can be an AI server, and the AI server can provide AI computing capabilities. The general-purpose processor 210 is interconnected with one or more dedicated processors through Peripheral Component Interconnect Express (PCIe) or Compute Express Link (CXL), etc. For example, the general-purpose processor 210 is interconnected with the dedicated processor 220 and the dedicated processor 230 through PCIe respectively.

[0065] The general-purpose processor 210 can be a host, and the dedicated processors are the controlled objects of the host.

[0066] The general-purpose processor 210 can be a CPU. The CPU can be a multi-core processor, that is, the processor includes one processor core or multiple processor cores. The general-purpose processor 210 is used to provide storage allocation management functions and computing task allocation management functions for the dedicated processors. The dedicated processors are used to accelerate the processing of computing tasks instructed by the general-purpose processor 210. For example, the dedicated processors perform scalar calculations, vector calculations, matrix calculations, etc. The dedicated processors can perform one type of calculation or multiple types of calculations. The functional modules in the dedicated processors can also store data in the storage areas allocated by the general-purpose processor. For ease of description, the dedicated processor 220 is taken as an example for illustration, and other dedicated processors refer to the description of the dedicated processor 220.

[0067] Exemplarily, as Figure 3 shown, the general-purpose processor 210 runs a chip management application and allocates storage capacity to the accelerators in the dedicated processor 220 according to the system configuration file. The system configuration file is a file used to record the storage capacity allocated to the functional modules in the dedicated processor. The system administrator or the computer system can set the storage capacity allocated to the functional modules according to the application scenarios of the dedicated processor and the characteristics of the functional modules in the dedicated processor. The general-purpose processor 210 runs a chip business application to allocate computing tasks to the dedicated processor 220. The general-purpose processor 210 runs a chip driver to facilitate communication between the general-purpose processor 210 and the dedicated processor 220.

[0068] For example, the dedicated processor 220 includes a startup module 221, a management module 222, multiple accelerators, and a storage resource pool 223.

[0069] The startup module 221 is used to initialize the accelerator, configuration parameters in the dedicated processor, and establish a communication connection with the general-purpose processor 210 when the dedicated processor 220 is powered on and started. For example, it initializes the chip clock, bus, storage resource pool, allocates a storage area for the accelerator in the dedicated processor, and loads the firmware of the accelerator. The startup module can be a hardware module or firmware in the dedicated processor.

[0070] The management module 222 is used to allocate a storage area for each accelerator from the storage resource pool 223 according to the storage capacity required by the accelerator.

[0071] Optionally, when the dedicated processor 220 is powered on and started, the startup module 221 also obtains the system configuration file from the general-purpose processor 210, and the management module 222 allocates a storage area for each accelerator from the storage resource pool 223 according to the system configuration file.

[0072] In some embodiments, the dedicated processor 220 also stores the correspondence between the accelerator and the storage area allocated to the accelerator. For example, the management module 222 may further include a storage medium for storing storage configuration records of multiple accelerators, recording the storage areas allocated to the accelerators. The storage area may also be alternatively described as storage capacity. The present application does not limit the type of the storage medium in the management module 222 and the storage form of the correspondence.

[0073] For example, the storage medium in the management module 222 may store a storage configuration table of the dedicated processor. The storage configuration table includes multiple table entries. One table entry is used to indicate the storage area allocated by the management module 222 to an accelerator. The storage area indicated by one table entry may be a continuous storage space. The management module 222 may create one table entry or multiple table entries for an accelerator. Multiple table entries of an accelerator may indicate discontinuous multiple storage areas.

[0074] Exemplarily, Figure 4 is a schematic diagram of a storage configuration table provided by the present application. As Figure 4 shown in (a) therein, the storage configuration table includes storage configuration records of accelerator 0 to accelerator N. One table entry in the storage configuration table indicates the storage configuration record of one accelerator. The storage configuration record is used to indicate the address information of the storage capacity allocated to the accelerator. The description of the address information of the storage capacity allocated to the accelerator is as follows Figure 4 in the elaboration of (b) to (d) therein.

[0075] As Figure 4 shown in (b) therein, the storage configuration record includes an accelerator identifier, attributes, an offset address, and an address length.

[0076] The accelerator identifier indicates an accelerator in a dedicated processor. Each accelerator in the dedicated processor has a different accelerator identifier, and an accelerator identifier uniquely indicates an accelerator. The length of the accelerator identifier can be 2 bytes. The accelerator identifier can also be referred to as a module identifier (token).

[0077] The attribute indicates information about the storage medium to which the storage area allocated to the accelerator belongs. The attribute includes the storage medium type and the access attribute of the storage area. The length of the attribute can be 2 bytes.

[0078] The storage medium type can be the physical particle medium type in the storage medium, for example, High Bandwidth Memory (HBM), DDR, static random access memory (SRAM), or flash. It can also be a type defined by the designer of the dedicated processor. For example, a HBM storage medium is divided into three partitions for use by the accelerator, and each partition can be named as a storage medium type.

[0079] The access attribute indicates the secure access space or the non-secure access space of the storage area.

[0080] The offset address refers to the offset position of the starting physical address of the storage medium to which the storage area belongs. The length of the offset address can be 8 bytes.

[0081] The address length refers to the size of the storage area. The length of the address length can be 4 bytes.

[0082] This application does not limit the way of recording the size of the storage area. As shown in (b) above, the size of the storage area is recorded by the offset address and the address length. It can also be recorded by the starting address and the ending address. For example, as shown in (c), the storage configuration record includes the accelerator identifier, the attribute, the starting address, and the ending address. The starting address refers to the starting position of the storage area in the storage medium. The ending address refers to the ending position of the storage area in the storage medium. Figure 4 As shown in (b) above, the size of the storage area is recorded by the offset address and the address length. It can also be recorded by the starting address and the ending address. For example, as shown in (c), the storage configuration record includes the accelerator identifier, the attribute, the starting address, and the ending address. The starting address refers to the starting position of the storage area in the storage medium. The ending address refers to the ending position of the storage area in the storage medium. Figure 4 As shown in (c) above, the storage configuration record includes the accelerator identifier, the attribute, the starting address, and the ending address. The starting address refers to the starting position of the storage area in the storage medium. The ending address refers to the ending position of the storage area in the storage medium.

[0083] For example, as shown in (d) above, the storage configuration record with the accelerator identifier of 111. Among them, the attribute is 01, and 01 indicates HBM. The offset address is 1024, the starting address of HBM is 0XAAAAA. The address length is 256. The storage configuration record indicates that the storage area starting from the address 0XAAAAA + 1024 in HBM is occupied by accelerator 111 for 256 bytes. Figure 4 As shown in (d) above, the storage configuration record with the accelerator identifier of 111. Among them, the attribute is 01, and 01 indicates HBM. The offset address is 1024, the starting address of HBM is 0XAAAAA. The address length is 256. The storage configuration record indicates that the storage area starting from the address 0XAAAAA + 1024 in HBM is occupied by accelerator 111 for 256 bytes.

[0084] The accelerator is used to accelerate the processing of computing tasks instructed by the general-purpose processor 210. The accelerator can perform scalar calculations, vector calculations, matrix calculations, etc. The storage area of the accelerator is used to store the data for the accelerator to accelerate the processing of the computing tasks instructed by the general-purpose processor 210. The accelerator is a hardware module that can access the storage medium and perform scalar calculations, vector calculations, and matrix calculations.

[0085] The multiple accelerators included in the dedicated processor 220 can perform one type of calculation or multiple types of calculations. For example, the dedicated processor 220 includes an accelerator for performing scalar calculations, an accelerator for performing vector calculations, and an accelerator for performing matrix calculations.

[0086] The storage resource pool 223 includes multiple types of storage media. For example, the storage resource pool includes a volatile memory pool or a non-volatile memory pool, or may include both volatile and non-volatile memories. Among them, the non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0087] The storage resource pool 223 is used to store the instructions of the accelerator, computing tasks, data and parameters required for the calculations, etc.

[0088] Figure 2 and Figure 3 The architecture shown is a schematic illustration and does not limit the number of devices or equipment in the system. For example, the number of accelerators can be determined according to business requirements.

[0089] Next, the process of the storage resource management method provided by this application will be introduced in combination with the accompanying drawings, as Figure 5 shown. Here, taking the dynamic adjustment of the storage capacity of the accelerator by the dedicated processor 220 shown in Figure 3 as an example to illustrate the calculation tasks instructed by the accelerator to process the general-purpose processor 210.

[0090] Step 510: The management module initializes the storage configuration record of the accelerator.

[0091] During the production and manufacturing process of the dedicated processor, the dedicated processor is configured with a default storage configuration record. The default storage configuration record is used to indicate the default storage areas corresponding to multiple accelerators in the dedicated processor. The default storage area corresponding to the accelerator can be configured according to the computing power and specifications of the accelerator.

[0092] In some embodiments, when the general-purpose processor acts as the host and controls the dedicated processor, the general-purpose processor can obtain the computing power and specifications of multiple accelerators in the dedicated processor. The general-purpose processor can set the storage area allocated to the accelerator according to the application scenario of the dedicated processor, the computing power and specifications of the accelerator, etc., to obtain a system configuration file. Or, the system administrator sets the storage area allocated to the accelerator according to the application scenario of the dedicated processor, the computing power and specifications of the accelerator, etc., to obtain a system configuration file. The system configuration file indicates the initial storage configuration record of the accelerator. The format of the initial storage configuration record and the format of the default storage configuration record can refer to the above Figure 4 description of the storage configuration record, which will not be elaborated here.

[0093] The storage area allocated by the general-purpose processor to the accelerator can be the same as or different from the default storage area of the accelerator.

[0094] For example, the type of the storage medium to which the storage area allocated to the accelerator belongs is different from the type of the storage medium to which the default storage area of the accelerator belongs. The storage medium to which the storage area allocated by the general-purpose processor to the accelerator belongs can be a storage medium with a faster access rate, so as to improve the efficiency of the accelerator in processing calculation tasks.

[0095] Another example is that the size of the storage area allocated to the accelerator is different from the size of the default storage area of the accelerator.

[0096] In some other embodiments, when the dedicated processor starts up, the management module can initialize the default storage configuration record of each accelerator in the dedicated processor.

[0097] For example, the management module obtains a system configuration file from a general-purpose processor based on a data transfer method such as Direct Memory Access (DMA), and initializes the default storage configuration records of multiple accelerators in the dedicated processor according to the system configuration file to obtain the storage configuration records of the accelerators.

[0098] The management module parses the system configuration file to obtain the initial storage configuration table of the accelerators, and compares the initial storage configuration table with the default storage configuration table. The initial storage configuration table includes the initial storage configuration records of multiple accelerators. The default storage configuration table includes the default storage configuration records of multiple accelerators.

[0099] If the initial storage configuration table is the same as the default storage configuration table, there is no need to modify the default storage configuration table, and the default storage configuration table is used as the storage configuration table of the dedicated processor. If the initial storage configuration table is different from the default storage configuration table, the default storage configuration table is updated with the initial storage configuration table to obtain the storage configuration table of the dedicated processor. For example, the default storage configuration table contains the default storage configuration record of the first accelerator, and the storage area of the default storage configuration record of the first accelerator is different from that of the initial storage configuration record. The storage area of the default storage configuration record of the first accelerator is updated with the storage area of the initial storage configuration record of the first accelerator. Another example is that the default storage configuration table does not contain the default storage configuration record of the first accelerator, and the initial storage configuration record of the first accelerator is added to the default storage configuration table. After initialization, the default storage configuration table includes the storage configuration records of all accelerators in the dedicated processor.

[0100] It should be noted that the present application does not limit the method steps in the embodiments. For example, when the dedicated processor starts up, the management module may or may not perform the initialization operation, and step 510 is an optional step.

[0101] The following takes the first accelerator in the dedicated processor as an example to illustrate the storage resource management process. The first accelerator is any one of the multiple accelerators in the dedicated processor.

[0102] Step 520: The management module obtains the storage capacity required by the first accelerator.

[0103] In some embodiments, the management module receives a resource application request sent by the first accelerator (step 521), and allocates a storage area to the first accelerator according to the storage capacity required by the first accelerator indicated by the resource application request.

[0104] In some other embodiments, the management module determines the storage capacity required by the first accelerator according to the computing tasks that the general-purpose processor instructs the first accelerator to process (step 522). For example, if the first accelerator needs to perform matrix calculations, since the amount of computation for matrix calculations is large and the required storage capacity is large, the storage area can be allocated to the first accelerator according to the storage capacity required for matrix calculations.

[0105] This application does not limit the timing for the management module to allocate a storage area to the first accelerator.

[0106] For example, during the initialization process of the dedicated processor, before processing the computing tasks instructed by the general-purpose processor, the management module obtains the storage capacity required by the first accelerator and allocates a storage area to the first accelerator. Another example is that during the process of the first accelerator processing the computing tasks instructed by the general-purpose processor, the management module obtains the storage capacity required by the first accelerator and allocates a storage area to the first accelerator. Another example is that the management module obtains the task instruction from the general-purpose processor, which instructs the computing tasks that the first accelerator needs to process. The management module obtains the storage capacity required by the first accelerator and allocates a storage area to the first accelerator.

[0107] Step 530: The management module allocates a first storage area to the first accelerator from the storage resource pool.

[0108] In some embodiments, the management module does not need to pay attention to the storage area already allocated to the first accelerator. When the management module obtains the storage capacity required by the first accelerator, it allocates a first storage area to the first accelerator from the storage resource pool according to the storage capacity required by the first accelerator.

[0109] Exemplarily, the size of the storage area already allocated to the first accelerator is 10 megabytes (MB), the storage capacity required by the first accelerator is 10 MB, and the size of the first storage area that the management module allocates to the first accelerator again is 10 MB. Then the size of the storage area allocated to the first accelerator is 20 MB.

[0110] In some other embodiments, when the management module obtains the storage capacity required by the first accelerator, it determines whether the storage area already allocated to the first accelerator meets the storage capacity required by the first accelerator. If the storage area already allocated to the first accelerator meets the storage capacity required by the first accelerator, it may not be necessary to allocate a first storage area to the first accelerator from the storage resource pool. Optionally, the management module can feedback the storage area already allocated to the first accelerator to the first accelerator. If the storage area already allocated to the first accelerator does not meet the storage capacity required by the first accelerator, a first storage area is allocated to the first accelerator from the storage resource pool.

[0111] Exemplarily, the size of the storage area allocated to the first accelerator is 20 MB. If the storage capacity required by the first accelerator is 10 MB, there is no need to allocate a storage area to the first accelerator from the storage resource pool anymore. If the storage capacity required by the first accelerator is 30 MB and the size of the first storage area further allocated by the management module to the first accelerator is 10 MB, then the size of the storage area allocated to the first accelerator is 30 MB.

[0112] Among them, the first storage area is used to store data for the computing tasks indicated by the general-purpose processor accelerated by the first accelerator. The storage capacity of the first storage area meets the storage capacity required by the first accelerator. It can be understood that the storage capacity allocated by the management module to the first accelerator can be equal to or greater than the storage capacity required by the first accelerator. For example, the storage capacity of the first storage area is equal to the storage capacity required by the first accelerator. Another example is that the storage capacity of the first storage area is greater than the storage capacity required by the first accelerator.

[0113] In some other embodiments, the storage resource pool includes multiple types of storage media, such as HBM, DDR, SRAM, or flash memory. The management module allocates the first storage area to the first accelerator from one type of storage media. For example, the resource application request sent by the first accelerator includes the storage media type, and the management module allocates the first storage area to the first accelerator from the storage media indicated by the storage media type.

[0114] In some other embodiments, the management module maintains a storage fault table, which is used to record the faulty areas in the storage resource pool of the dedicated processor. For example, the storage fault table indicates the number of faulty areas, the fault area identifier, the starting address, and the address length of each faulty area.

[0115] The management module allocates the first storage area to the first accelerator from the storage areas outside the faulty areas in the storage resource pool. The first storage area is the storage area outside the faulty areas in the storage resource pool. For example, the management module compares the offset address of the first storage area with the starting addresses of multiple faulty areas, and compares the address length of the first storage area with the address lengths of multiple faulty areas. If the first storage area is within a faulty area, or a part of the first storage area is within a faulty area, the management module allocates the first storage area to the first accelerator from the storage areas outside the faulty areas in the storage resource pool, and updates at least one of the attributes, offset address, and address length of the storage media to which the first storage area belongs.

[0116] Step 540: The management module updates the storage configuration record of the first accelerator according to the storage capacity of the first storage area.

[0117] As described in the above embodiments, the management module may store the storage configuration record of the first accelerator, and the storage configuration record of the first accelerator indicates the storage capacity allocated to the first accelerator. Alternatively described, the storage configuration record of the first accelerator indicates the storage area allocated to the first accelerator. The management module may query the storage configuration table according to the first accelerator identifier to obtain the storage configuration record of the first accelerator. The storage configuration record of the first accelerator includes the first accelerator identifier, attributes, offset address, and address length. The first accelerator identifier indicates the first accelerator. The offset address and the address length indicate the storage area allocated to the first accelerator. The attribute indicates the type of the storage medium to which the storage area belongs. The management module may obtain the first accelerator identifier indicated by the resource application request of the first accelerator. The management module may obtain the first accelerator identifier indicated by the general-purpose processor.

[0118] The management module updates at least one of the attributes, offset address, and address length in the storage configuration record of the first accelerator according to the storage capacity of the first storage area. The storage area allocated to the first accelerator indicated by the storage configuration record of the first accelerator includes the storage area allocated to the first accelerator at least once.

[0119] For example, the storage configuration record of the first accelerator indicates the second storage area allocated to the first accelerator. The management module allocates the first storage area to the first accelerator, that is, the storage area allocated to the first accelerator includes the first storage area and the second storage area. The storage configuration record of the first accelerator indicates the first storage area and the second storage area. The storage capacity of the first accelerator indicated by the storage configuration record of the first accelerator is equal to the sum of the storage capacity of the first storage area and the storage capacity of the second storage area. The first storage area and the second storage area are used to store the data of the calculation task indicated by the general-purpose processor that the first accelerator accelerates and processes.

[0120] As Figure 6 shown in (a) of , the management module may allocate a first storage area that is contiguous to the address of the second storage area from the storage resource pool. The management module may update the address length in the storage configuration record of the first accelerator. Based on the address length of the second storage area in the storage configuration record of the first accelerator, the management module may increase the address length in the storage configuration record of the first accelerator according to the storage capacity of the first storage area. The address of the second storage area is contiguous to the address of the first storage area.

[0121] The storage capacity indicated by the increased address length in the storage configuration record of the first accelerator meets the storage capacity required by the first accelerator. Alternatively, the sum of the storage capacity of the first storage area and the storage capacity of the second storage area meets the storage capacity required by the first accelerator.

[0122] In addition, the second storage area indicated by the storage configuration record of the first accelerator is adjacent to the third storage area allocated to the second accelerator, and the management module allocates a first storage area from the third storage area allocated to the second accelerator. The management module updates the offset address of the third storage area in the storage configuration record of the second accelerator according to the storage capacity of the first storage area, that is, the management module increases the offset address of the third storage area according to the storage capacity of the first storage area. Understandably, the offset address of the third storage area increases by the address length of the first storage area, and the address length in the storage configuration record of the second accelerator remains unchanged, that is, the storage capacity of the third storage area remains unchanged. The third storage area is used to store data of the computing tasks indicated by the general-purpose processor accelerated by the second accelerator.

[0123] As Figure 6 shown in (b) of , the management module may allocate a first storage area to the first accelerator from the free storage areas in the storage resource pool. The management module may update the storage configuration record of the first accelerator. That is, the management module adds a new entry in the storage configuration table, indicating the first storage area allocated by the management module to the first accelerator. The new entry indicates the attributes, offset address, and address length of the storage medium to which the first storage area of the first accelerator belongs. The offset address and the address length indicate the first storage area allocated to the first accelerator. Among them, the address of the second storage area is not continuous with the address of the first storage area.

[0124] Optionally, the resource application request also indicates the storage medium type. The management module determines whether the storage medium type indicated by the attribute in the storage configuration record of the first accelerator is the same as the storage medium type indicated by the resource application request. If the storage medium type indicated by the attribute is the same as the storage medium type indicated by the resource application request, it is not necessary to modify the attribute in the storage configuration record of the first accelerator; if the storage medium type indicated by the attribute is different from the storage medium type indicated by the resource application request, update the storage medium type indicated by the attribute in the storage configuration record of the first accelerator according to the storage medium type indicated by the resource application request, and allocate a first storage area to the first accelerator from the storage medium indicated by the attribute.

[0125] Step 550, the management module releases the storage area allocated to the first accelerator.

[0126] After the first accelerator finishes executing the computing tasks indicated by the general-purpose processor, the management module releases the storage area allocated to the first accelerator. The management module may release some or all of the storage areas allocated to the first accelerator.

[0127] In some embodiments, the first accelerator may send a resource release request to the management module. The resource release request includes the first accelerator identifier and the storage capacity. The resource release request may further include an offset address and an address length. The management module releases the corresponding storage area according to the offset address and the address length indicated by the resource release request.

[0128] In some other embodiments, the management module also stores a storage usage table, which is used to indicate the size and usage of the storage area allocated to each accelerator. The management module may query the storage usage table and release the storage area allocated to the accelerator according to the size and usage of the storage area of the accelerator recorded in the storage usage table.

[0129] For example, the management module queries the storage usage table to obtain the usage of the storage area allocated to the first accelerator. When the first accelerator finishes executing the computing task instructed by the general-purpose processor, the storage area allocated to the first accelerator may be idle, and the management module releases the storage area allocated to the first accelerator. For instance, the management module may query the storage configuration table according to the first accelerator identifier, obtain the storage configuration record of the first accelerator, and delete the storage configuration record of the first accelerator.

[0130] In addition, the management module may also update the storage configuration records corresponding to other accelerators in the storage configuration table and update the offset addresses allocated to other accelerators.

[0131] For the storage resource management method provided in this application, the dedicated processor can dynamically adjust the storage capacity allocated to the accelerator according to the storage capacity requirements of the accelerator, so as to flexibly configure the storage resources for each accelerator in the dedicated processor and improve the utilization rate of the storage resources of the dedicated processor. In addition, when a storage medium in the dedicated processor fails, the storage resources can also be flexibly reallocated to the accelerator, avoiding allocating a faulty area to the accelerator from the storage medium, and improving the reliability of the dedicated processor. During the design, manufacturing, and use of the dedicated processor, the storage resources can be flexibly configured for the accelerator, reducing the manufacturing cost of the chip and enhancing the commercial competitiveness of the chip.

[0132] It can be understood that, in order to implement the functions in the above embodiments, the dedicated processor includes the corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should easily realize that, combining the units and method steps of each example described in the embodiments disclosed in this application, this application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the way of hardware or computer software driving hardware depends on the specific application scenario and design constraint conditions of the technical solution.

[0133] As mentioned above, in combination with Figures 1 to 6, which describes in detail the storage resource management method provided according to this embodiment. Next, it will be combined with Figure 7 , to describe the processor provided according to this embodiment.

[0134] Figure 7 FIG. is a schematic structural diagram of a possible processor provided in this embodiment. These processors can be used to implement the functions of the dedicated processor in the above method embodiments, and thus can also achieve the beneficial effects possessed by the above method embodiments. In this embodiment, the processor can be, for example, Figure 5 as shown, a dedicated processor, or can also be a module (such as a chip) applied to the processor.

[0135] Such as Figure 7 shown, the processor 700 includes a communication module 710, a management module 720, an accelerator 730, and a storage resource pool 740. The processor 700 is used to implement the functions of the dedicated processor in the above Figure 5 method embodiment shown.

[0136] The communication module 710 is used to obtain the system configuration file from the general-purpose processor. The management module 720 is used to update the default storage configuration record of the first accelerator according to the system configuration file to obtain the storage configuration record of the first accelerator.

[0137] The management module 720 is used to obtain the storage capacity required by the first accelerator. For example, the management module 720 is used to execute Figure 5 step 520 in.

[0138] The management module 720 is further used to allocate a first storage area to the first accelerator from the storage resource pool, and the storage capacity of the first storage area meets the storage capacity required by the first accelerator. For example, the management module 720 is used to execute Figure 5 step 530 in.

[0139] The management module 720 is further used to update the storage configuration record of the first accelerator according to the storage capacity of the first storage area. For example, the management module 720 is used to execute Figure 5 step 540 in.

[0140] The management module 720 is further used to release the storage area allocated to the first accelerator. For example, the management module 720 is used to execute Figure 5 step 550 in.

[0141] The accelerator 730 is used to send a resource application request to the management module 720, requesting the storage capacity required by the first accelerator.

[0142] The accelerator 730 is further used to accelerate the processing of the computing tasks instructed by the general-purpose processor, and the first storage area is used to store the data of the first accelerator for accelerating the processing of the computing tasks instructed by the general-purpose processor.

[0143] The accelerator 730 runs a storage resource management agent application to implement the functions of the accelerator 730 described above.

[0144] The management module 720 runs a storage resource management application to implement the functions of the management module 720 described above. The management module 720 may also run a storage fault isolation application to implement the function of the management module 720 to isolate the faulty area in the storage resource pool.

[0145] The management module 720 also stores a storage configuration table and a storage fault table.

[0146] The storage resource pool 740 is used to store instructions of the accelerator, computing tasks, data of the computing tasks indicated by the accelerator to accelerate the general-purpose processor, etc., so as to facilitate the accelerator 730 to process the computing tasks.

[0147] Optionally, the processor 700 may further include a startup module 750. The startup module 750 is used to initialize the accelerator, configuration parameters in the processor 700, and establish a communication connection with the general-purpose processor when the processor 700 is powered on and started.

[0148] It should be understood that the processor 700 in the embodiments of the present application may be implemented by an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The above PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. It may also be implemented by software Figure 5 The storage resource management method shown, and its respective modules may also be software modules. The processor 700 and its respective modules may also be software modules.

[0149] The processor 700 according to the embodiments of the present application may correspond to executing the methods described in the embodiments of the present application, and the above and other operations and / or functions of each unit in the processor 700 are respectively for implementing Figure 5 the corresponding processes of the respective methods in, for the sake of brevity, will not be described in detail here.

[0150] Figure 8 This is a schematic structural diagram of a computer system 800 provided by the present application. As Figure 8As shown, computer system 800 includes a processor 810, a bus 820, a memory 830, a communication interface 840, an internal memory 850 (which can also be referred to as the main memory unit), and a processor 860. The processor 810, the processor 860, the memory 830, the internal memory 850, and the communication interface 840 are connected through the bus 820.

[0151] It should be understood that in this embodiment, the processor 810 can be a CPU, and this processor 810 can also be other general-purpose processors, digital signal processors (DSP), ASICs, FPGAs, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.

[0152] The computer system 800 may also include a graphics processing unit (GPU), a neural network processing unit (NPU), a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the program of the solution of the present application. For example, the processor 860 can be a GPU or an NPU. In the present application, the processor 860 can correspond to the processor 700 in this embodiment, and can correspond to the corresponding entity executing any of the Figure 5 methods, and the above and other operations and / or functions of each module in the processor 700 are respectively for implementing the Figure 5 corresponding processes of each method in, and for the sake of brevity, they will not be elaborated here.

[0153] The communication interface 840 is used to implement the communication between the computer system 800 and external devices or components.

[0154] The bus 820 may include a path for transmitting information between the above components (such as the processor 810, the memory 850, and the storage 830). In addition to the data bus, the bus 820 may also include a power bus, a control bus, a status signal bus, etc. However, for the sake of clarity, all kinds of buses are labeled as the bus 820 in the figure. The bus 820 may be a Peripheral Component Interconnect Express (PCIe) bus, or an extended industry standard architecture (EISA) bus, a unified bus (Ubus or UB), a Compute Express Link (CXL), a Cache Coherent Interconnect for Accelerators (CCIX), etc. The bus 820 may be divided into an address bus, a data bus, a control bus, etc.

[0155] As an example, the computer system 800 may include multiple processors. The processor may be a multi-CPU processor. Here, the processor may refer to one or more devices, circuits, and / or computing units for processing data (such as computer program instructions).

[0156] It is worth noting that Figure 8 only the case where the computer system 800 includes 1 processor 810 and 1 storage 830 is taken as an example here. Here, the processor 810 and the storage 830 are respectively used to indicate a type of device or equipment. In specific embodiments, the quantity of each type of device or equipment may be determined according to service requirements.

[0157] The memory 850 can be a volatile memory pool or a non-volatile memory pool, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM). The memory 850 can store system configuration files.

[0158] The memory 830 can correspond to the one for storing system configuration files in the above method embodiments. For example, it can be a disk, such as a mechanical hard disk or a solid-state drive.

[0159] The above computer system 800 can be a general-purpose device or a special-purpose device. For example, the computer system 800 can be an edge device (e.g., a box carrying a chip with processing capabilities), etc. Optionally, the computer system 800 can also be a server or other devices with computing capabilities.

[0160] This application also provides a computer system, which includes multiple computer devices. The computer device includes a general-purpose processor and a special-purpose processor, and the special-purpose processor is used to execute the operation steps of the methods described in the above various embodiments. The computer system can be a heterogeneous system, and the computer device can be a heterogeneous server.

[0161] The method steps in this embodiment can be implemented in a hardware manner or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in a random access memory (RAM), flash memory, read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), registers, hard disk, removable hard disk, CD-ROM, or any other form of storage medium well-known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. Additionally, the ASIC can be located in a computing device. Of course, the processor and the storage medium can also exist as discrete components in a computing device.

[0162] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are executed in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device, or other programmable devices. The computer program or instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer program or instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center in a wired or wireless manner. The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it can also be an optical medium, such as a digital video disc (DVD); or it can be a semiconductor medium, such as a solid state drive (SSD). As described above, the above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed in the present application can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should all be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A storage resource management method, characterized in that, the method is applied to a dedicated processor, the dedicated processor includes a plurality of accelerators, a storage resource pool and a management module, the plurality of accelerators includes a first accelerator, and the method includes: the management module obtains the storage capacity required by the first accelerator; the management module allocates a first storage area from the storage resource pool to the first accelerator, the storage capacity of the first storage area meets the storage capacity required by the first accelerator, and the first storage area is used to store data for the first accelerator to accelerate the processing of a computing task instructed by a general-purpose processor.

2. The method according to claim 1, characterized in that, the method further includes: updating the storage configuration record of the first accelerator according to the storage capacity of the first storage area, and the storage configuration record of the first accelerator is used to indicate the storage capacity allocated to the first accelerator.

3. The method according to claim 2, characterized in that, the storage area allocated to the first accelerator includes the first storage area and a second storage area; the storage capacity of the first accelerator indicated by the storage configuration record of the first accelerator is equal to the sum of the storage capacity of the first storage area and the storage capacity of the second storage area.

4. The method according to claim 3, characterized in that, the address of the second storage area is continuous with the address of the first storage area.

5. The method according to claim 4, characterized in that, the plurality of accelerators further includes a second accelerator, and the first storage area is allocated from a third storage area allocated to the second accelerator; the method further includes: updating the address of the third storage area in the storage configuration record of the second accelerator according to the storage capacity of the first storage area, and the storage capacity of the third storage area remains unchanged.

6. The method according to claim 3, characterized in that, the address of the second storage area is not continuous with the address of the first storage area.

7. The method according to any one of claims 1-6, characterized in that, obtaining the storage capacity required by the first accelerator includes: obtaining a resource application request of the first accelerator, and the resource application request is used to indicate the storage capacity required by the first accelerator.

8. The method according to any one of claims 1-6, characterized in that, obtaining the storage capacity required by the first accelerator includes: determining the storage capacity required by the first accelerator according to the computing task that the general-purpose processor instructs the first accelerator to process.

9. The method according to any one of claims 1-8, characterized in that, obtaining the storage capacity required by the first accelerator includes: obtaining the storage capacity required by the first accelerator when the first accelerator processes the computing task instructed by the general-purpose processor.

10. The method according to any one of claims 1-9, characterized in that, the storage resource pool includes various types of storage media, and allocating a first storage area from the storage resource pool to the first accelerator includes: Allocate the first storage area to the first accelerator from a type of storage medium.

11. The method according to any one of claims 1-10, wherein, the first storage area is a storage area outside the faulty area in the storage resource pool.

12. The method according to any one of claims 1-11, wherein, the method further comprises: after the first accelerator finishes executing the computing task instructed by the general-purpose processor, release the storage area allocated to the first accelerator.

13. The method according to any one of claims 1-12, wherein, before obtaining the storage capacity required by the first accelerator, the method further comprises: when the dedicated processor starts up, update the default storage configuration record of the first accelerator according to the system configuration file to obtain the storage configuration record of the first accelerator.

14. A processor, wherein, the processor comprises a plurality of accelerators, a storage resource pool and a management module, and the plurality of accelerators include a first accelerator; the management module is configured to obtain the storage capacity required by the first accelerator; the management module is further configured to allocate a first storage area to the first accelerator from the storage resource pool, and the storage capacity of the first storage area meets the storage capacity required by the first accelerator; the first accelerator is configured to accelerate the processing of the computing task instructed by the general-purpose processor, and the first storage area is used to store the data for the first accelerator to accelerate the processing of the computing task instructed by the general-purpose processor.

15. A computer system, wherein, the computer system comprises a general-purpose processor and a dedicated processor, and when the dedicated processor executes a set of computer instructions, it performs the operation steps of the method according to any one of claims 1-13 above.

Citation Information

Cited By

  • Storage resource management method, processor, and computer system

    EP4804003A1

  • Storage resource management method, processor, and computer system

    WO2025113340A1