Storage resource management method, processor, and computer system

By introducing dynamic storage resource management methods into AI chips, the problem of low utilization of storage resources in AI chips is solved, flexible configuration and efficient utilization of storage resources are achieved, manufacturing costs are reduced and commercial competitiveness is enhanced.

WO2025113340A1PCT designated stage expired Publication Date: 2025-06-05HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/133803
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-11-29
Filing Date
2024-11-22
Publication Date
2025-06-05

AI Technical Summary

Technical Problem

The storage space allocation of accelerators in AI chips requires manual planning, resulting in low storage resource utilization, and different types or models of AI chips need to re-plan the storage space, increasing the complexity and cost of design and manufacturing.

Method used

Provide a storage resource management method, which dynamically adjusts the storage capacity of the accelerator through the management module, allocates storage resources in real time according to the calculation task requirements of the accelerator, allocates continuous or discontinuous storage areas from the storage resource pool, and improves the utilization rate of storage resources.

Benefits of technology

It realizes flexible configuration and efficient utilization of storage resources in AI chips, reduces chip manufacturing costs, improves commercial competitiveness, and improves system reliability and adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024133803_05062025_PF_FP_ABST
    Figure CN2024133803_05062025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed are a storage resource management method, a processor, and a computer system. The method is applied in the field of computers. An application specific processor comprises a plurality of accelerators, a storage resource pool, and a management module, wherein the plurality of accelerators include a first accelerator. The method comprises: a management module acquires storage capacity required by a first accelerator, and allocates a first storage area to the first accelerator from a storage resource pool. The storage capacity of the first storage area satisfies the storage capacity required by the first accelerator. The first storage area is used for storing data that the first accelerator processes in an accelerated manner a service indicated by a general-purpose processor. Therefore, an application specific processor can dynamically adjust storage capacity allocated to an accelerator on the basis of the storage capacity requirements of the accelerator, achieving flexible configuration of storage resources for each accelerator in the application specific processor, improving the utilization rate of storage resources of the application specific processor.
Need to check novelty before this filing date? Find Prior Art

Description

Storage resource management method, processor and computer system

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on November 29, 2023, with application number 202311631673.2 and application name “Storage Resource Management Method, Processor and Computer System”, all contents of which are incorporated by reference into this application. Technical Field

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

[0003] Artificial Intelligence (AI) chips, as core devices in the field of artificial intelligence, can provide higher computing power than general-purpose processors. During the design and manufacturing process of AI chips, it is necessary to manually allocate a fixed storage space used by the accelerator based on the computing power and specifications of the accelerator in the AI ​​chip in order to store the accelerator's instructions, tasks, computing data, and parameters, etc. 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 is not easy to change during the use of the AI ​​chip. In order to ensure that the storage space allocated to the accelerator meets the storage requirements of the accelerator when performing computing tasks, more storage space is allocated to the accelerator. However, reserving too much storage space will lead to a waste of storage resources, and the utilization rate of storage resources in the AI ​​chip is low. Summary of the Invention

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

[0005] In a first aspect, a storage resource management method is provided. The method is applied to a dedicated processor, the dedicated processor comprising multiple accelerators, a storage resource pool, and a management module. The multiple accelerators include a first accelerator. The method comprises: the management module obtaining the storage capacity required by the first accelerator and allocating 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 of computing tasks accelerated by the first accelerator and directed by the general-purpose processor.

[0006] Compared to the traditional solution, which manually allocates sufficient storage capacity based on the computing power and specifications of the accelerators in the dedicated processor before it leaves the factory, the storage capacity of each accelerator in the dedicated processor remains fixed, resulting in low storage resource utilization of the dedicated processor. The solution provided by this application can dynamically adjust the storage capacity allocated to the accelerator based on the accelerator's storage capacity requirements, enabling flexible configuration of storage resources for each accelerator in the dedicated processor and improving the utilization of the dedicated processor's storage resources.

[0007] In a possible implementation, the method further includes: updating a 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.

[0008] Use storage configuration records 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 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.

[0009] 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.

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

[0011] Therefore, the accelerator accesses continuous storage areas when processing computing tasks, which can improve the utilization and access rate of the storage resources of the dedicated processor.

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

[0013] In another possible implementation, the address of the second storage area is discontinuous with the address of the first storage area.

[0014] Therefore, a storage area is allocated to the accelerator from a free area in the storage medium, thereby improving the utilization rate of the storage resources of the dedicated processor and avoiding changing the addresses of the storage areas of other accelerators.

[0015] In another possible implementation, obtaining the storage capacity required by the first accelerator includes: obtaining 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.

[0016] By obtaining the resource application request actively sent by the accelerator, the storage capacity required by the accelerator is allocated to the accelerator in a timely manner, the storage resources of the accelerator are flexibly configured, the utilization rate of the storage resources of the dedicated processor is improved, and the accelerator can have sufficient storage area to store data when processing the computing tasks instructed by the general processor.

[0017] 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 a computing task that the general processor instructs the first accelerator to process.

[0018] The management module allocates the storage capacity required by the accelerator in advance before the accelerator applies for storage resources based on the computing tasks that the accelerator needs to process. This avoids the accelerator requesting storage resources from the management module when it needs storage resources, which may affect the rate at which the accelerator processes computing tasks. In this way, the storage resources of the accelerator are flexibly configured, the utilization rate of the storage resources of the dedicated processor is improved, and the accelerator has sufficient storage area to store data when processing computing tasks instructed by the general-purpose processor.

[0019] In another possible implementation, 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 processor.

[0020] When the accelerator processes the computing tasks instructed by the general-purpose processor, the storage capacity required by the accelerator is allocated to the accelerator in a timely manner. This allows the accelerator to flexibly configure storage resources, improve the utilization rate of the storage resources of the dedicated processor, and ensure that the accelerator has sufficient storage area to store data when processing the computing tasks instructed by the general-purpose processor.

[0021] In another possible implementation, the storage resource pool includes multiple types of storage media, and allocating the first storage area from the storage resource pool to the first accelerator includes allocating the first storage area from one type of storage medium to the first accelerator.

[0022] Various types of storage media are configured in the dedicated processor to meet the accelerator's demand for storage resources, flexibly configure storage resources for the accelerator, and improve the utilization rate of the dedicated processor's storage resources.

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

[0024] When the storage medium in the dedicated processor fails, storage resources can be flexibly reallocated to the accelerator, thereby improving the reliability of the dedicated processor.

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

[0026] In another possible implementation, the method further includes: completing the computing task instructed by the general processor on the first accelerator, and releasing the storage area allocated to the first accelerator.

[0027] When the accelerator completes the computing task instructed by the general processor and does not use storage resources, the storage resources allocated to the accelerator are released so that other accelerators in the dedicated processor can use the storage resources, thereby improving the utilization rate of the storage resources of the dedicated processor.

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

[0029] The default storage configuration record of the accelerator is updated according to the system configuration file so that the storage area allocated to the accelerator meets the actual demand for storage resources.

[0030] In a second aspect, a processor is provided, comprising modules for executing the steps of the method of the first aspect or any possible implementation of the first aspect. For example, the processor comprises multiple accelerators, a storage resource pool, and a management module. The multiple accelerators include a first accelerator.

[0031] The management module is used to obtain the storage capacity required by the first accelerator; the management module is also used to allocate a first storage area to the first accelerator from a 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 computing tasks instructed by the general-purpose processor, and the first storage area is used to store data of the computing tasks instructed by the general-purpose processor to be accelerated by the first accelerator.

[0032] In a possible implementation, the management module is further configured to update a 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.

[0033] 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.

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

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

[0036] In another possible implementation, the address of the second storage area is discontinuous with the address of the first storage area.

[0037] 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.

[0038] 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 task that the general processor instructs the first accelerator to process.

[0039] 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 task instructed by the general processor.

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

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

[0042] In another possible implementation, the management module is further configured to release the storage area allocated to the first accelerator after the computing task instructed by the general processor is completed on the first accelerator.

[0043] 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.

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

[0045] In a fourth aspect, a computer system is provided, which includes a general-purpose processor and a special-purpose processor as described in the second aspect or any possible implementation of the second aspect. When the special-purpose processor executes a set of computer instructions, it executes the operating steps of the method in the first aspect or any possible implementation of the first aspect.

[0046] In a fifth aspect, a computer system is provided, which includes multiple computer devices, and the computer devices include a general-purpose processor and a special-purpose processor as described in the second aspect or any possible implementation of the second aspect. When the special-purpose processor executes a set of computer instructions, the operating steps of the method in the first aspect or any possible implementation of the first aspect are performed.

[0047] In a sixth aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer executes the methods described in the above aspects.

[0048] The technical effects brought about by any design method in the second to sixth aspects can be referred to the technical effects brought about by the first aspect or different design methods in the first aspect, and will not be repeated here.

[0049] Based on the implementation methods provided in the above aspects, this application can also be further combined to provide more implementation methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] FIG1 is a schematic diagram of storage resource allocation of a dedicated processor provided by the prior art;

[0051] FIG2 is a schematic diagram of a computer system provided by the present application;

[0052] FIG3 is a schematic diagram showing the relationship between a general-purpose processor and a dedicated processor provided by the present application;

[0053] FIG4 is a schematic diagram of a storage configuration table provided in this application;

[0054] FIG5 is a flow chart of a storage resource management method provided by the present application;

[0055] FIG6 is a schematic diagram of updating a storage configuration record provided by the present application;

[0056] FIG7 is a schematic diagram of the structure of a processor provided by the present application;

[0057] FIG8 is a schematic diagram of the structure of a computer system provided in this application. DETAILED DESCRIPTION

[0058] To facilitate understanding, the main terms involved in this application are first explained.

[0059] Artificial Intelligence (AI) chips: Refers to modules specifically designed to handle the large number of computational tasks in AI applications, while the central processing unit (CPU) handles other non-computational tasks. AI chips can also be called AI accelerators, computing cards, or dedicated processors. General-purpose processors can refer to central processing units (CPUs). AI chips mainly include graphics processing units (GPUs), data processing units (DPUs), neural processing units (NPUs), and embedded neural-network processing units (NPUs), which are high-powered computing units with computing capabilities.

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

[0061] To support the accelerator's storage needs, a dedicated processor is allocated a continuous memory area from its storage medium before it leaves the factory. Storage space is allocated to the accelerator based on its computing power. The greater the computing power of the accelerator, the larger the memory area allocated to it. Furthermore, to avoid insufficient memory when the accelerator performs computing tasks, an excessive amount of memory can be allocated to the accelerator. However, since the accelerator exclusively uses the corresponding memory area, this wastes the dedicated processor's memory resources and results in low memory resource utilization.

[0062] To address the low utilization of storage resources in AI chips, this application provides a storage resource management method, which 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 of the business instructed by the general-purpose processor to be accelerated by the first accelerator.

[0063] Compared to the traditional solution, where sufficient storage capacity is manually allocated based on the computing power and specifications of the accelerators in the dedicated processor before the processor leaves the factory, the storage capacity of each accelerator in the dedicated processor is fixed, resulting in low storage resource utilization of the dedicated processor. The solution provided by this application allows the dedicated processor to dynamically adjust the storage capacity allocated to the accelerator based on the accelerator's storage capacity requirements, enabling flexible configuration of storage resources for each accelerator in the dedicated processor and improving the utilization of the dedicated processor's storage resources. Storage resources can be flexibly configured for the accelerator during the design, manufacturing, and use of the dedicated processor, reducing the manufacturing cost of the chip and improving the commercial competitiveness of the chip.

[0064] The method provided in this application is applied to a computer system including a general-purpose processor and a special-purpose processor, so that the computer system can provide AI accelerated computing capabilities, and the computer system can be applied to different AI application scenarios, such as neural network reasoning and training.

[0065] The storage resource management method provided by the present application is described in detail below with reference to the accompanying drawings. Figure 2 is a schematic diagram of a computer system provided by the present application. As shown in Figure 2, the computer system 200 includes a general-purpose processor 210 and multiple special-purpose 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 special-purpose processors through the Peripheral Component Interconnect Express (PCIe) or the Compute Express Link (CXL). For example, the general-purpose processor 210 is interconnected with the special-purpose processor 220 and the special-purpose processor 230 respectively through PCIe.

[0066] The general-purpose processor 210 may be a host, and the dedicated processor serves as a control object of the host.

[0067] The general-purpose processor 210 may be a CPU. The CPU may be a multi-core processor, i.e., a processor including one or more processor cores. The general-purpose processor 210 is used to provide storage allocation management functions and computing task allocation management functions for the special-purpose processor. The special-purpose processor is used to accelerate the processing of computing tasks instructed by the general-purpose processor 210. For example, the special-purpose processor performs scalar calculations, vector calculations, matrix calculations, etc. The special-purpose processor can perform one type of calculation or multiple types of calculations. The functional modules in the special-purpose processor can also store data in the storage area allocated by the general-purpose processor. For ease of description, the special-purpose processor 220 is used as an example. For other special-purpose processors, reference is made to the description of the special-purpose processor 220.

[0068] For example, as shown in Figure 3, the general-purpose processor 210 runs a chip management application and allocates storage capacity to the accelerator in the dedicated processor 220 based on a system configuration file. The system configuration file is a file that records the storage capacity allocated to the functional modules in the dedicated processor. The system administrator or computer system can set the storage capacity allocated to the functional modules based on the application scenario 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 assign 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.

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

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

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

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

[0073] In some embodiments, the dedicated processor 220 also stores the correspondence between accelerators and the storage areas allocated to them. For example, the management module 222 may also include a storage medium for storing storage configuration records for multiple accelerators, recording the storage areas allocated to the accelerators. Storage area can also be described as storage capacity instead. This application does not limit the type of storage medium in the management module 222 or the storage format of the correspondence.

[0074] For example, the storage medium in management module 222 may store a storage configuration table for a dedicated processor. The storage configuration table includes multiple entries. An entry indicates a storage area allocated by management module 222 to an accelerator. The storage area indicated by an entry may be a continuous storage space. Management module 222 may create one or more entries for an accelerator. Multiple entries for an accelerator may indicate multiple non-contiguous storage areas.

[0075] For example, Figure 4 is a schematic diagram of a storage configuration table provided in this application. As shown in Figure 4 (a), the storage configuration table includes storage configuration records for accelerators 0 through N. Each entry in the storage configuration table indicates a storage configuration record for an accelerator. The storage configuration record is used to indicate the address information of the storage capacity allocated to the accelerator. The address information of the storage capacity allocated to the accelerator is described in Figures 4 (b) through (d) below.

[0076] As shown in (b) of FIG4 , the storage configuration record includes an accelerator identifier, attributes, an offset address, and an address length.

[0077] The accelerator identifier indicates an accelerator in the dedicated processor. Each accelerator in the dedicated processor has a different accelerator identifier, and each accelerator identifier uniquely identifies an accelerator. The accelerator identifier can be 2 bytes long. The accelerator identifier can also be called a module identifier (token).

[0078] The attribute indicates information about the storage medium to which the storage area assigned to the accelerator belongs. The attribute includes the storage medium type and the access attributes of the storage area. The attribute can be 2 bytes long.

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

[0080] The access attribute indicates a secure access space of the storage region or a non-secure access space of the storage region.

[0081] 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.

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

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

[0084] For example, as shown in (d) of Figure 4 , the storage configuration record for accelerator ID 111 has an attribute of 01, indicating HBM. The offset address is 1024, and the starting address of the HBM is 0XAAAAA. The address length is 256. The storage configuration record indicates that the accelerator 111 occupies a 256-byte storage area starting at the address 0XAAAAA+1024 allocated in the HBM.

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

[0086] The multiple accelerators included in the special-purpose processor 220 can perform one type of calculation or multiple types of calculations. For example, the special-purpose processor 220 includes an accelerator that performs scalar calculations, an accelerator that performs vector calculations, and an accelerator that performs matrix calculations.

[0087] The storage resource pool 223 includes various 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 memory. Among them, the non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0088] The storage resource pool 223 is used to store accelerator instructions, computing tasks, and data and parameters required for computing.

[0089] The architectures shown in Figures 2 and 3 are schematic illustrations and do not limit the number of devices or equipment in the system. For example, the number of accelerators can be determined based on business needs.

[0090] Next, the storage resource management method provided by this application is described with reference to the accompanying drawings, as shown in Figure 5. Here, the dedicated processor 220 shown in Figure 3 dynamically adjusts the storage capacity of the accelerator, and the accelerator processes the computing tasks instructed by the general processor 210 as an example.

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

[0092] During the manufacturing process of a dedicated processor, a default storage configuration record is configured for the processor. This record indicates the default storage area corresponding to multiple accelerators in the dedicated processor. The default storage area for each accelerator can be configured based on the accelerator's computing power and specifications.

[0093] In some embodiments, when a general-purpose processor acts as a host and controls a 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 based on the application scenario of the dedicated processor, the computing power and specifications of the accelerator, and obtain a system configuration file. Alternatively, the system administrator sets the storage area allocated to the accelerator based on the application scenario of the dedicated processor, the computing power and specifications of the accelerator, and obtains 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 description of the storage configuration record in Figure 4 above and will not be repeated here.

[0094] The storage area allocated by the general processor to the accelerator may be the same as or different from the default storage area of ​​the accelerator.

[0095] For example, the storage area assigned to the accelerator may contain a different type of storage medium than the accelerator's default storage area. The storage area assigned to the accelerator by the general-purpose processor may contain a faster-accessible storage medium, thereby improving the accelerator's efficiency in processing computing tasks.

[0096] For another example, the size of the storage area allocated to the accelerator is different from the size of the default storage area of ​​the accelerator.

[0097] In other embodiments, when the dedicated processor starts, the management module may initialize a default storage configuration record for each accelerator in the dedicated processor.

[0098] For example, the management module obtains a system configuration file from the general processor based on data movement methods such as direct memory access (DMA), initializes default storage configuration records of multiple accelerators in the dedicated processor according to the system configuration file, and obtains storage configuration records of the accelerators.

[0099] The management module parses the system configuration file to obtain an initial storage configuration table for the accelerator, and compares the initial storage configuration table with a default storage configuration table. The initial storage configuration table includes initial storage configuration records for multiple accelerators, and the default storage configuration table includes default storage configuration records for multiple accelerators.

[0100] If the initial storage configuration table and the default storage configuration table are the same, 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 and the default storage configuration table are different, 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 the storage area 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. For another example, 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 is completed, the default storage configuration table includes the storage configuration records of all accelerators in the dedicated processor.

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

[0102] The storage resource management process is described below by taking the first accelerator in the dedicated processor as an example. The first accelerator is any one of the multiple accelerators in the dedicated processor.

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

[0104] 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 in the resource application request.

[0105] In other embodiments, the management module determines the storage capacity required by the first accelerator based on the computing task that the general processor instructs the first accelerator to process (step 522). For example, if the first accelerator needs to perform matrix calculations, which require a large amount of storage capacity due to the large amount of computation required, a storage area can be allocated to the first accelerator based on the storage capacity required for the matrix calculations.

[0106] This application does not limit the timing when the management module allocates the storage area to the first accelerator.

[0107] For example, during the initialization of the dedicated processor, before processing a computing task 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. For another example, during the first accelerator processing a computing task 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. For another example, after the management module obtains a task instruction from the general-purpose processor indicating the computing task to be processed by the first accelerator, the management module obtains the storage capacity required by the first accelerator and allocates a storage area to the first accelerator.

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

[0109] In some embodiments, the management module does not need to pay attention to the storage area allocated to the first accelerator. The management module obtains the storage capacity required by the first accelerator and allocates the first storage area to the first accelerator from the storage resource pool according to the storage capacity required by the first accelerator.

[0110] For example, the size of the storage area allocated to the first accelerator is 10 megabytes (MB), the storage capacity required by the first accelerator is 10MB, and the management module allocates a first storage area of ​​10MB to the first accelerator, so the size of the storage area allocated to the first accelerator is 20MB.

[0111] In other embodiments, the management module obtains the storage capacity required by the first accelerator and determines whether the storage area already allocated to the first accelerator meets the storage capacity requirements of the first accelerator. If the storage area already allocated to the first accelerator meets the storage capacity requirements of the first accelerator, there is no need to allocate the first storage area from the storage resource pool to the first accelerator. Optionally, the management module can provide the first accelerator with feedback on the storage area already allocated to the first accelerator. If the storage area already allocated to the first accelerator does not meet the storage capacity requirements of the first accelerator, the first storage area is allocated to the first accelerator from the storage resource pool.

[0112] For example, the size of the storage area allocated to the first accelerator is 20MB. If the storage capacity required by the first accelerator is 10MB, there is no need to allocate storage area to the first accelerator from the storage resource pool; if the storage capacity required by the first accelerator is 30MB, and the management module allocates a first storage area of ​​10MB to the first accelerator, the size of the storage area allocated to the first accelerator is 30MB.

[0113] The first storage area is used to store data for accelerating the processing of computing tasks instructed by the general-purpose processor by the first accelerator. The storage capacity of the first storage area meets the storage capacity required by the first accelerator. It is understood that the storage capacity allocated to the first accelerator by the management module 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 can be equal to the storage capacity required by the first accelerator. In another example, the storage capacity of the first storage area can be greater than the storage capacity required by the first accelerator.

[0114] In other embodiments, the storage resource pool includes multiple types of storage media, such as HBM, DDR, SRAM, or flash memory. The management module allocates a first storage area from one type of storage media to the first accelerator. For example, the resource 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.

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

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

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

[0118] As described in the above embodiment, the management module can store a storage configuration record of the first accelerator, where the storage configuration record of the first accelerator indicates the storage capacity allocated to the first accelerator. Alternatively, the storage configuration record of the first accelerator indicates the storage area allocated to the first accelerator. The management module can query the storage configuration table based on the first accelerator identifier to obtain the storage configuration record of the first accelerator. The storage configuration record of the first accelerator includes a first accelerator identifier, attributes, an offset address, and an address length. The first accelerator identifier indicates the first accelerator. The offset address and address length indicate the storage area allocated to the first accelerator. The attributes indicate the type of storage medium to which the storage area belongs. The management module can obtain the first accelerator identifier indicated by the resource application request of the first accelerator. The management module can obtain the first accelerator identifier indicated by the general processor.

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

[0120] For example, the storage configuration record for the first accelerator indicates a second storage area allocated to the first accelerator. The management module allocates the first storage area to the first accelerator, meaning that the storage area allocated to the first accelerator includes the first storage area and the second storage area. The storage configuration record for the first accelerator indicates the first storage area and the second storage area. The storage capacity of the first accelerator indicated in the storage configuration record for 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 data for computing tasks instructed by the general-purpose processor to be accelerated by the first accelerator.

[0121] As shown in (a) of Figure 6 , the management module can allocate a first storage area from the storage resource pool that has an address that is contiguous with the second storage area. The management module can 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 can increase the address length in the storage configuration record of the first accelerator based on the storage capacity of the first storage area. The address of the second storage area is contiguous with the address of the first storage area.

[0122] The storage capacity indicated by the increased address length in the storage configuration record of the first accelerator satisfies 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 satisfies the storage capacity required by the first accelerator.

[0123] 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 the 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 based on the storage capacity of the first storage area. That is, the management module increases the offset address of the third storage area based on the storage capacity of the first storage area. Understandably, the offset address of the third storage area is increased by the address length of the first storage area, while 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 for computing tasks indicated by the general-purpose processor for accelerated processing by the second accelerator.

[0124] As shown in (b) of Figure 6 , the management module can allocate a first storage area to the first accelerator from a free storage area in the storage resource pool. The management module can also update the storage configuration record for the first accelerator. Specifically, the management module adds a new entry to the storage configuration table, indicating the first storage area allocated to the first accelerator by the management module. The new entry indicates the properties of the storage medium to which the first storage area of ​​the first accelerator belongs, the offset address, and the address length. The offset address and address length indicate the first storage area allocated to the first accelerator. The address of the second storage area is discontinuous with the address of the first storage area.

[0125] Optionally, the resource application request also indicates a 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, there is no need 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, the storage medium type indicated by the attribute in the storage configuration record of the first accelerator is updated according to the storage medium type indicated by the resource application request, and a first storage area is allocated to the first accelerator from the storage medium indicated by the attribute.

[0126] Step 550: The management module releases the storage area allocated to the first accelerator.

[0127] After the first accelerator completes the computing task instructed by the general processor, the management module releases the storage area allocated to the first accelerator. The management module may release part or all of the storage area allocated to the first accelerator.

[0128] In some embodiments, the first accelerator may send a resource release request to the management module, the resource release request including the first accelerator identifier and storage capacity. The resource release request may also include an offset address and an address length. The management module releases the corresponding storage area based on the offset address and address length indicated in the resource release request.

[0129] In some other embodiments, the management module further stores a storage usage table indicating the size and usage of the storage area allocated to each accelerator. The management module can query the storage usage table and release the storage area allocated to the accelerator based on the size and usage of the storage area of ​​the accelerator recorded in the storage usage table.

[0130] For example, the management module queries a storage usage table to obtain usage information for the storage area allocated to the first accelerator. After the first accelerator completes the computing task instructed by the general-purpose processor, the storage area allocated to the first accelerator may become idle, and the management module releases the storage area allocated to the first accelerator. For example, the management module may query a storage configuration table based on the first accelerator's identifier to obtain the storage configuration record for the first accelerator and delete the storage configuration record for the first accelerator.

[0131] 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.

[0132] The storage resource management method provided in this application allows a dedicated processor to dynamically adjust the storage capacity allocated to an accelerator based on the storage capacity requirements of the accelerator, thereby flexibly allocating storage resources to each accelerator in the dedicated processor and improving the utilization rate of the storage resources of the dedicated processor. In addition, when the storage medium in the dedicated processor fails, storage resources can be flexibly reallocated to the accelerator, avoiding allocating the faulty area from the storage medium to the accelerator, thereby improving the reliability of the dedicated processor. Storage resources can be flexibly allocated to the accelerator during the design, manufacturing, and use of the dedicated processor, reducing the manufacturing cost of the chip and improving the commercial competitiveness of the chip.

[0133] It is understood that in order to implement the functions in the above embodiments, the dedicated processor includes hardware structures and / or software modules corresponding to the execution of each function. It should be readily apparent to those skilled in the art that, in combination with the units and method steps of each example described in the embodiments disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.

[0134] The storage resource management method provided according to this embodiment is described in detail above with reference to FIG. 1 to FIG. 6 . The processor provided according to this embodiment will be described below with reference to FIG. 7 .

[0135] FIG7 is a schematic diagram of the structure 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 embodiment, thereby also achieving the beneficial effects of the above method embodiment. In this embodiment, the processor can be a dedicated processor as shown in FIG5, or a module (such as a chip) applied to the processor.

[0136] As shown in Figure 7, 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 method embodiment shown in Figure 5 above.

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

[0138] The management module 720 is configured to obtain the storage capacity required by the first accelerator. For example, the management module 720 is configured to execute step 520 in FIG5 .

[0139] The management module 720 is further configured to allocate a first storage area from the storage resource pool to the first accelerator, wherein the storage capacity of the first storage area satisfies the storage capacity required by the first accelerator. For example, the management module 720 is configured to execute step 530 in FIG5 .

[0140] The management module 720 is further configured 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 configured to execute step 540 in FIG5 .

[0141] The management module 720 is further configured to release the storage area allocated to the first accelerator. For example, the management module 720 is configured to execute step 550 in FIG5 .

[0142] The accelerator 730 is configured to send a resource application request to the management module 720 to request the storage capacity required by the first accelerator.

[0143] The accelerator 730 is further configured to accelerate the processing of computing tasks instructed by the general-purpose processor, and the first storage area is configured to store data of the computing tasks instructed by the general-purpose processor to be accelerated by the first accelerator.

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

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

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

[0147] The storage resource pool 740 is used to store accelerator instructions, computing tasks, data of the accelerator accelerating the processing of computing tasks instructed by the general processor, etc., so that the accelerator 730 can process computing tasks.

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

[0149] It should be understood that the processor 700 of the embodiment of the present application can be implemented by an application-specific integrated circuit (ASIC) or a programmable logic device (PLD), wherein the PLD can be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. The storage resource management method shown in FIG5 can also be implemented by software, and its various modules can also be software modules. The processor 700 and its various modules can also be software modules.

[0150] According to the embodiment of the present application, the processor 700 may correspond to executing the method described in the embodiment of the present application, and the above-mentioned and other operations and / or functions of each unit in the processor 700 are respectively for implementing the corresponding processes of each method in Figure 5. For the sake of brevity, they will not be repeated here.

[0151] FIG8 is a schematic diagram of the structure of a computer system 800 provided in this application. As shown in FIG8 , computer system 800 includes a processor 810, a bus 820, a memory 830, a communication interface 840, a memory 850 (also referred to as a main memory unit), and a processor 860. Processor 810, processor 860, memory 830, memory 850, and communication interface 840 are connected via bus 820.

[0152] It should be understood that in this embodiment, the processor 810 may be a CPU, but may 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. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0153] 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 present application. For example, the processor 860 may be a GPU or an NPU. In the present application, the processor 860 may correspond to the processor 700 in this embodiment, and may correspond to executing the corresponding subject in any of the methods in Figure 5, and the above-mentioned and other operations and / or functions of the various modules in the processor 700 are respectively for implementing the corresponding processes of the various methods in Figure 5. For the sake of brevity, they are not repeated here.

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

[0155] The bus 820 may include a path for transmitting information between the above-mentioned 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, and a status signal bus. However, for the sake of clarity, various buses are labeled as bus 820 in the figure. The bus 820 may be a Peripheral Component Interconnect Express (PCIe) bus, 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 can be divided into an address bus, a data bus, a control bus, etc.

[0156] As an example, computer system 800 may include multiple processors. The processor may be a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and / or computing units for processing data (e.g., computer program instructions).

[0157] It is worth noting that FIG8 only takes the computer system 800 including one processor 810 and one memory 830 as an example. Here, the processor 810 and the memory 830 are respectively used to indicate a type of device or equipment. In a specific embodiment, the number of each type of device or equipment can be determined according to business requirements.

[0158] Memory 850 may be a volatile memory pool or a nonvolatile memory pool, or may include both volatile and nonvolatile memory. Nonvolatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (DR RAM). Memory 850 can store system configuration files.

[0159] The memory 830 may be used to store system configuration files in the above method embodiment, for example, a disk such as a mechanical hard disk or a solid-state drive.

[0160] The computer system 800 can be a general-purpose device or a dedicated device. For example, the computer system 800 can be an edge device (e.g., a box carrying a chip with processing capabilities). Alternatively, the computer system 800 can also be a server or other device with computing capabilities.

[0161] The present application also provides a computer system comprising a plurality of computer devices, the computer devices comprising a general-purpose processor and a dedicated processor, the dedicated processor being configured to execute the operating steps of the methods described in the above embodiments. The computer system may be a heterogeneous system, and the computer device may be a heterogeneous server.

[0162] The method steps in this embodiment can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs, or any other form of storage medium 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 an integral part of the processor. The processor and storage medium can be located in an ASIC. In addition, the ASIC can be located in a computing device. Of course, the processor and storage medium can also exist as discrete components in a computing device.

[0163] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented using software, all or part of the embodiments can be implemented 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 process or function described in the embodiments of the present application is performed 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 device. The computer program or instruction 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 instruction can be transmitted from one website, computer, server or data center to another website, computer, server or data center via wired or wireless means. 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 tape; it can also be an optical medium, such as a digital video disc (DVD); it can also be a semiconductor medium, such as a solid state drive (SSD). The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present application, and such modifications or substitutions should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection 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 multiple accelerators, a storage resource pool and a management module, the multiple accelerators include 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 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, and the first storage area is used to store data of a computing task indicated by a general-purpose processor for accelerated processing by the first accelerator.

2. The method according to claim 1, characterized in that The method further comprises: A storage configuration record of the first accelerator is updated according to the storage capacity of the first storage area, where 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 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.

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 include a second accelerator, the first storage area being allocated from a third storage area allocated to the second accelerator; and the method further includes: The address of the third storage area in the storage configuration record of the second accelerator is updated 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 to 6, characterized in that Obtaining the storage capacity required by the first accelerator includes: A resource application request of the first accelerator is obtained, where the resource application request is used to indicate a storage capacity required by the first accelerator.

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

9. The method according to any one of claims 1 to 8, characterized in that Obtaining the storage capacity required by the first accelerator includes: When the first accelerator processes the computing task instructed by the general processor, a storage capacity required by the first accelerator is obtained.

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

11. The method according to any one of claims 1 to 10, characterized in that The first storage area is a storage area outside the fault area in the storage resource pool.

12. The method according to any one of claims 1 to 11, characterized in that The method further comprises: After the first accelerator completes the computing task instructed by the general processor, the storage area allocated to the first accelerator is released.

13. The method according to any one of claims 1 to 12, characterized in that Before acquiring the storage capacity required by the first accelerator, the method further includes: When the dedicated processor starts, the default storage configuration record of the first accelerator is updated according to the system configuration file to obtain the storage configuration record of the first accelerator.

14. A processor, characterized in that: The processor includes a plurality of accelerators, a storage resource pool and a management module, wherein the plurality of accelerators includes a first accelerator; The management module is used 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, wherein the storage capacity of the first storage area satisfies the storage capacity required by the first accelerator; The first accelerator is used to accelerate the processing of computing tasks instructed by the general-purpose processor, and the first storage area is used to store data of the computing tasks instructed by the general-purpose processor to be accelerated by the first accelerator.

15. A computer system, characterized in that: The computer system includes a general-purpose processor and a special-purpose processor. When the special-purpose processor executes a group of computer instructions, the operation steps of any one of the methods of claims 1-13 are performed.

Citation Information

Patent Citations

  • Storage resource management method, processor and computer system

    CN120066386A

  • Memory management method and device, processor and computing equipment

    CN115904688A

  • Equipment virtualization method and related equipment

    CN116974736A

  • Resource Management For Solid State Drive Accelerators

    US20230259305A1