Processing method and system for system of linear equations based on cloud computing technology
By identifying and utilizing the operator precision of CPUs and heterogeneous processors to process linear equations through a cloud computing platform, the problem of single precision limitation of the PETSc toolkit is solved, and efficient and accurate solution of linear equations is achieved.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2025-12-25
- Publication Date
- 2026-07-30
AI Technical Summary
In the existing technology, the PETSc toolkit can only perform single-precision calculations when dealing with linear equation systems, which limits its application scope and cannot meet the calculation needs of different precision requirements.
By identifying different precisions of operators through a cloud computing platform, and using CPUs and heterogeneous processors (such as GPUs and TPUs) to process operators of different precisions respectively, the accuracy of the calculation results and the speed up of processing time are ensured.
This approach achieves the goal of accelerating the processing time of linear equation systems, improving solution efficiency, reducing computational resource consumption, and meeting the computational needs of different precision levels while ensuring the accuracy of the calculation results.
Smart Images

Figure CN2025145625_30072026_PF_FP_ABST
Abstract
Description
A method and system for processing linear equation systems based on cloud computing technology
[0001] This application claims priority to Chinese Patent Application No. 202510108510.9, filed on January 22, 2025, entitled "A Method and System for Processing Linear Equations Based on Cloud Computing Technology", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of cloud computing, and in particular to a method and system for processing linear equations based on cloud computing technology. Background Technology
[0003] Computer-aided engineering (CAE) simulation is a technique that uses computer simulation to predict the performance of products. It plays a crucial role in modern engineering design and analysis. The CAE simulation process requires solving systems of linear equations. The results directly reflect the product's performance parameters under different operating conditions, making them indispensable for product design and optimization. Therefore, how to solve these systems of linear equations is an extremely important issue.
[0004] One approach uses the Portable, Extensible Toolkit for Scientific Computation (PETSc) to process linear equations. At the software level, PETSc explicitly limits the single computational precision at compile time through the "with-precision" parameter. In other words, this approach can only perform single-precision computations on linear equations, limiting its application scope. Summary of the Invention
[0005] This application provides a method and system for processing linear equations based on cloud computing technology, which can not only identify and run operators of different precisions, but also accelerate processing time while ensuring the accuracy of calculation results.
[0006] Firstly, this application provides a method for processing linear equation systems based on cloud computing technology. This method is applied to a cloud system, which includes a cloud platform and infrastructure. The infrastructure includes at least one data center, which includes multiple servers, each including a central processing unit (CPU) and heterogeneous processors of different types. The method includes generating intermediate calculation results during the solution of the linear equation system. These intermediate calculation results are the calculation results obtained from the calculation steps other than the last calculation step. This application also identifies the precision of the operator used to process the intermediate calculation results, and calls different processors to process the intermediate calculation results for operators of different precisions. For example, the cloud platform obtains a first calculation result, which is an intermediate calculation result of the linear equation system. The cloud platform obtains a first operator, which is the operator used to calculate the first calculation result. In a scheme where the first operator is a first-precision operator, the CPU processes the first calculation result based on the first operator. Alternatively, in a scheme where the first operator is a second-precision operator, the heterogeneous processor processes the first calculation result based on the first operator, where the precision of the second-precision operator is lower than that of the first-precision operator.
[0007] In this application, the cloud platform can identify different precisions of operators, and different processors handle operators of different precisions. If the operation step of processing the first calculation result based on the first operator is precision-sensitive, the first operator is treated as a first-precision operator, and the CPU executes this operation step to ensure the accuracy of the calculation. If the operation step of processing the first calculation result based on the first operator is not precision-sensitive, the first operator is treated as a second-precision operator, and the operation step is executed by a heterogeneous processor of a different type than the CPU, thereby shortening the processing time. The precision of the first-precision operator is higher than that of the second-precision operator; that is, the first-precision operator is a high-precision operator, and the second-precision operator is a low-precision operator. Therefore, the technical solution provided in this application can not only identify and run operators of different precisions, but also accelerate processing time while ensuring the accuracy of the calculation results.
[0008] In some optional implementations of the first aspect, before processing intermediate calculation results, the precision of the operators included in the algorithm currently processing the linear equation system is identified. This facilitates calling different processors to perform operations on operators of different precisions during subsequent processing. For example, before processing the first calculation result based on the first operator, the cloud platform obtains the parameters and solution parameters of the linear equation system. The parameters of the linear equation system describe the linear equation system, and the solution parameters indicate the algorithm used to operate on the linear equation system. The cloud platform calls an artificial intelligence (AI) model to process the parameters and solution parameters of the linear equation system, identifying the operator precision of the first operator in the algorithm operating on the linear equation system. The operator precision includes either a first-precision operator or a second-precision operator.
[0009] In this application, an AI model is used to identify the operator precision of the first operator in an algorithm for solving linear equation systems. This achieves intelligent operation, eliminating the need for manual annotation of operator precision and improving the efficiency of solving linear equation systems. Furthermore, by identifying operator precision before processing intermediate calculation results, repeated precision identification during computation is avoided, reducing computational resource overhead. Additionally, the AI model's input consists of the parameters and solution parameters of the linear equation system, ensuring that the identification results match the currently processed linear equation system and guaranteeing the accuracy of the identified operator precision.
[0010] In some optional implementations of the first aspect, since different operator precisions are executed on different processors, intermediate calculation results may be transferred between different processors during the processing of linear equations. In the scheme where the CPU processes the first calculation result based on the first operator to obtain the second calculation result, the precision of the second calculation result is the same as the precision of the first precision operator. If the second operator obtained by the cloud platform for processing the second calculation result is a second precision operator, it means that the next processing step needs to be executed on a heterogeneous processor instead of the CPU. Since the precision of the current second calculation result is the same as the precision of the first precision operator, the CPU needs to reduce the precision of the second calculation result to be equal to the precision of the second precision operator to obtain the third calculation result. The CPU then sends the third calculation result to the heterogeneous processor. The heterogeneous processor processes the third calculation result based on the second operator.
[0011] In this application, for a second calculation result with the same precision as the first precision operator, in a scheme where the second operator processing the second calculation result is a second precision operator, the precision of the second calculation result is reduced before processing by a heterogeneous processor. Reducing the precision of the second calculation result ensures that the heterogeneous processor can properly process the reduced-precision calculation result, conforming to the precision requirements of the heterogeneous processor, thereby guaranteeing that the processing of the linear equation system can proceed normally and ensuring the feasibility of the technical solution of this application.
[0012] In some optional implementations of the first aspect, in the scheme where a heterogeneous processor processes the first calculation result based on the first operator to obtain a fourth calculation result, the precision of the fourth calculation result is the same as the precision of the second-precision operator. If the cloud platform obtains the third operator used to compute the fourth calculation result as a first-precision operator, it means that the next processing step needs to be executed on the CPU instead of the heterogeneous processor that currently obtains the fourth calculation result. The heterogeneous processor sends the fourth calculation result to the CPU, and the CPU improves the precision of the fourth calculation result to be equal to the precision of the first-precision operator, obtaining a fifth calculation result. The CPU processes the fifth calculation result based on the third operator.
[0013] In this application, not only can the precision of the calculation result be reduced as shown in the previous implementation, but the precision of the calculation result can also be improved, enriching the implementation methods and application scenarios of the technical solution of this application. For the fourth calculation result with the same precision as the second precision operator, in the scheme where the third operator processing the fourth calculation result is the first precision operator, the precision of the fourth calculation result is improved before it is processed by the CPU. Improving the precision of the fourth calculation result ensures that the precision of the calculation result processed by the CPU is high and conforms to the precision of the CPU, thereby ensuring the accuracy of the calculation result and improving the feasibility of the technical solution of this application.
[0014] In some optional implementations of the first aspect, after processing the intermediate calculation results, the final calculation result of the linear equation system can be obtained. The final calculation result refers to the result obtained based on the last calculation step of the linear equation system. The processor obtaining the final calculation result can be a heterogeneous processor. For example, the heterogeneous processor processes the first calculation result based on the first operator to obtain the sixth calculation result, which is the final calculation result of the linear equation system. To ensure the accuracy of the output result of the linear equation system, the CPU needs to output the calculation result of the linear equation system. That is, after obtaining the sixth calculation result, the heterogeneous processor sends the sixth calculation result to the CPU. The CPU improves the accuracy of the sixth calculation result to be equal to the accuracy of the first precision operator, obtaining the seventh calculation result. The cloud platform outputs the seventh calculation result.
[0015] In this application, for schemes where the termination calculation result is obtained from a heterogeneous processor, the calculation result is sent to the CPU, and the accuracy of the calculation result is improved before output. This ensures that the accuracy of the output calculation result is the same as that of the first-precision operator, or in other words, it ensures that the output calculation result is high-precision, which better meets the needs of practical applications and improves the practicality of the scheme.
[0016] In some optional implementations of the first aspect, the cloud platform can respond to user operation commands and trigger the linear equation processing method based on cloud computing technology provided in this application. That is, before obtaining the first calculation result, the cloud platform also obtains operation commands from the terminal device. The operation commands indicate the operator precision of the algorithm for identifying and operating the linear equation system, and call different processors to run operators with different precision.
[0017] This application provides users with a choice, allowing them to trigger the technical solutions provided in this application to meet their personalized needs.
[0018] In some optional implementations of the first aspect, the default setting can also be based on the technical solution provided in this application to handle linear equation systems.
[0019] Among the alternative implementations of the first aspect, the heterogeneous processor can be of several types, including at least one of a neural network processing unit (NPU), a graphics processing unit (GPU), a tensor processing unit (TPU), a data processing unit (DPU), or an intelligent processing unit (IPU).
[0020] In this application, there are multiple possible types of heterogeneous processors, which enriches the implementation methods of the technical solution and enhances the flexibility of the technical solution.
[0021] Secondly, this application provides a cloud system, including a cloud platform and infrastructure, the infrastructure including at least one data center, the at least one data center including multiple servers, the multiple servers including CPUs and heterogeneous processors of different types from the CPUs.
[0022] The cloud platform is used to obtain the first calculation result, which is the intermediate calculation result of the linear equation system;
[0023] The cloud platform is also used to obtain the first operator, which is the operator that calculates the first result.
[0024] If the first operator is a first-precision operator, then the CPU processes the first calculation result based on the first operator; or,
[0025] If the first operator is a second-precision operator, the heterogeneous processor is used to process the first calculation result based on the first operator, and the precision of the second-precision operator is lower than that of the first-precision operator.
[0026] The cloud system is used to implement the methods shown in the first aspect or any possible implementation of the first aspect, as detailed above, and will not be repeated here.
[0027] Thirdly, this application provides a cloud platform for managing infrastructure, including at least one data center, which in turn includes multiple servers, each server comprising a CPU and heterogeneous processors of different types. The cloud platform includes:
[0028] The acquisition unit is used to acquire the first calculation result, which is an intermediate calculation result of the linear equation system. The first operator is used to acquire the first operator, which is the operator used to operate on the first calculation result.
[0029] The processing unit is configured to, if the first operator is a first-precision operator, notify a first server including a CPU to process the first calculation result based on the first operator using the CPU through a virtual machine manager. Alternatively, if the first operator is a second-precision operator, notify a second server including a heterogeneous processor to process the first calculation result based on the first operator using the heterogeneous processor through a virtual machine manager, wherein the precision of the second-precision operator is lower than that of the first-precision operator.
[0030] The cloud platform is used to implement the operations performed by the cloud platform in the methods shown in the first aspect or any possible implementation of the first aspect, as detailed above, and will not be repeated here.
[0031] Fourthly, this application provides a computing device cluster including at least one computing device, each computing device including a processor and a memory. The processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster implements the method disclosed in the first aspect or any possible implementation of the first aspect.
[0032] Fifthly, this application provides a computer program product containing instructions that, when executed on a processor, implement the method shown in the first aspect or any possible implementation of the first aspect; or, when the instructions are run by a cluster of computer devices, cause the cluster of computer devices to implement the method disclosed in the first aspect or any possible implementation of the first aspect.
[0033] In a sixth aspect, this application provides a computer-readable storage medium storing computer program instructions that, when executed on a processor, implement the method shown in the first aspect or any possible implementation of the first aspect; or, when executed by a cluster of computer devices, cause the cluster of computer devices to implement the method disclosed in the first aspect or any possible implementation of the first aspect.
[0034] The beneficial effects shown in any of the second to sixth aspects are similar to those of the first aspect or any possible implementation of the first aspect, and will not be repeated here. Attached Figure Description
[0035] Figure 1 is a schematic diagram of a cloud system architecture provided in an embodiment of this application;
[0036] Figure 2 is a flowchart illustrating a method for processing linear equation systems based on cloud computing technology provided in an embodiment of this application.
[0037] Figure 3 is a schematic diagram of the main framework of artificial intelligence;
[0038] Figure 4 is a schematic diagram of another system architecture provided in an embodiment of this application;
[0039] Figure 5 is a schematic diagram of an interface provided in an embodiment of this application;
[0040] Figure 6 is another flowchart illustrating the method for processing linear equation systems based on cloud computing technology provided in an embodiment of this application.
[0041] Figure 7 is another flowchart illustrating the method for processing linear equation systems based on cloud computing technology provided in an embodiment of this application.
[0042] Figure 8 is a schematic diagram of the structure of a cloud platform provided in an embodiment of this application;
[0043] Figure 9 is a schematic diagram of a computing device provided in an embodiment of this application;
[0044] Figure 10 is a schematic diagram of a computing device cluster provided in an embodiment of this application;
[0045] Figure 11 is another schematic diagram of the computing device cluster provided in the embodiment of this application. Detailed Implementation
[0046] This application provides a method and system for processing linear equations based on cloud computing technology. It can not only identify and run operators of different precisions, but also accelerate processing time while ensuring the accuracy of calculation results.
[0047] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.
[0048] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of units is not necessarily limited to those units, but may include other units not explicitly listed or inherent to those processes, methods, products, or apparatuses. Additionally, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or multiple items. For example, at least one of a, b, or c can be expressed as: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0049] First, please refer to Figure 1, which is a schematic diagram of the system architecture provided in the embodiment of this application.
[0050] A cloud system comprises a cloud platform and infrastructure. Cloud computing services run on the infrastructure, and the cloud platform manages these services by managing the infrastructure. The cloud platform can also be called a cloud service platform, cloud management platform, etc. More specifically, the infrastructure includes at least one data center located in different regions. Each cloud data center has multiple servers, and these servers run business instances (including at least one of virtual machines, containers, and dedicated servers).
[0051] In the embodiment shown in Figure 1, a data center is used as an example to illustrate the principle of cloud platform management infrastructure.
[0052] As shown in Figure 1, the cloud platform 30 interacts with one or more servers (Server 1 and Server 2 in Figure 1) within the data center through the data center's internal network. The servers consist of a hardware layer and a software layer. The hardware layer includes the server's configured hardware, where PCI devices can be, for example, network interface cards (NICs), graphics processing units (GPUs), offloading cards, or other devices that can be plugged into peripheral component interconnect (PCI) or peripheral component interconnect express (PCIe) slots on the server. The software layer includes the operating system installed and running on the server (the operating system relative to the virtual machine can be called the host operating system). The host operating system contains a virtual machine manager (also called a hypervisor), whose role is to implement computational virtualization, network virtualization, and storage virtualization of the virtual machine, and to manage the virtual machine. A virtual machine (VM) refers to a complete computer system simulated by software, possessing full hardware system functionality, and running in a completely isolated environment.
[0053] In the system architecture shown in Figure 1, the infrastructure includes multiple servers that can run virtual machines. These virtual machines can have the same or different specifications. Virtual machines can also be called Elastic Compute Service (ECS), Elastic Instances, etc., and different cloud service providers may use different names.
[0054] Optionally, cloud platform 30 can be a public cloud platform. In this case, cloud service providers such as individuals or software developers with cloud resource development capabilities can provide cloud services to users. Users obtain cloud services through the Internet but do not own cloud computing resources. Optionally, cloud platform 30 can be a private cloud platform or a hybrid cloud platform; this application does not impose any restrictions on this.
[0055] Specifically, in the example shown in Figure 1, cloud platform 30 can provide an access interface (such as a user interface or application programming interface (API)). Users of cloud platform 30 and cloud service providers can use client 10 to remotely access the access interface to register cloud accounts and passwords on cloud platform 30. After successful authentication of the cloud account and password on cloud platform 30, they can log in to cloud platform 30 to create, manage, log in to, and operate virtual machines in the data center. For example, a user can log in to cloud platform 30 via client 10 through the Internet 20 using the account and password registered on cloud platform 30. Alternatively, a user can use a guest account provided by cloud platform 30 via client 10 through the Internet 20 to experience the cloud services provided by cloud platform 30.
[0056] In this embodiment of the application, the infrastructure includes at least one data center comprising multiple servers, which in terms of hardware include CPUs and heterogeneous processors of different types. The number of servers included in different data centers, and the number and type of processors included in the servers, can vary.
[0057] In a cloud platform-managed infrastructure setup within a data center, the number of servers in this data center can vary. Some servers may consist of CPUs, while others may include heterogeneous processors. Alternatively, the data center may contain heterogeneous servers, which are servers that include both CPUs and heterogeneous processors.
[0058] In a cloud platform-managed infrastructure setup across multiple data centers, the types of servers in each data center can be the same or different. For example, some or all data centers may include heterogeneous servers; another example is that some data centers may have servers containing CPUs, while others may have servers containing heterogeneous processors. In practical applications, there are various possibilities for the servers in each data center, as long as multiple data centers include servers with both CPUs and heterogeneous processors.
[0059] In this embodiment, a linear equation solving service is deployed in the business instance. A user purchases cloud services through terminal 10 on cloud platform 30 and sends a request to cloud platform 30. This request is used to request the linear equation solving service from cloud platform 30. Alternatively, the user can experience the linear equation solving service through a guest account, etc. The specific implementation process of the linear equation solving service will be described later.
[0060] Solving linear equation systems can be applied in CAE simulation scenarios. In CAE simulation scenarios, nonlinear numerical values may appear. Solving these values involves converting them into linear equation systems and then solving the resulting linear equation systems. That is, the linear equation systems processed in this application include both numerical values that were initially linear equation systems and those obtained through transformation. The linear equation systems can also be sparse or dense linear equation systems, etc. Furthermore, nonlinear numerical values can have various possibilities, including eigenvalues and nonlinear equation systems, etc., which are not specifically limited here.
[0061] It should be noted that the client 10 mentioned in the embodiments of this application runs on a terminal. A terminal can be a device with wireless transceiver capabilities, also known as a terminal device, specifically referring to user equipment (UE), access terminal, subscriber unit, user station, mobile station, remote station, remote terminal, mobile device, user terminal, wireless communication equipment, user agent, or user device. Terminal devices can also be satellite phones, cellular phones, smartphones, wireless data cards, wireless modems, machine-type communication devices, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to a wireless modem, in-vehicle devices, communication devices mounted on high-altitude aircraft, wearable devices, drones, robots, terminals in device-to-device (D2D) communication, terminals in vehicle-to-everything (V2X) communication, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, mixed reality (MR) terminal devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical care, wireless terminals in smart grids, wireless terminals in transportation safety, and wireless terminals in smart cities. This application does not limit the scope of wireless terminals, such as those in a city, smart homes, or future communication networks.
[0062] In addition, in the embodiments of this application, there may be more or fewer terminal devices in the system. The number and type of terminal devices are determined according to actual needs, and are not limited here.
[0063] Please refer to Figure 2 below. Figure 2 is a flowchart illustrating the method for processing linear equation systems based on cloud computing technology provided in the embodiments of this application.
[0064] As described above, the method for processing linear equation systems based on cloud computing technology provided in this application is applied to a cloud system, which includes a cloud platform and infrastructure. The infrastructure includes at least one data center, and the at least one data center includes multiple servers, which include CPUs and heterogeneous processors of different types.
[0065] 201. The cloud platform obtains the first calculation result, which is the intermediate calculation result of the linear equation system.
[0066] Solving a system of linear equations involves multiple computational steps. The results obtained from the steps preceding the last step are considered intermediate results for the system. Each step in solving a system of linear equations includes at least one intermediate result. For example, if the algorithm for solving a system of linear equations involves 10 computational steps, then the results obtained from the first to the ninth step are all intermediate results for the system.
[0067] There are several possibilities for storing intermediate calculation results. They can be stored on the processor that produced the calculation result, or they can be stored on the CPU by default, or in other locations that can be read by the cloud platform, or in other locations that can be read by the processor that processed the intermediate calculation result, such as the cloud platform, shared storage space, etc. No specific restrictions are made here.
[0068] In the embodiment shown in Figure 2, the intermediate calculation result obtained by the cloud platform is taken as the first calculation result.
[0069] 202. The cloud platform obtains the first operator, which is the operator that calculates the first result.
[0070] Intermediate calculation results require further processing to obtain the next step's result, thus gradually leading to the final result of the linear equation system. The final result refers to the result obtained from the last step in calculus of the linear equation system. For example, if the algorithm for calculus of a linear equation system includes 10 steps, then the result obtained from the 10th step is the final result of the linear equation system.
[0071] The cloud platform obtains the first operator, which is the operator that performs the operation on the first calculation result. An operator is a mapping from one function space to another. Broadly speaking, any operation performed on a function can be considered an operator, or a single operation performed on a function can be considered an operator. For example, matrix multiplication, scalar multiplication, and matrix addition are all considered operators.
[0072] 203. If the first operator is a first-precision operator, then the CPU processes the first calculation result based on the first operator.
[0073] After the cloud platform obtains the first operator, it identifies the precision of implementing the first operator, thus determining the precision of the first operator. The precision of implementing the first operator refers to the precision of processing the first calculation result based on the first operator. If this operation step is precision-sensitive, it means that the operation step is a high-precision calculation, and the first operator implementing this operation step is a high-precision operator. In this embodiment, a first-precision operator represents a high-precision operator.
[0074] The first operator is a first-precision operator, meaning that the precision of the first operator is first-precision. In this scheme, the CPU performs calculations on the first calculation result, that is, the CPU processes the first calculation result based on the first operator. Furthermore, the cloud platform obtains the first calculation result and determines the precision of the first operator; the cloud platform then instructs the virtual machine manager of the first server to use the CPU to perform calculations on the first calculation result.
[0075] The hardware of the first server includes a CPU. The first server can have several possibilities: it could be any one of multiple servers within at least one data center that includes a CPU; it could be the server with the most idle resources and a CPU within at least one data center; or it could be a server determined based on a policy, such as the server with the highest priority and a CPU, the server with the lowest communication latency and a CPU, or the server with the most CPU cores. The first server can be selected and configured based on the actual application; specific details are not limited here.
[0076] Additionally, the precision of high-precision operators can be set by the user through their terminal device or defined by the cloud platform by default; no specific limitation is made here. Optionally, for floating-point data, a precision greater than or equal to FP64 can be set as high precision. For integer data, a precision greater than or equal to INT16 can be set as high precision.
[0077] 204. If the first operator is a second-precision operator, then the heterogeneous processor processes the first calculation result based on the first operator, and the precision of the second-precision operator is lower than that of the first-precision operator.
[0078] The cloud platform identifies the precision of the first calculation result processed based on the first operator. If this calculation step is not sensitive to precision, it means that the calculation step is a low-precision calculation, and the first operator implementing this calculation step is a low-precision operator. In this embodiment, a second-precision operator is used to represent a high-precision operator. That is, the precision of the second-precision operator is lower than that of the first-precision operator.
[0079] The first operator is a second-precision operator, meaning that the precision of the first operator is second-precision. In this scheme, the first calculation result is processed by a heterogeneous processor, that is, the first calculation result is processed by the heterogeneous processor based on the first operator. Furthermore, the cloud platform obtains the first calculation result and determines the precision of the first operator, and the cloud platform notifies the virtual machine manager of the second server to use the heterogeneous processor to process the first calculation result.
[0080] The hardware of the second server includes heterogeneous processors. The second server can have several possibilities: it could be any one of multiple servers within at least one data center that includes heterogeneous processors; it could be the server with the most idle resources and heterogeneous processors within at least one data center; or it could be a server determined based on a policy, such as the server with the highest priority and heterogeneous processors, or the server with the lowest communication latency and heterogeneous processors. The first server can be configured based on the actual application, and specific settings are not limited here. Similarly, the precision corresponding to low-precision operators can be set by the user through the terminal device, or it can be defined by default by the cloud platform, and specific settings are not limited here. Optionally, for floating-point data, a precision less than or equal to FP32 can be set as high precision. For integer data, a precision less than or equal to INT8 can be set as high precision.
[0081] Additionally, it should be noted that the high and low precision settings are fixed during the solution of a system of linear equations. For example, the high precision is set to FP64 and the low precision to FP32. Therefore, the precision of the intermediate and final calculation results generated from solving the system of linear equations will be either FP64 or FP32.
[0082] It should be noted that, in the embodiments of this application, a heterogeneous processor refers to a processor of a different type than the CPU. This includes, but is not limited to, at least one of the following: NPU, GPU, TPU, DPU, or IPU.
[0083] As described above, in this embodiment, the cloud platform can identify different precisions of operators, and different processors handle operators of different precisions. If the operation step of processing the first calculation result based on the first operator is precision-sensitive, the first operator is treated as a first-precision operator, and the CPU executes this operation step to ensure the accuracy of the operation. If the operation step of processing the first calculation result based on the first operator is not precision-sensitive, the first operator is treated as a second-precision operator, and the heterogeneous processor of a different type than the CPU executes this operation step, thereby shortening the processing time. The precision of the first-precision operator is higher than that of the second-precision operator; that is, the first-precision operator is a high-precision operator, and the second-precision operator is a low-precision operator. Therefore, the technical solution provided by this application can not only identify and run operators of different precisions, but also accelerate processing time while ensuring the accuracy of the calculation results. Furthermore, there are various possible types of heterogeneous processors, enriching the implementation methods of the technical solution of this application and improving its flexibility.
[0084] In steps 203 and 204 of Figure 2 above, it is described how different processors handle operators of different precision. In this embodiment, the cloud platform identifies the precision of the operator before solving the linear equation system. This process is explained below:
[0085] In summary, before obtaining intermediate calculation results of a system of linear equations from a cloud platform, the parameters and solution parameters of the system of linear equations are acquired. These parameters and solution parameters are then input into an AI model, which uses this model to identify the precision of some or all operators in the algorithm used to compute the system of linear equations.
[0086] The parameters of the linear equation system describe the system and include relevant data such as the coefficient matrix and right-hand side terms. The solution parameters indicate the algorithm for solving the linear equation system, which may include, but is not limited to, any of the following: direct methods, iterative methods, preprocessing, algebraic multigrid (AMG), etc.
[0087] Furthermore, there are several possible ways for the cloud platform to obtain the parameters of the linear equation system. Optionally, the cloud platform can display an interface on a terminal device, where the user configures the system, such as inputting parameters for the linear equation system, or parameters for the simulation environment and product. This allows the terminal device to obtain the parameters and send them to the cloud platform. In other words, in this solution, the cloud platform receives the parameters of the linear equation system from the terminal device. Alternatively, the linear equation system can be obtained by converting user-input configuration information within a CAE simulation scenario.
[0088] There are several possible methods for obtaining the solution parameters. Optionally, the cloud platform can display an operation interface on a terminal device, where the user can configure the system, such as selecting an algorithm or entering command lines, so that the terminal device can obtain the solution parameters and send them to the cloud platform. In other words, in this scheme, the cloud platform receives the solution parameters from the terminal device. Optionally, the linear equation system can be obtained by transforming the configuration information input by the user in a CAE simulation scenario.
[0089] The cloud platform utilizes the precision of operators identified by AI models, encompassing the precision of some or all operators in the algorithm running a system of linear equations. Understandably, once the algorithm for running a system of linear equations is determined, the operators it includes are also fixed. However, in different systems of linear equations, different operators have varying impacts on the precision of the final calculation result, thus requiring the cloud platform to identify different numbers of operators. In schemes that identify the precision of only some operators, these operators can be considered critical operators. Critical operators are those that significantly impact the precision of the final calculation result of the system of linear equations, or those that perform complex calculations. The critical operators differ across different algorithms and different systems of linear equations, requiring determination based on the specific application requirements.
[0090] For example, key operators for iterative methods may include: sparse matrix-vector multiplication (SpMV) operator, general matrix-vector multiplication (GEMV) operator, scalar multiplication (AXPY) operator, dot product operator, norm operator, preprocessing operator, etc.
[0091] Corresponding to the embodiment shown in Figure 2 above, the key operator includes the aforementioned first operator. That is, for the first operator, before step 203 or step 204, the cloud platform obtains the parameters and solution parameters of the linear equation system, calls the AI model to process the parameters and solution parameters of the linear equation system, and identifies the operator precision of the first operator in the algorithm for operating the linear equation system. The operator precision includes a first precision operator or a second precision operator.
[0092] It should be noted that in the cloud platform's approach of using AI models to identify the precision of certain operators in the algorithm for running linear equations, there are operators whose precision is not identified. Since these operators are not critical operators, the computational steps corresponding to these operators can be executed by either the CPU or a heterogeneous processor; no specific limitation is made here.
[0093] Optionally, the processor that has obtained the current calculation result can continue to perform the calculation on the current result. This approach avoids the transmission latency caused by transferring the current result to other processors and also accelerates the overall processing time of the linear equation system. For example, suppose the operator used to calculate the current intermediate result is a non-critical operator, and the current intermediate result is obtained by the CPU. Then, the CPU can continue to process the current intermediate result to obtain the next calculation result.
[0094] As explained above, the accuracy of the cloud platform's recognition operators is achieved using an AI model. This AI model utilizes AI technology; the following section explains the main framework of this AI technology, as well as the training and inference process of the AI model.
[0095] Please refer to Figure 3, which shows a schematic diagram of an artificial intelligence framework. This framework describes the overall workflow of an artificial intelligence system and is applicable to general artificial intelligence needs.
[0096] The above-mentioned artificial intelligence framework will be elaborated from two dimensions: "intelligent information chain" (horizontal axis) and "IT value chain" (vertical axis).
[0097] The "intelligent information chain" reflects a series of processes from data acquisition to processing. For example, it could be a general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, and intelligent execution and output. In this process, data undergoes a condensation process of "data—information—knowledge—wisdom."
[0098] The "IT value chain" reflects the value that artificial intelligence brings to the information technology industry, from the underlying infrastructure of human intelligence, information (provided and processed by technology) to the industrial ecosystem of systems.
[0099] (1) Infrastructure.
[0100] The infrastructure provides computing power to support artificial intelligence systems, enabling communication with the external world through sensors and supporting them through a basic platform. Computing power is provided by intelligent chips, including hardware acceleration chips such as CPUs, NPUs, GPUs, application-specific integrated circuits (ASICs), and field-programmable gate arrays (FPGAs). The basic platform includes distributed computing frameworks and related platform guarantees and support, which may include cloud storage and computing, interconnected networks, etc. For example, sensors communicate with the outside world to acquire data, and this data is provided to intelligent chips in the distributed computing system provided by the basic platform for computation.
[0101] (2) Data.
[0102] The data at the next layer of infrastructure is used to represent the data sources in the field of artificial intelligence. The data involves graphics, images, voice, text, and IoT data from traditional devices, including business data from existing systems and sensor data such as force, displacement, liquid level, temperature, and humidity.
[0103] (3) Data processing.
[0104] Data processing typically includes methods such as data training, machine learning, deep learning, search, reasoning, and decision-making.
[0105] Among them, machine learning and deep learning can perform intelligent information modeling, extraction, preprocessing, and training on data, including symbolization and formalization.
[0106] Reasoning refers to the process in which, in a computer or intelligent system, the intelligent reasoning of humans is simulated, and a pre-trained model is used to predict or classify new, unprocessed data based on reasoning control strategies. Typical functions are prediction and classification.
[0107] Decision-making refers to the process of analyzing and judging intelligent information after reasoning, and usually provides functions such as classification, sorting, and prediction.
[0108] (4) General ability.
[0109] After the data processing mentioned above, the results of the data processing can be used to form some general capabilities, such as algorithms or a general system, for example, translation, text analysis, computer vision processing, speech recognition, image recognition, etc.
[0110] (5) Smart products and industry applications.
[0111] Intelligent products and industry applications refer to products and applications of artificial intelligence systems in various fields. They are the encapsulation of overall artificial intelligence solutions, productizing intelligent information decision-making and realizing practical applications. Their application areas mainly include: intelligent manufacturing, intelligent transportation, smart home, intelligent healthcare, intelligent security, autonomous driving, smart cities, and intelligent terminals.
[0112] Please refer to Figure 4 below, which is a schematic diagram of the system architecture provided in the embodiment of this application.
[0113] In the embodiment shown in Figure 4, the artificial intelligence system includes an execution device 410, a training device 420, a database 430, a terminal device 440, a data storage system 450, and a data acquisition device 460. The execution device 410 includes a computing module 411 and an input / output (I / O) interface 412.
[0114] Data acquisition device 460 is used to acquire a large-scale training dataset and store the training dataset in database 430. Training device 420 trains AI model 401 based on the training dataset maintained in database 430. Corresponding to the embodiment shown in Figure 3, training device 420 is used to complete data training and train artificial intelligence model based on theories such as machine learning and deep learning.
[0115] In this embodiment, the training dataset acquired by the training device 420 can cover different business simulation scenarios, or in other words, the training dataset includes datasets of different categories. For example, the dataset includes data obtained from business simulation scenarios such as structural, fluid, electromagnetic, optical, and acoustic simulations. Among them, structural simulation is often used in scenarios such as stiffness analysis and collision experiments. Fluid simulation is often used in simulation scenarios related to aerodynamics. Electromagnetic simulation is for electrical simulation scenarios such as circuit boards and integrated circuits. The AI model 401 trained based on multiple categories can be widely applied to various business scenarios, improving the universality of the AI model 401.
[0116] Specifically, the training dataset includes not only training data and ground truth values. The training data comprises multiple sets of training parameters. Each set of training parameters includes the parameters and solution parameters of a linear equation system. Each set of training parameters corresponds to a set of ground truth values, which represent the accuracy of some or all operators in the algorithm running the corresponding linear equation system. During training, the parameters and solution parameters of the linear equation system are input into the AI model. The AI model processes these parameters to obtain the corresponding feature values. After processing by at least one neural network layer, the accuracy of the operators is output. Based on the accuracy of the output operators and the accuracy of the corresponding operators in the ground truth values, the AI model is iteratively trained to optimize its parameters until the error between the accuracy of the output operators and the accuracy of the corresponding operators in the ground truth values is less than or equal to an error threshold, or until a preset number of training iterations is reached. At this point, the AI model is considered to have converged, and the training of the AI model is complete.
[0117] The trained AI model 401 runs on the execution device 410. Corresponding to the embodiment shown in Figure 3, the execution device 410 is used to run the AI model 401 to complete the inference task. In this embodiment, the inference task includes identifying the accuracy of some or all operators in the algorithm running the linear equation system. Optionally, during the inference process, the parameters and solution parameters of the linear equation system are input to the AI model 401, which identifies the key operators in the algorithm running the linear equation system and outputs the accuracy of the key operators.
[0118] In this embodiment, before solving the linear equations, the cloud platform first invokes the AI model 401 to trigger the aforementioned inference task. The accuracy of the key operators output by the AI model 401 is then fed back to the cloud platform, allowing the cloud platform to obtain the accuracy of the key operators before solving the linear equations. Optionally, the inputs and outputs obtained by the AI model 401 can also be stored in the data storage system 450, or transmitted to the database 430 via the I / O interface 412 to update the training dataset.
[0119] It's important to note that in solving linear equation systems, different computational steps may employ the same operator. In other words, the same operator might be called for different intermediate calculation results. Therefore, it's crucial to distinguish operators across different computational steps when solving a linear equation system. That is, for the same key operator, each instance is considered an independent instance in different computational steps, and both require precision analysis. For example, in solving linear equation systems related to computer graphics (CG), both orthogonalization and residual operations involve SpMV operations, meaning the SpMV operator is included in both different computational steps. These two SpMV operators are considered two independent instances, and their precision needs to be identified using AI Model 401. The precision of the same operator may differ in different computational steps. For instance, in the SpMV operator example above, orthogonalization can use a low-precision SpMV operator, while residual operations use a high-precision SpMV operator.
[0120] It should also be noted that the embodiments of this application do not limit the structure of the neural network layers included in the AI model 401, that is, they do not limit the number and function of the neural network layers. The specific implementation of the AI model 401 can be determined based on the hardware performance of the execution device 410 running the AI model 401, and is not limited here. For example, the AI model 401 may include pooling layers, convolutional layers, fully connected layers, etc.
[0121] It should be noted that Figure 4 is merely a schematic diagram of a system architecture provided by an embodiment of this application, and does not constitute any limitation on the positional relationship between various devices, components, modules, etc. For example, in the embodiment shown in Figure 4, the data storage system 450 is an external memory relative to the execution device 410. In some optional embodiments, the data storage system 450 may also be integrated into the execution device 410. In the embodiment shown in Figure 4, the terminal device 440 is an external device relative to the execution device 410. In some optional embodiments, the terminal device 440 may also be integrated into the execution device 410; specific details are not limited here.
[0122] Additionally, it should be noted that the execution device 410 can be a hardware device, such as a server or terminal device, or a virtual device, such as a cloud platform or business instance (virtual machine, container, dedicated host, etc.). The operation performed by the execution device 410 can be performed by one or more devices. In other words, the inference task performed by the AI model 401 in this embodiment of the application, namely the method for identifying the precision of some or all operators in the algorithm running a system of linear equations, can be applied to a single device or a cluster of devices, and the specifics are not limited here.
[0123] As described above, in this embodiment, the AI model is used to identify the operator precision of the first operator in the algorithm for solving linear equation systems. This achieves intelligent operation, eliminating the need for manual annotation of operator precision and improving the efficiency of solving linear equation systems. Furthermore, by identifying operator precision before processing intermediate calculation results, repeated identification during computation is avoided, reducing computational resource overhead. Additionally, the AI model's input consists of the parameters and solution parameters of the linear equation system, ensuring that the identification results match the currently processed linear equation system and guaranteeing the accuracy of the identified operator precision.
[0124] The foregoing embodiments described the processing of single intermediate calculation results. However, in solving a system of linear equations, multiple intermediate calculation results may occur, and the precision of the operators used to process different intermediate results may also differ. Therefore, these intermediate calculation results need to be transferred between different processors. Possible solutions are described below.
[0125] In some alternative implementations, the intermediate calculation result obtained from the current computation step is processed by the CPU and has high precision. The operator that performs the next operation on this intermediate calculation result has low precision. In this approach, the processor performing the operation on the intermediate result is a heterogeneous processor, and the precision of the intermediate calculation result needs to be reduced before the operation.
[0126] Taking the intermediate calculation result obtained in step 203 of Figure 2 as an example, the current intermediate calculation result is obtained by the CPU processing the first calculation result based on the first operator. This current intermediate calculation result is denoted as the second calculation result, which has high precision, meaning it has the same precision as the first precision operator. After obtaining the second calculation result, the cloud platform obtains the second operator, which is the operator used to calculate the second calculation result, and it is a second precision operator. In other words, the second operator is a low precision operator. This step of processing the second calculation result based on the second operator is not sensitive to precision and will not have an intolerable impact on the accuracy of the final calculation result of the linear equation system. Processing the second calculation result by a heterogeneous processor can also accelerate the processing time of the linear equation system. However, due to the performance limitations of heterogeneous processors, they cannot directly process high-precision calculation results and need to reduce the precision of the second calculation result. The second calculation result is obtained by the CPU, which directly performs precision conversion on the second calculation result, reducing its precision to the same level as the second precision operator, thus obtaining the third calculation result. For example, assuming the precision of the second calculation result is FP64 and the precision of the second precision operator is FP32, the CPU reduces the precision of the second calculation result to FP32. After obtaining the third calculation result, the CPU sends the third calculation result to the heterogeneous processor, enabling the heterogeneous processor to process the third calculation result based on the second operator.
[0127] In this embodiment, for a second calculation result with the same precision as the first precision operator, in a scheme where the second operator processing the second calculation result is the second precision operator, the precision of the second calculation result is reduced before being processed by a heterogeneous processor. Reducing the precision of the second calculation result ensures that the heterogeneous processor can properly process the reduced-precision calculation result, conforming to the precision requirements of the heterogeneous processor. This guarantees that the processing of the linear equation system can proceed normally, ensuring the feasibility of the technical solution of this application.
[0128] In some alternative implementations, the intermediate computation result obtained from the current computation step is processed by a heterogeneous processor and has low precision. The operator that performs the next operation on this intermediate computation result has high precision. In this approach, the processor performing the operation on the intermediate result is a CPU, and the precision of the intermediate computation result needs to be improved before the operation.
[0129] Taking the intermediate calculation result obtained in step 204 of Figure 2 as an example, the current intermediate calculation result is obtained by the heterogeneous processor processing the first calculation result based on the first operator. This current intermediate calculation result is denoted as the fourth calculation result, which has low precision, meaning it is the same precision as the second-precision operator. After obtaining the fourth calculation result, the cloud platform obtains the third operator, which is the operator used to calculate the fourth calculation result, and it is a first-precision operator. In other words, the third operator is a low-precision operator, and this step of processing the fourth calculation result based on the third operator is precision-sensitive. The heterogeneous processor cannot perform this operation; the CPU must execute this step. Furthermore, the fourth calculation result is low-precision and cannot meet the requirements of high-precision calculation. Therefore, the precision of the fourth calculation result needs to be converted to be the same as that of the first-precision operator. However, the heterogeneous processor, limited by its performance, cannot achieve this capability. Therefore, the heterogeneous processor sends the fourth calculation result to the CPU, which then improves the precision of the fourth calculation result to obtain the fifth calculation result. For example, assuming the precision of the fourth calculation result is FP16 and the precision of the first precision operator is FP64, the CPU improves the precision of the fourth calculation result to FP64 to obtain the fifth calculation result. Then, the CPU processes the fifth calculation result based on the third operator.
[0130] In this embodiment, for a fourth calculation result with the same precision as the second precision operator, in a scheme where the third operator processing the fourth calculation result is the first precision operator, the precision of the fourth calculation result is increased before it is processed by the CPU. Increasing the precision of the fourth calculation result ensures that the calculation result processed by the CPU is of high precision, consistent with the CPU's precision requirements, thereby ensuring the accuracy of the calculation results and improving the feasibility of the technical solution of this application.
[0131] In summary, in this embodiment, whether the intermediate calculation results are to be improved or reduced in precision, the precision conversion operation is performed by the CPU. There is no need to introduce other modules to perform the precision conversion, avoiding communication latency caused by the processor (whether CPU or other processor) transmitting intermediate calculation results to other modules, further accelerating the processing time of linear equations. It also reduces system complexity and improves the practicality of the technical solution.
[0132] Furthermore, during the solution of linear equations, intermediate calculation results are transmitted between the CPU and heterogeneous processors. This includes the CPU sending intermediate calculation results to the heterogeneous processors, or the heterogeneous processors sending intermediate processing results to the CPU. In the former scenario, the cloud platform notifies the server containing the CPU that generated the intermediate calculation results, triggering that CPU to send the intermediate calculation results to the heterogeneous processors via the virtual machine manager. In the latter scenario, the cloud platform notifies the server containing the heterogeneous processors that generated the intermediate calculation results, triggering that heterogeneous processors to send the intermediate calculation results to the CPU via the virtual machine manager. This process eliminates the need for additional modules to transmit intermediate calculation results, avoiding increased communication latency and further accelerating the processing time of linear equations. It also reduces system complexity and improves the practicality of the technical solution.
[0133] The precision conversion described in the foregoing embodiments is for intermediate calculation results. In practical applications, the final calculation result of a system of linear equations may also require precision conversion and data transfer to ensure that the output calculation result of the system of linear equations is of high precision. The final calculation result refers to the calculation result obtained from the last operation step of the system of linear equations. Due to the different processors executing the last operation step, the precision of the final calculation result varies. Data transfer refers to the transmission of the final calculation result between the CPU and heterogeneous processors.
[0134] In some alternative implementations, the final calculation step of the linear equation system is performed by the CPU, resulting in a high-precision termination calculation result, which is then directly output. Specifically, the CPU sends the termination calculation result to the cloud platform, which then outputs the termination calculation result. In other words, the calculation result output by the linear equation system is the termination calculation result.
[0135] In some alternative implementations, the final computational step of the linear equation system is performed by a heterogeneous processor, resulting in a low-precision termination calculation. In such cases, the precision of the termination calculation result needs to be improved before output. That is, in this approach, the computational result output by the linear equation system is not the termination calculation result.
[0136] For example, taking the calculation result obtained in step 204 of the embodiment shown in Figure 2 as the termination calculation result, that is, the heterogeneous processor processes the first calculation result based on the first operator to obtain the termination calculation result. This termination calculation result is recorded as the sixth calculation result. The precision of the sixth calculation result is low and needs to be improved. The heterogeneous processor sends the sixth calculation result to the CPU, and the CPU performs precision conversion on the sixth calculation result, improving its precision to be equal to the precision of the first precision operator, thus obtaining the seventh calculation result. The CPU sends the seventh calculation result to the cloud platform, and the cloud platform outputs the seventh calculation result as the output result of the linear equation system.
[0137] In this embodiment, for schemes where the termination calculation result is obtained from a heterogeneous processor, the calculation result is sent to the CPU, and the accuracy of the calculation result is improved before output. This ensures that the accuracy of the output calculation result is the same as that of the first precision operator, or in other words, it ensures that the output calculation result is high-precision, which better meets the needs of practical applications and improves the practicality of the scheme.
[0138] As described above, the method provided in this application accelerates the solution process of linear equation systems by using different types of processors to process operators of different precisions. The cloud platform provides various solutions for linear equation systems; the method provided in this application can be triggered by the user or set by default. The possible scenarios are described below.
[0139] In some optional implementations, before obtaining the parameters of the linear equation system, or, in the embodiment shown in Figure 2 above, before obtaining the first calculation result, the cloud platform obtains an operation instruction from the terminal device. This operation instruction indicates the operator precision of the algorithm for calculating the linear equation system and calls different processors to run operators with different precisions. That is, the operation instruction indicates triggering the method provided in the embodiments of this application to apply the cloud service described above. The cloud platform responds to the operation instruction and executes the linear equation system processing method based on cloud computing technology described above.
[0140] For example, please refer to Figure 5, which is a schematic diagram of the interface provided in an embodiment of this application.
[0141] In the embodiment shown in Figure 5, the interface displayed by the cloud platform through the terminal device includes a parameter input area, an algorithm selection area, and a service selection area. The user inputs the parameters of the linear equation system in the parameter input area, selects an algorithm for operating the linear equation system in the algorithm selection area, and selects whether to apply the cloud computing-based linear equation system processing method provided in this application in the service selection area.
[0142] As shown in Figure 5, when the user clicks the "Iterative Method" control in the algorithm selection area, the terminal device displays a list of iterative methods. The list shows multiple iterative methods, including the conjugate gradient iteration method, the Jacobi iteration method, the successive over-relaxation (SOR) iteration method, and convergence analysis. By sliding the progress bar, more iterative methods can be displayed, such as the Gauss-Seidel iteration method, etc., but this is not limited to any specific method here.
[0143] As shown in Figure 5, when the user clicks the "Yes" control in the service selection area, the terminal device receives the operation command and sends it to the cloud platform. This operation command specifies the operator precision of the algorithm for solving linear equations and calls different processors to run operators with different precision.
[0144] It should be noted that the embodiment shown in Figure 5 is merely an example of the interface provided in this application and does not limit the specific content of the interface in actual applications. In actual applications, the interface may include more or fewer areas, and each area may have more possible controls or operation areas. For example, the aforementioned three areas may be displayed sequentially, and an interface including the next area may be displayed only after the operation of one interface is completed. As another example, the service selection area may also display a selection control for whether the solution to the linear equation system is implemented based on the CPU or based on a CPU + heterogeneous processor, for the user to choose from.
[0145] This application provides users with a choice, allowing them to trigger the technical solutions provided in this application to meet their personalized needs.
[0146] In some alternative implementations, the cloud platform can provide tenants with the aforementioned method for processing linear equations based on cloud computing technology, using default settings. For simplicity, this method is referred to as the linear equations acceleration service. For example, in a scenario where the cloud platform determines that the tenant currently calling the cloud service is either a tenant who has already purchased the linear equations acceleration service or a tenant with a trial account for the linear equations acceleration service, the cloud platform defaults to providing services to the current tenant according to the linear equations processing method based on cloud computing technology provided in the embodiments of this application.
[0147] The technical solutions provided in this application embodiment will be further described below from a system perspective, taking into account specific application scenarios. Please refer to Figure 6, which is a flowchart illustrating the method for processing linear equation systems based on cloud computing technology provided in this application embodiment.
[0148] In the embodiment shown in Figure 6, a CAE simulation service is used as an example. In the CAE simulation service, the cloud platform receives data uploaded by users, which describes the simulation environment, simulation products, etc. The CAE simulation service involves solving various numerical values, requiring the invocation of a numerical computation solver service for processing. These numerical values include nonlinear data, linear equation systems, and eigenvalues. During the solution process, non-linear equation system values are converted into linear equation systems, and a linear equation system solving service is invoked. The linear equation system processing method based on cloud computing technology provided in this application is used to complete the solution of the linear equation system.
[0149] The linear equations solving service takes as input the parameters and solution parameters of the linear equations system and outputs the calculated results. This process involves multiple modules working together, using different processors to execute operators based on their varying precision in the algorithm for solving the linear equations system. In summary, the linear equations solving service includes a precision adaptive configuration module, a linear equations solver, a low-precision acceleration module, other processors, a high-precision correction module, and a CPU. The functions of each module are described below.
[0150] The accuracy adaptive configuration module is used to identify the accuracy of some or all operators in the algorithm for operating the linear equation system based on the parameters and solution parameters of the linear equation system, and transmit the operator accuracy identification results to the linear equation system solver. Specifically, the accuracy adaptive configuration module includes an AI model, which is used to identify the accuracy of the operators. The implementation principle, training process, and inference process of the AI model have been described in the aforementioned related embodiments and will not be repeated here. Based on the functionality of the accuracy adaptive configuration module, the difficulty for users to operate mixed-precision operators can be reduced, and the algorithmic benefits brought by mixed-precision operations can be maximized.
[0151] A linear equation solver is used to solve linear equation systems, including obtaining intermediate and final calculation results. In the embodiment shown in Figure 6, this solver is simply an example of an iterative linear equation solver; that is, the algorithm for operating the linear equation system, indicated by the solution parameters, is an iterative method. This does not constitute a limitation on the type of solver used in actual applications. Furthermore, the iterative linear equation solver, based on the obtained parameters, solution parameters, and operator precision identification results of the linear equation system, determines the high-precision and low-precision operators in the algorithm for operating the linear equation system, and calls different modules to process operators of different precisions. For low-precision operators in the intermediate calculation results, the low-precision acceleration module is called. For high-precision operators in the intermediate calculation results, the high-precision correction module is called. In addition, the solution parameters also include convergence parameters, indicating the convergence precision of the linear equation system to ensure that the final calculation result of the linear equation system meets the precision set by the user. Convergence parameters include parameters such as solutions, norms, or residual coefficients used to indicate convergence precision. The iterative solver for linear equations sends the convergence parameters to the high-precision correction module.
[0152] The low-precision acceleration module is used to obtain intermediate calculation results and low-precision operators, and to call other processors to perform low-precision operations. In the embodiment shown in Figure 6, the heterogeneous processor is taken as an NPU. The specific implementation process of the low-precision operator can be shown in Figure 7. Please refer to Figure 7, which is a flowchart illustrating the method for processing linear equation systems based on cloud computing technology provided in this application embodiment.
[0153] As shown in Figure 7, the low-precision acceleration module includes a data transmission unit, a data slicing unit, and a data reprocessing module.
[0154] The data transmission unit is used not only to receive low-precision input from the linear equation iterative solver, but also to send low-precision calculation results corresponding to the low-precision input to the linear equation iterative solver. Optionally, the data transmission unit can also send low-precision calculation results to the CPU, where the CPU performs precision conversion.
[0155] The low-precision input includes low-precision operators and low-precision intermediate calculation results. The low-precision intermediate calculation results can be obtained by reducing the precision of the high-precision calculation results processed by the CPU, or they can be calculation results obtained by the NPU. In the latter approach, the embodiment shown in Figure 7 uses the linear equation iterative solver transmitting the low-precision intermediate calculation results to the low-precision acceleration module as an example. In practical applications, the low-precision acceleration module can also directly read the low-precision intermediate calculation results from their storage location, such as from the NPU or CPU; specific details are not limited here.
[0156] The data slicing unit is used to slice low-precision intermediate calculation results to meet the limitations of NPU AIcore's caching and computing power, ensuring the normal operation of NPU AIcore's data processing. Based on the implementation process of low-precision operators, the low-precision acceleration module calls the corresponding NPU AIcore computing unit to process the data slices and obtain the processed slices. The NPU AIcore's computing unit includes at least one of the following: a cube computing unit, a vector computing unit, or a scalar computing unit; the specific type is not limited here.
[0157] The data reprocessing unit is used to repackage or accumulate the processed slices to obtain low-precision calculation results. These low-precision calculation results correspond to low-precision inputs, that is, they are obtained by performing calculations on low-precision intermediate calculation results based on low-precision operators.
[0158] Other processors are used to perform low-precision operator operations, that is, to process low-precision intermediate calculation results based on low-precision operators to obtain the next calculation result. In practical applications, programming languages can be used to construct functions that run low-precision operators on other processor chips. These programming languages include tensor instruction kernels (TIK), C, numerical Python (NumPy), or Fortran, etc., and are not specifically limited here. It is understood that in the embodiments shown in Figures 6 and 7, the example of another processor being the NPU is only used as an example and does not constitute a limitation on other processor types in actual applications.
[0159] The high-precision correction module is used to acquire intermediate calculation results and high-precision operators, and to call the CPU to perform high-precision calculations. It can also acquire convergence parameters and perform high-precision corrections on precision-sensitive parts of the calculation process. Optionally, precision-sensitive parts include updates to parameters such as the solution, residuals, and residual norm.
[0160] The CPU is used to execute high-precision operator operations, that is, to process high-precision intermediate calculation results based on high-precision operators to obtain the next calculation result. It can also perform precision conversion, including increasing or decreasing the precision of intermediate calculation results. In practical applications, programming languages can be used to construct functions that run high-precision operators on the CPU chip. These programming languages include tensor instruction kernels (TIK), C, numerical Python (NumPy), or Fortran, etc., without specific limitations here.
[0161] The specific implementation process of each module in the embodiment shown in Figure 6 or Figure 7 can be found in the description of the aforementioned related embodiments, and will not be repeated here.
[0162] Furthermore, the beneficial effects of the method for processing linear equation systems based on cloud computing technology provided in this application can be demonstrated through test cases. It is understood that solving a system of linear equations is essentially solving for matrices.
[0163] For example, test matrix data can be collected from public databases to build a test case library. Public data blocks include SuiteSparse Matrix Collection or Martrix Market, etc. For test objects involving iterative methods (e.g., the CG conjugate gradient method) for solving linear equation systems, test code is written during the test development phase to implement the following functions: 1) Read the test matrix data. 2) Call the interface of the iterative solver for linear equation systems, set the solution parameters, and perform matrix solving. 3) Calculate the solution error and statistically analyze relevant performance indicators such as computation time. During testing, various test case sizes can be tested, covering non-zero element matrices of various sizes, increasing the depth of testing. The breadth of testing can also be broadened, for example, by selecting matrices from different business scenarios, with matrix data covering complex and real numbers. Through multiple tests and modifications, the goal of developing a one-click run script and test platform can be achieved, and automated batch testing can also be realized.
[0164] Based on real latency, the method for processing linear equations based on cloud computing technology provided in this application embodiment can leverage the computational performance of other processors in processing low-precision operators and improve the average matrix solution time for large-scale datasets.
[0165] This application also provides a cloud system, which includes a cloud platform and infrastructure. The infrastructure includes at least one data center, and the at least one data center includes multiple servers. The multiple servers include CPUs and heterogeneous processors of different types than the CPUs.
[0166] In some optional implementations, a cloud platform is used to obtain a first calculation result, which is an intermediate calculation result of a system of linear equations, and to obtain a first operator, which is an operator that operates on the first calculation result.
[0167] If the first operator is a first-precision operator, then the CPU processes the first calculation result based on the first operator. Or,
[0168] If the first operator is a second-precision operator, the heterogeneous processor is used to process the first calculation result based on the first operator, and the precision of the second-precision operator is lower than that of the first-precision operator.
[0169] In some optional implementations, the cloud platform is also used to: acquire the parameters and solution parameters of the linear equation system, the solution parameters indicating the algorithm for operating the linear equation system; invoke an AI model to process the parameters and solution parameters of the linear equation system; and identify the operator precision of the first operator in the algorithm for operating the linear equation system, the operator precision including a first-precision operator or a second-precision operator.
[0170] In some alternative implementations, the CPU processes the first calculation result based on the first operator to obtain a second calculation result, which is an intermediate calculation result of the linear equation system.
[0171] The cloud platform is also used to obtain the second operator, which is the operator that calculates the second result, and the second operator is the second precision operator.
[0172] The CPU is also used to reduce the precision of the second calculation result to be equal to the precision of the second precision operator, thus obtaining the third calculation result. The third calculation result is then sent to the heterogeneous processor.
[0173] The heterogeneous processor is also used to process the third computation result based on the second operator.
[0174] In some alternative implementations, the heterogeneous processor processes the first calculation result based on the first operator to obtain a fourth calculation result, which is an intermediate calculation result of the linear equation system.
[0175] The cloud platform is also used to obtain the third operator, which is the operator that calculates the result of the fourth calculation, and the third operator is the first precision operator.
[0176] Heterogeneous processors are also used to send fourth computation results to the CPU.
[0177] The CPU is also used to improve the precision of the fourth calculation result to be equal to the precision of the first precision operator, thus obtaining the fifth calculation result. The fifth calculation result is then processed based on the third operator.
[0178] In some alternative implementations, the heterogeneous processor processes the first calculation result based on the first operator to obtain a sixth calculation result, which is the termination calculation result of the linear equation system.
[0179] Heterogeneous processors are also used to send sixth calculation results to the CPU.
[0180] The CPU is also used to improve the precision of the sixth calculation result to be equal to the precision of the first precision operator, so as to obtain the seventh calculation result.
[0181] The cloud platform is also used to output the seventh calculation result.
[0182] In some alternative implementations, the cloud platform is also used to acquire operation instructions from the terminal device, the operation instructions indicating the operator precision of the algorithm for identifying and operating the linear equation system, and calling different processors to run operators with different precision.
[0183] In some alternative implementations, the heterogeneous processor includes at least one of an NPU, GPU, TPU, DPU, or IPU.
[0184] The cloud system is used to implement the method for processing linear equations based on cloud computing technology provided in the embodiments of this application. The specific implementation process is as shown in the previous embodiments, and will not be repeated here.
[0185] Please refer to Figure 8, which is a schematic diagram of the structure of the cloud platform provided in an embodiment of this application. The cloud platform is used to manage infrastructure, which includes at least one data center, and the at least one data center includes multiple servers, which include CPUs and heterogeneous processors of different types.
[0186] In some alternative implementations, the cloud platform 800 includes an acquisition unit 801 and a processing unit 802.
[0187] The acquisition unit 801 is used to acquire a first calculation result, which is an intermediate calculation result of the linear equation system. It also acquires a first operator, which is the operator used to operate on the first calculation result.
[0188] The processing unit 802 is configured to, if the first operator is a first-precision operator, notify a first server including a CPU to process the first calculation result using the CPU via a virtual machine manager. Alternatively, if the first operator is a second-precision operator, notify a second server including a heterogeneous processor to process the first calculation result using the heterogeneous processor, wherein the precision of the second-precision operator is lower than that of the first-precision operator.
[0189] In some optional implementations, the acquisition unit 801 is also used to acquire the parameters and solution parameters of the linear equation system, wherein the solution parameters indicate the algorithm for operating the linear equation system.
[0190] The processing unit 802 is also used to call the AI model to process the parameters and solution parameters of the linear equation system, and to identify the operator precision of the first operator in the algorithm for operating the linear equation system. The operator precision includes a first precision operator or a second precision operator.
[0191] In some alternative implementations, the CPU processes the first calculation result based on the first operator to obtain a second calculation result, which is an intermediate calculation result of the linear equation system.
[0192] The acquisition unit 801 is also used to acquire a second operator, which is an operator for calculating a second result, and the second operator is a second precision operator.
[0193] Processing unit 802 is further configured to: instruct the first server to reduce the precision of the second calculation result to equal to the precision of the second precision operator using the CPU via the virtual machine manager, thereby obtaining the third calculation result; instruct the first server to send the third calculation result to the heterogeneous processor via the CPU via the virtual machine manager; and instruct the second server to process the third calculation result based on the second operator using the heterogeneous processor.
[0194] In some alternative implementations, the heterogeneous processor processes the first calculation result based on the first operator to obtain a fourth calculation result, which is an intermediate calculation result of the linear equation system.
[0195] The acquisition unit 801 is also used to acquire a third operator, which is the operator that calculates the result of the fourth calculation, and the third operator is a first-precision operator.
[0196] Processing unit 802 is used to notify the second server to send the fourth calculation result to the CPU using a heterogeneous processor. The precision of the fourth calculation result is increased to be equal to the precision of the first precision operator, resulting in the fifth calculation result. The first server is then notified to process the fifth calculation result using the CPU based on the third operator through the virtual machine manager.
[0197] In some optional implementations, the cloud platform also includes an output unit 803. The heterogeneous processor processes the first calculation result based on the first operator to obtain a sixth calculation result, which is the termination calculation result of the linear equation system.
[0198] The processing unit 802 is also used to notify the second server to send the sixth calculation result to the CPU using a heterogeneous processor. It also notifies the first server to use the CPU via the virtual machine manager to improve the precision of the sixth calculation result to be equal to the precision of the first precision operator, thus obtaining the seventh calculation result.
[0199] Output unit 803 is used to output the seventh calculation result.
[0200] In some optional implementations, the acquisition unit 801 is also used to acquire operation instructions from the terminal device, the operation instructions indicating the operator precision of the algorithm for identifying and operating the linear equation system, and calling different processors to run operators with different precision.
[0201] The acquisition unit 801, processing unit 802, and output unit 803 can all be implemented in software or in hardware. For example, the implementation of processing unit 802 will be described below. Similarly, the implementation of acquisition unit 801 and output unit 803 can refer to the implementation of processing unit 802.
[0202] As an example of a software functional unit, processing unit 802 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Further, the aforementioned computing instance may be one or more. For example, processing unit 802 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Further, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one or more geographically proximate data centers. Typically, a region may include multiple AZs.
[0203] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.
[0204] As an example of a hardware functional unit, the processing unit 802 may include at least one computing device, such as a server. Alternatively, the processing unit 802 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be implemented using a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof.
[0205] The processing unit 802 includes multiple computing devices that can be distributed in the same region or in different regions. Similarly, the processing unit 802 can be distributed within the same Availability Zone (AZ) or in different AZs. Likewise, the processing unit 802 can be distributed within the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0206] It should be noted that by acquiring unit 801 and processing unit 802 respectively implementing different steps in the processing method of linear equations based on cloud computing technology, all functions of cloud platform 800 are realized, thereby realizing the processing method of linear equations based on cloud computing technology provided in this application embodiment, which will not be elaborated here.
[0207] Please refer to Figure 9, which is a schematic diagram of the structure of a computing device provided in an embodiment of this application. The computing device 900 includes a processor 901, a communication interface 902, a bus 903, and a memory 904. The processor 901, the communication interface 902, and the memory 904 communicate with each other via the bus 903. In practical applications, communication can also be achieved through other means such as wireless transmission; the specific method is not limited here.
[0208] The computing device 900 may be a server or a terminal device. It should be understood that this application does not limit the number of processors and memory in the computing device 900.
[0209] Processor 901 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0210] The communication interface 902 uses transceiver modules, such as, but not limited to, network interface cards and transceivers, to enable communication between the computing device 900 and other devices or communication networks.
[0211] Bus 903 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, only one line is used in Figure 9, but this does not imply that there is only one bus or one type of bus. Bus 903 can include pathways for transmitting information between various components of computing device 900 (e.g., memory 904, processor 901, communication interface 902).
[0212] Memory 904 may include volatile memory, such as random access memory (RAM). Memory 904 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).
[0213] The memory 904 stores executable program code, and the processor 901 executes this executable program code to implement the functions of the aforementioned acquisition unit 801, processing unit 802, and output unit 803, thereby realizing the method for processing linear equations based on cloud computing technology. That is, the memory 904 stores instructions for executing the method for processing linear equations based on cloud computing technology.
[0214] This application also provides a computing device cluster, which includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some optional embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.
[0215] Please refer to Figures 10 and 11, which are schematic diagrams of the structure of the computing device cluster provided in the embodiments of this application.
[0216] As shown in Figure 10, the computing device cluster includes at least one computing device 900. The memory 904 of one or more computing devices 900 in the computing device cluster may store the same instructions for executing the processing method for linear equation systems based on cloud computing technology provided in the embodiments of this application.
[0217] In some possible implementations, the memory 904 of one or more computing devices 900 in the computing device cluster may also store partial instructions for executing processing methods for linear equation systems based on cloud computing technology. In other words, a combination of one or more computing devices 904 can jointly execute instructions for executing processing methods for linear equation systems based on cloud computing technology.
[0218] It should be noted that the memory 904 in different computing devices 900 within the computing device cluster can store different instructions, each used to execute a portion of the functions of the data processing device. That is, the instructions stored in the memory 904 of different computing devices 900 can implement the functions of one or more units among the acquisition unit 801, processing unit 802, and output unit 803.
[0219] In some possible implementations, one or more computing devices in a computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc. Figure 11 illustrates one possible implementation. As shown in Figure 11, two computing devices 900A and 900B are connected via a network. Specifically, they are connected to the network through communication interfaces in each computing device. In this type of possible implementation, the memory 904 in computing device 900A stores instructions for executing the functions of the acquisition unit 801. Simultaneously, the memory 904 in computing device 900B stores instructions for executing the functions of the processing unit 802 and the output unit 803.
[0220] The connection method between the computing device clusters shown in Figure 11 can be based on the processing method of linear equations based on cloud computing technology provided in this application, in which the acquisition operation and other operations are executed separately. That is, the function of the acquisition unit 801 is assigned to the computing device 900A, and the functions of the processing unit 802 and the output unit 803 are assigned to the computing device 900B.
[0221] It should be understood that the functions of computing device 900A shown in Figure 11 can also be performed by multiple computing devices 900. Similarly, the functions of computing device 900B can also be performed by multiple computing devices 900. In practical applications, one or more computing devices can also implement the functions of one of the units 801, 802, and 803, respectively.
[0222] This application also provides another computing device cluster. The connection relationship between the computing devices in this computing device cluster can be similarly referred to the connection method of the computing device cluster described in Figures 10 and 11, and will not be repeated here.
[0223] This application also provides a computer program product containing instructions. The computer program product may be software or program products containing instructions, capable of running on a computing device or stored on any usable medium. When the computer program product is run on at least one computer device, it causes the at least one computer device to execute the above-described method for processing linear equations based on cloud computing technology.
[0224] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute the above-described method for processing linear equations based on cloud computing technology.
[0225] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0226] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of this application.
Claims
1. A method for processing linear equation systems based on cloud computing technology, characterized in that, The method is applied to a cloud system, which includes a cloud platform and infrastructure. The infrastructure includes at least one data center, and the at least one data center includes multiple servers, which include a central processing unit (CPU) and heterogeneous processors of a different type than the CPU. The method includes: The cloud platform obtains a first calculation result, which is an intermediate calculation result of the linear equation system. The cloud platform acquires a first operator, which is an operator used to calculate the first calculation result; If the first operator is a first-precision operator, then the CPU processes the first calculation result based on the first operator; or, If the first operator is a second-precision operator, then the heterogeneous processor processes the first calculation result based on the first operator, and the precision of the second-precision operator is lower than that of the first-precision operator.
2. The method according to claim 1, characterized in that, Before processing the first calculation result based on the first operator, the method further includes: The cloud platform acquires the parameters and solution parameters of the linear equation system, and the solution parameters indicate the algorithm for calculating the linear equation system. The cloud platform calls the artificial intelligence (AI) model to process the linear equation system and the solution parameters, and identifies the operator precision of the first operator in the algorithm for calculating the linear equation system. The operator precision includes the first precision operator or the second precision operator.
3. The method according to claim 1 or 2, characterized in that, The CPU processes the first calculation result based on the first operator to obtain a second calculation result, which is an intermediate calculation result of the linear equation system. After obtaining the second calculation result, the method further includes: The cloud platform acquires a second operator, which is an operator for calculating the second calculation result, and the second operator is a second precision operator; The CPU reduces the precision of the second calculation result to be equal to the precision of the second precision operator, and obtains the third calculation result; The CPU sends the third calculation result to the heterogeneous processor; The heterogeneous processor processes the third calculation result based on the second operator.
4. The method according to claim 1 or 2, characterized in that, The heterogeneous processor processes the first calculation result based on the first operator to obtain a fourth calculation result, which is an intermediate calculation result of the linear equation system. After obtaining the fourth calculation result, the method further includes: The cloud platform obtains a third operator, which is an operator for calculating the fourth calculation result, and the third operator is the first precision operator; The heterogeneous processor sends the fourth calculation result to the CPU; The CPU improves the precision of the fourth calculation result to be equal to the precision of the first precision operator, and obtains the fifth calculation result; The CPU processes the fifth calculation result based on the third operator.
5. The method according to claim 1 or 2, characterized in that, The heterogeneous processor processes the first calculation result based on the first operator to obtain a sixth calculation result, which is the termination calculation result of the linear equation system. The heterogeneous processor sends the sixth calculation result to the CPU; The CPU improves the precision of the sixth calculation result to be equal to the precision of the first precision operator, and obtains the seventh calculation result; The cloud platform outputs the seventh calculation result.
6. The method according to any one of claims 1 to 5, characterized in that, Before obtaining the first calculation result, the method further includes: The cloud platform receives operation instructions from the terminal device. The operation instructions indicate the operator precision of the algorithm for calculating the linear equation system and call different processors to run operators with different precision.
7. The method according to any one of claims 1 to 6, characterized in that, The heterogeneous processor includes at least one of the following: a neural network processor (NPU), a graphics processing unit (GPU), a tensor processor (TPU), a data processing unit (DPU), or an intelligent processor (IPU).
8. A cloud system, characterized in that, This includes a cloud platform and infrastructure, the infrastructure including at least one data center, the at least one data center including multiple servers, the multiple servers including CPUs and heterogeneous processors of different types from the CPUs: The cloud platform is used to obtain a first calculation result, which is an intermediate calculation result of a system of linear equations. The cloud platform is also used to obtain a first operator, which is an operator for calculating the first calculation result; If the first operator is a first-precision operator, then the CPU is used to process the first calculation result based on the first operator; or, If the first operator is a second-precision operator, then the heterogeneous processor is used to process the first calculation result based on the first operator, wherein the precision of the second-precision operator is lower than that of the first-precision operator.
9. The cloud system according to claim 8, characterized in that, The cloud platform is also used for: Obtain the parameters and solution parameters of the linear equation system, wherein the solution parameters indicate the algorithm for operating the linear equation system; The AI model is invoked to process the parameters of the linear equation system and the solution parameters, and the operator precision of the first operator in the algorithm for calculating the linear equation system is identified. The operator precision includes the first precision operator or the second precision operator.
10. The cloud system according to claim 8 or 9, characterized in that, The CPU processes the first calculation result based on the first operator to obtain a second calculation result, which is an intermediate calculation result of the linear equation system. The cloud platform is also used to obtain a second operator, which is an operator for calculating the second calculation result, and the second operator is a second precision operator; The CPU is further configured to reduce the precision of the second calculation result to be equal to the precision of the second precision operator, thereby obtaining a third calculation result; The CPU is also used to send the third calculation result to the heterogeneous processor; The heterogeneous processor is further configured to process the third calculation result based on the second operator.
11. The cloud system according to claim 8 or 9, characterized in that, The heterogeneous processor processes the first calculation result based on the first operator to obtain a fourth calculation result, which is an intermediate calculation result of the linear equation system. The cloud platform is also used to obtain a third operator, which is an operator for calculating the fourth calculation result, and the third operator is the first precision operator; The heterogeneous processor is also used to send the fourth calculation result to the CPU; The CPU is also used to improve the precision of the fourth calculation result to be equal to the precision of the first precision operator, so as to obtain the fifth calculation result; The CPU is also used to process the fifth calculation result based on the third operator.
12. The cloud system according to claim 8 or 9, characterized in that, The heterogeneous processor processes the first calculation result based on the first operator to obtain a sixth calculation result, which is the termination calculation result of the linear equation system. The heterogeneous processor is also used to send the sixth calculation result to the CPU; The CPU is further configured to improve the precision of the sixth calculation result to be equal to the precision of the first precision operator, thereby obtaining the seventh calculation result; The cloud platform is also used to output the seventh calculation result.
13. The cloud system according to any one of claims 8 to 12, characterized in that, The cloud platform is also used to acquire operation instructions from terminal devices. The operation instructions indicate the operator precision of the algorithm for identifying and calculating the linear equation system, and call different processors to run operators with different precision.
14. The cloud system according to any one of claims 8 to 13, characterized in that, The heterogeneous processor includes at least one of the following: NPU, GPU, TPU, DPU, or IPU.
15. A computing device cluster, characterized in that, It includes at least one computing device, each computing device including a processor and memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device to cause the cluster of computing devices to perform the method as described in any one of claims 1 to 7.
16. A computer program product containing instructions, characterized in that, When the instruction is executed by the computing device cluster, the computing device cluster performs the method as described in any one of claims 1 to 7.
17. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes computer program instructions that, when executed by a cluster of computing devices, cause the cluster of computing devices to perform the method as described in any one of claims 1 to 7.