Probability calculation accelerator card, probability calculation acceleration method and apparatus, and medium
By storing the node weights of the probabilistic graph on a probability computation accelerator card and using full addition or full subtraction for computation, efficient large-scale probabilistic graph solving with high connectivity is achieved, solving the problem of insufficient hardware interconnection resources and improving system performance and efficiency.
Patent Information
- Application Number
- PCT/CN2025/103528
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-22
- Filing Date
- 2025-06-25
- Publication Date
- 2026-01-29
AI Technical Summary
Existing technologies struggle to efficiently solve large-scale probabilistic graphs with high connectivity in hardware. In particular, traditional circuit routing techniques cannot provide sufficient interconnect resources, and optical chips are expensive and immature, limiting system scale and performance.
A dedicated storage unit is set up on the probability calculation acceleration card to store the sum of the weights of the nodes in the probability graph. The initial weight sum is received directly from the host computer, and the weight sum of the neighboring nodes is updated by full addition or full subtraction. Time-division multiplexing is achieved, reducing the complexity of hardware connections.
It reduces the complexity of hardware connectivity implementation, expands the size of the Ising machine that can be accommodated on a single chip, increases the system operating frequency, reduces energy consumption, and supports efficient solving of large-scale probabilistic graphs with high connectivity.
Smart Images

Figure CN2025103528_29012026_PF_FP_ABST
Abstract
Description
Probabilistic computing acceleration card, probabilistic computing acceleration method, apparatus and media
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to Chinese Patent Application No. 202410986573.X, filed on July 22, 2024, the entire contents of which are incorporated herein by reference in its entirety. TECHNICAL FIELD
[0003] The present disclosure relates to the field of data processing, and in particular, to a probabilistic computing acceleration card, a probabilistic computing acceleration method, a probabilistic computing acceleration apparatus, a computer device, a computer readable storage medium, and a computer program product. BACKGROUND
[0004] Probabilistic computing is an emerging computing paradigm that utilizes probabilistic models and stochastic processes to provide new ideas and methods for solving combinatorial optimization problems.
[0005] A computing acceleration card is a specialized hardware device designed to accelerate certain types of computing tasks. Compared to general-purpose CPUs, acceleration cards typically have more arithmetic units and higher memory bandwidth, enabling higher parallel computing capabilities.
[0006] The methods described in this section can not necessarily be prior art methods. Unless otherwise indicated, it should not be assumed that any of the methods described in this section are considered prior art merely because of their inclusion in this section. Similarly, issues mentioned in this section should not be assumed to have been admitted to be prior art in any jurisdiction unless otherwise indicated. SUMMARY
[0007] It would be advantageous to provide a mechanism that mitigates, alleviates, or even eliminates one or more of the above problems.
[0008] According to an aspect of the present disclosure, there is provided a probability calculation acceleration card, comprising: an interface configured to receive, from a host computer, initial states of a plurality of nodes in a probability graph and initial weight sums of the plurality of nodes and edge weights between the plurality of nodes, and return, to the host computer, final states of the plurality of nodes, wherein the initial weight sum of each node in the plurality of nodes represents an accumulated result of edge weights between the node and adjacent nodes of the node based on initial states of the adjacent nodes; a first storage unit configured to store the edge weights between the plurality of nodes; a second storage unit configured to store the weight sums of the plurality of nodes respectively; a state updating unit configured to determine whether to update a state of a target node in the plurality of nodes based on a target temperature parameter and the weight sum of the target node; a first storage control unit configured to, in response to a determination to update the state of the target node, fetch, from the first storage unit, the edge weights between the target node and the adjacent nodes of the target node; an intermediate processing unit configured to process the edge weights fetched by the first storage control unit to obtain an intermediate result, wherein the intermediate result represents a change amount of the weight sums of the adjacent nodes of the target node before and after the state of the target node is updated; and a weight sum updating unit configured to, after performing a full addition or a full subtraction calculation on the weight sums of the adjacent nodes of the target node received from the second storage unit and the intermediate result received from the first storage control unit, write a new weight sum back to the second storage unit.
[0009] According to another aspect of the present disclosure, there is provided a probability calculation acceleration method, comprising: receiving, from a host computer via an interface, initial states of a plurality of nodes in a probability graph and initial weight sums of the plurality of nodes and edge weights between the plurality of nodes, wherein the edge weights between the plurality of nodes are stored in a first storage unit, the weight sums of the plurality of nodes are stored in a second storage unit, and wherein the initial weight sum of each node in the plurality of nodes represents an accumulated result of edge weights between the node and adjacent nodes of the node based on initial states of the adjacent nodes; determining, by a state updating unit, whether to update a state of a target node in the plurality of nodes based on a target temperature parameter and the weight sum of the target node; in response to a determination to update the state of the target node, fetching, by a first storage control unit, the edge weights between the target node and the adjacent nodes of the target node from the first storage unit; processing, by an intermediate processing unit, the edge weights fetched by the first storage control unit to obtain an intermediate result, wherein the intermediate result represents a change amount of the weight sums of the adjacent nodes of the target node before and after the state of the target node is updated; and after performing a full addition or a full subtraction calculation on the weight sums of the adjacent nodes of the target node received from the second storage unit and the intermediate result received from the first storage control unit, writing, by a weight sum updating unit, a new weight sum back to the second storage unit.
[0010] According to yet another aspect of the present disclosure, there is provided a probability calculation acceleration device, comprising: a receiving unit configured to receive, from a host computer via an interface, initial states of a plurality of nodes in a probability graph and initial weight sums of the plurality of nodes respectively and edge weights between the plurality of nodes, wherein the edge weights between the plurality of nodes are stored in a first storage unit, the weight sums of the plurality of nodes respectively are stored in a second storage unit, and wherein the initial weight sum of each of the plurality of nodes represents an accumulated result of the edge weight between the node and a neighboring node of the node based on initial states of the neighboring node; a state updating unit configured to determine, by the state updating unit, whether to update a state of a target node in the plurality of nodes based on a target temperature parameter and the weight sum of the target node; a first storage control unit configured to, in response to a determination that the state of the target node is to be updated, retrieve the edge weight between the target node and the neighboring node from the first storage unit; an intermediate processing unit configured to process the edge weight retrieved by the first storage control unit to obtain an intermediate result, wherein the intermediate result represents a change amount of the weight sum of the neighboring node of the target node before and after the state of the target node is updated; and a weight sum updating unit configured to, after performing a full add or full subtract calculation on the weight sum of the neighboring node of the target node received from the second storage unit and the intermediate result received from the first storage control unit, write a new weight sum back to the second storage unit.
[0011] According to still another aspect of the present disclosure, there is provided a computer device comprising the probability calculation acceleration card described above.
[0012] According to still another aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program, which, when executed by a processor, causes the processor to perform the method described above.
[0013] According to still another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, causes the processor to perform the method described above.
[0014] According to one or more embodiments of the present disclosure, the present disclosure sets a storage unit specially used for storing weight sums of a plurality of nodes in a probability graph on a probability calculation acceleration card, and directly receives initial weight sums of the plurality of nodes from a host computer, and further updates weight sums of neighboring nodes of a target node after updating a state of the target node by using a simple full add or full subtract calculation, so that it is not necessary to recalculate the weight sums every time it is determined whether to update a state of a node, and it is not necessary to reserve a connection for each edge in the probability graph, the complexity of hardware connection implementation is reduced, and high-efficiency solving of a large-scale probability graph with high connectivity can be achieved.
[0015] It is to be understood that the description of the contents described in this part is not intended to identify key or important features of the embodiments of the present disclosure, nor to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0016] In the following description of exemplary embodiments in conjunction with the accompanying drawings, more details, features and advantages of the present disclosure are disclosed, in which:
[0017] FIG. 1 shows a structural block diagram of a probability calculation acceleration card according to an exemplary embodiment of the present disclosure;
[0018] FIG. 2 shows a structural block diagram of a probability calculation acceleration card according to an exemplary embodiment of the present disclosure;
[0019] FIG. 3 shows a flowchart of a probability calculation acceleration method according to an exemplary embodiment of the present disclosure;
[0020] FIG. 4 shows a flowchart of determining whether to update the state of a target node according to an exemplary embodiment of the present disclosure;
[0021] FIG. 5 shows a structural block diagram of a probability calculation acceleration device according to an exemplary embodiment of the present disclosure; and
[0022] FIG. 6 shows a structural block diagram of an exemplary computer device that can be applied to an exemplary embodiment. DETAILED DESCRIPTION
[0023] In the present disclosure, unless otherwise stated, the use of the terms "first", "second", and the like to describe various elements is not intended to limit the positional relationship, the timing relationship, or the importance relationship of these elements. Such terms are only used to distinguish one element from another element. In some examples, the first element and the second element can refer to the same instance of the element, and in some cases, based on the context of the description, they can also refer to different instances.
[0024] The terms used in the description of various described examples in the present disclosure are only for the purpose of describing a particular example, and are not intended to be limiting. Unless the number of elements is specifically limited by the context, the element can be one or more. As used herein, the term "plurality" means two or more, and the term "based on" should be interpreted as "at least partially based on". In addition, the terms "and / or" and "at least one of" cover any one of the listed items and all possible combinations thereof.
[0025] Some concepts and terms involved in the present disclosure will be introduced below.
[0026] Probability calculation is a mathematical and statistical method for dealing with uncertainty and random phenomena. In many applications, probability calculation is used for prediction and inference. In probability calculation, a probability graph is a structure composed of nodes and edges. Nodes represent random variables or states, and edges represent the strength or probability of interaction between two nodes. In addition, the weight sum of each node represents the sum of the interactions between the node and all its adjacent nodes (considering the state of the adjacent nodes). The weight sum can be used to measure the local energy of the node.
[0027] Simulated annealing is a probabilistic algorithm for global optimization problems, inspired by the annealing process in physics. The algorithm seeks the lowest energy state of the system, i.e., the optimal solution, by gradually lowering the "temperature". The "temperature" is a control parameter in simulated annealing, which determines the "chaos" level of the system. At high temperature, the system can accept worse solutions, thus escaping local optima; at low temperature, the system tends to stabilize near the global optimum. The temperature sequence represents the sequence or strategy of gradually lowering the control temperature, usually starting from high temperature and gradually cooling down. The temperature sequence includes multiple temperature parameters, each representing a specific temperature value or temperature change parameter. When performing the simulated annealing algorithm to solve the state of the nodes in the probability graph, the temperature parameters need to be taken out from the temperature sequence from high to low, and the state of all nodes is solved one or more times based on each taken temperature parameter. Finally, after all the iterations of all temperature parameters are completed, the optimal solution of the probability graph is obtained.
[0028] In related technologies, existing hardware implementations of combinatorial optimization problems face severe challenges, especially the interconnection problem in hardware implementation of probability calculation (e.g., Ising model). Due to the need for massive physical links in fully connected topology, traditional circuit wiring technology is difficult to provide sufficient interconnection resources, limiting the scale and performance of the system. Although emerging solutions such as optical chips may provide high-density interconnection, they are costly and not mature enough to meet the needs of practical applications.
[0029] To solve the above problems, the present disclosure sets a storage unit on the probability calculation acceleration card, which is specifically used to store the weight sum of each node in the probability graph, and directly receives the initial weight sum of each node from the host computer. Then, after updating the state of the target node, the weight sum of the neighbor nodes of the target node is updated using simple full addition or full subtraction calculation, so that there is no need to recalculate the weight sum every time the node state is determined, and there is no need to reserve connections for each edge in the probability graph, reducing the complexity of hardware connection implementation, and enabling efficient solution of large-scale probability graphs with high connectivity.
[0030] The exemplary embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0031] According to one aspect of the present disclosure, a probability calculation acceleration card is provided. FIG. 1 shows a structural block diagram of a probability calculation acceleration card according to an exemplary embodiment of the present disclosure. Referring to FIG. 1, the probability calculation acceleration card 100 includes: an interface 102 configured to receive initial states and initial weight sums of a plurality of nodes in a probability graph and edge weights between the plurality of nodes from a host computer 104, and return final states of the plurality of nodes to the host computer, wherein the initial weight sum of each node in the plurality of nodes represents an accumulated result of edge weights between the node and its adjacent nodes based on initial states of the adjacent nodes; a first storage unit 106 configured to store the edge weights between the plurality of nodes; a second storage unit 108 configured to store weight sums of the plurality of nodes respectively; a state updating unit 110 configured to determine whether to update a state of a target node in the plurality of nodes based on a target temperature parameter and the weight sum of the target node; a first storage control unit 112 configured to, in response to a determination to update the state of the target node, fetch edge weights between the target node and adjacent nodes from the first storage unit; an intermediate processing unit 114 configured to process the edge weights fetched by the first storage control unit to obtain an intermediate result, wherein the intermediate result represents a change amount of the weight sums of the adjacent nodes of the target node before and after the state of the target node is updated; and a weight sum updating unit 116 configured to, after performing a full addition or full subtraction calculation on the weight sums of the adjacent nodes of the target node received from the second storage unit and the intermediate result received from the first storage control unit, write a new weight sum back to the second storage unit.
[0032] Thus, by providing a storage unit on the probability calculation acceleration card that is specifically used to store weight sums of the plurality of nodes in the probability graph, and directly receiving initial weight sums of the plurality of nodes from the host computer, and further updating the weight sums of the adjacent nodes of the target node after updating the state of the target node using a simple full addition or full subtraction calculation, it is not necessary to recalculate the weight sums each time it is determined whether to update the state of a node, and thus it is not necessary to reserve a connection for each edge in the probability graph, which reduces the complexity of hardware connection implementation and enables efficient solution of a large-scale probability graph with high connectivity.
[0033] More specifically, when it is determined whether to update the state of a target node in the plurality of nodes, the target temperature parameter and the weight sum of the target node need to be used for the determination. Generally, if the weight sum of the target node is needed, the edge weights between the target node and its adjacent nodes need to be summed based on the states of the adjacent nodes. In some embodiments, the above process can be implemented by reserving a dedicated line (e.g., a hardware wiring or a direct physical connection of photons, optics, optoelectronics, superconducting quantum, other electrical devices, etc.) for each edge in the probability graph, but this way increases the complexity of hardware connection implementation, especially for a large-scale probability graph with high connectivity.
[0034] In the probability calculation acceleration card and the probability calculation method provided in the present disclosure, a second storage unit for storing the weight sum of each node is arranged in the probability calculation acceleration card, and a unit for updating the weight sum of each node is arranged. After the state of a target node (hereinafter referred to as node A) is updated, the weight sum of a neighboring node (hereinafter referred to as node B) of the target node will change due to the state change of node A, and the change amount of the weight sum is related to both the state change of node A and the edge weight between node A and node B. Therefore, after determining to update the state of node A, the first storage control unit can be instructed to take out the edge weight between node A and node B from the first storage unit (for storing the weight of a plurality of edges), and then the intermediate processing unit can be instructed to process the edge weight to obtain an intermediate result, which represents the change amount of the weight sum. Further, the weight sum updating unit can be instructed to perform a simple full addition or full subtraction calculation, and write the obtained new weight sum of node B back to the second storage unit. The new weight sum of node B can be used when determining whether to update the state of node B subsequently, or can be further updated after updating the states of other neighboring nodes of node B.
[0035] In addition, when the target node has a plurality of neighboring nodes, the weight sum of each neighboring node can be updated in turn. In this way, time division multiplexing of the circuit can be achieved. This time division multiplexing mechanism greatly reduces the complexity of hardware connection implementation, so that the Ising machine structure with high connectivity can be implemented under limited hardware connection resources.
[0036] Compared with the traditional space multiplexing and optical interconnection scheme, the time division multiplexing scheme of the present disclosure has significant advantages. First, by sharing the transmission path, time division multiplexing can support a much higher logical connectivity than the physical connectivity of the circuit without increasing the hardware area. This expands the scale of the Ising machine that can be accommodated on a single chip, breaking through the bottleneck of the prior art. Second, since the data of different links are transmitted at different times, the crosstalk and competition between links are greatly reduced. This improves the working frequency of the system and reduces energy consumption. In addition, the ordered transmission of time division multiplexing is conducive to data caching and multiplexing, reducing unnecessary repeated access and further improving performance and efficiency.
[0037] According to some embodiments, the probability calculation acceleration card and the probability calculation acceleration method provided by the present disclosure can be used to solve a complete graph. That is, multiple nodes in the probability graph can have a full connection relationship. According to the universal approximation theorem, a sufficiently large fully connected network can approximate any continuous function. Non-sparse fully connected neural networks can learn more complex functions and patterns, thereby better fitting high-dimensional data and having better performance in image recognition, natural language processing and other tasks. However, the large number of weights brought by full connection also limits the further expansion of the network size. In the solution of the probability graph, more fully connected nodes bring higher accuracy for the solution of more complex problems.
[0038] The probability calculation acceleration card provided by the present disclosure is used to perform probability calculation on a probability graph received from a host computer. More specifically, the probability calculation acceleration card receives the initial state and initial weight and of each of the multiple nodes in the probability graph and the edge weight between the multiple nodes (in some embodiments, the temperature sequence and / or the number of times of loop solution also need to be received) from the host computer, and returns the solution result (the final state of the multiple nodes) of the probability graph to the host computer. It should be noted that the host computer 104 in FIG. 1 is not a component or sub-module of the probability calculation acceleration card 100.
[0039] The probability calculation acceleration card proposed by the present disclosure can be implemented as an application-specific integrated circuit (ASIC) core or a field programmable gate array (FPGA). These methods provide flexible and high-performance hardware acceleration solutions to meet the needs of different application scenarios.
[0040] The various parts of the probability calculation acceleration card will be described in detail below.
[0041] In some embodiments, the interface 102 can adopt a PCIe (Peripheral Component Interconnect Express) interface. PCIe is a high-speed computer expansion bus standard widely used in various computer systems to connect mainboards and various peripheral devices such as graphics cards, network cards and storage devices. The PCIe interface supports high-bandwidth and low-latency data transmission, and its architecture is based on a point-to-point communication protocol, with each connected device having an independent signal channel. This design can effectively avoid bus conflicts and data transmission bottlenecks, making PCIe very suitable for application scenarios that require high-speed data transmission.
[0042] In addition to the PCIe interface, the probability calculation acceleration card provided by the present disclosure can also use other interfaces to communicate with the host computer, which is not limited here.
[0043] In some embodiments, the first storage unit can employ a system memory. When processing large-scale graphs with high connectivity, especially probabilistic graphs with a full connection topology, the data volume of edge weights between multiple nodes is large, and the usage rate is relatively low (only after determining the updated target node state, the edge weights between the target node and adjacent nodes need to be taken out). Therefore, it can be stored in the system memory with relatively high access delay but large capacity.
[0044] In an exemplary embodiment, the first storage unit can employ a DDR3 SDRAM. DDR3 SDRAM (Double-Data-Rate Three Synchronous Dynamic Random Access Memory) is the third generation product of DDR SDRAM, and has higher running performance and lower voltage compared with DDR2. DDR SDRAM is developed and improved on the basis of SDRAM technology, and the biggest feature of DDR SDRAM compared with SDRAM is double-edge triggering, that is, data collection and transmission can be performed at the rising edge and falling edge of the clock, and the read-write speed of DDR SDRAM can be twice as fast as that of traditional SDRAM with the same working clock.
[0045] Correspondingly, the first storage control unit 112 can be a DDR3 controller. In some embodiments, the first storage control unit can also be configured to store the edge weights between multiple nodes received via the interface into the first storage unit. In this way, the DDR3 controller can store all weight data into the first storage unit when the host computer provides the edge weights, and take out the corresponding edge weights when the weights need to be updated. In the timing design, the first storage control unit can add a delay to prevent starting calculation when the weight data is not taken out. In some embodiments, the DDR3 controller can be controlled by a DDR3 read-write state machine to write and read weight data to DRAM.
[0046] In some embodiments, the second storage unit can employ a cache or a register. The usage rate of the weight sum is higher than that of the edge weight, and in addition to taking out the old weight sum and writing the new weight sum when updating the weight sum of the node, the weight sum of the target node also needs to be taken out when determining whether to update the state of the target node. In addition, the space complexity of the weight sum of each of the multiple nodes is O(N), where N is the number of nodes in the probabilistic graph, and the space complexity of the edge weight between the multiple nodes in the full connection is O(N 2 ), in other words, the data volume of the weight sum of each of the multiple nodes is significantly less than that of the edge weight between the multiple nodes. Therefore, the weight sum of each of the multiple nodes can be stored in the cache or register with lower access delay but smaller capacity.
[0047] The target node represents a node that currently needs to be solved, and the target temperature parameter represents a temperature parameter used in a solving process (e.g., simulated annealing). The target node can be determined in any manner among multiple nodes, and the target temperature parameter can be determined in advance, received from a host computer via an interface, or calculated by a corresponding module in the probabilistic computing acceleration card, which are not limited herein.
[0048] In some embodiments, for the target node that currently needs to be solved, the state updating unit can calculate an energy difference before and after the state update of the target node based on the target temperature parameter and the weight sum of the target node, and determine whether the state of the target node needs to be updated based on the energy difference.
[0049] Considering that the calculation of the energy difference is of high complexity, the present disclosure provides a simplified implementation. According to some embodiments, the state updating unit can be configured to: map the product of the weight sum of the target node and the target temperature parameter to a state update probability; and determine whether to update the state of the target node based on the comparison result of the state update probability and a random number.
[0050] In this way, by calculating the product of the weight sum of the target node and the target temperature parameter, and mapping the product to a probability value (i.e., the state update probability), and then comparing the probability value with a random number, and determining whether to update the state of the target node according to the comparison result, the calculation process is simplified, and the state update can be implemented with a simpler hardware structure. In addition, the above-mentioned probabilistic decision method can realize efficient state update judgment.
[0051] In some embodiments, the product of the weight sum of the target node and the target temperature parameter can be processed by using tanh, sigmoid or other activation functions to map it to the state update probability. As for the hardware implementation of the mapping process (activation function), dedicated hardware circuit can be used, or piecewise linear approximation method can be used, or other methods can be used, which are not limited herein.
[0052] In some embodiments, the judgment rule and the update logic of the node state can be set in advance for different states of the target node and possible comparison results. Exemplary embodiments will be given below.
[0053] The scheme of the present disclosure can implement the update algorithm strategies such as simulated annealing and stochastic gradient descent, so as to optimize the overall energy / target function.
[0054] FIG. 2 shows a structural block diagram of a probability calculation acceleration card according to an exemplary embodiment of the present disclosure. Referring to FIG. 2, the probability calculation acceleration card 200 includes: an interface 202 configured to receive initial states and initial weight sums of respective nodes in a probability graph and edge weights between the nodes from a host computer 204, and to return final states of the nodes to the host computer 204; a first storage unit 206; a second storage unit 208; a state updating unit 210; a first storage control unit 212; an intermediate processing unit 214; a weight sum updating unit 216; and a fourth storage unit 218 configured to store initial states of respective nodes, and to receive updated states of a target node in response to determining to update a state of the target node.
[0055] It can be understood that the operations and functions of the units 202-216 in the probability calculation acceleration card 200 can refer to the descriptions of the units 102-116 in the probability calculation acceleration card 100 above, and will not be repeated here.
[0056] In some embodiments, in response to determining to update the state of the target node, the state updating unit can send the updated state to the fourth storage unit.
[0057] In some embodiments, in response to determining to update the state of the target node, the first storage control unit can take out edge weights between the target node and adjacent nodes from the first storage unit. Further, the intermediate processing unit can process the edge weights taken out by the first storage control unit to obtain an intermediate result. The intermediate result represents a change in weight sums of adjacent nodes of the target node before and after the state of the target node is updated.
[0058] After obtaining the intermediate result, the intermediate result can be sent to the weight sum updating unit. In addition, the weight sum updating unit can receive weight sums of adjacent nodes of the target node from the second storage unit. In some embodiments, the weight sum updating unit can include a full adder / subtractor, and can be configured to determine to perform full addition or full subtraction calculation on the weight sums of the adjacent nodes of the target node and the intermediate result based on the states of the target node before and after the update. After the calculation is completed, the weight sum updating unit writes the new weight back to the second storage unit. In this way, efficient and accurate updating of weight sums of respective nodes can be achieved.
[0059] In some embodiments, if the target node includes multiple neighboring nodes, the above-mentioned update operation can be performed on the weight sum of each neighboring node in turn. In an exemplary embodiment, the target node A includes two neighboring nodes B and C, the first storage control unit can first take out the edge weight b between node A and node B. The intermediate processing unit processes the edge weight b to obtain an intermediate result Ab, and then the intermediate result Ab is sent to the weight sum update unit. In addition, the second storage unit sends the weight sum of node B to the weight sum update unit. The weight sum update unit performs full addition or full subtraction calculation on the intermediate result Ab and the weight sum of node B to obtain the new weight sum of node B, and writes the new weight sum of node B back to the second storage unit. Then, the first storage control unit takes out the edge weight c between node A and node C. The intermediate processing unit processes the edge weight c to obtain an intermediate result Ac, and then the intermediate result Ac is sent to the weight sum update unit. In addition, the second storage unit sends the weight sum of node C to the weight sum update unit. The weight sum update unit performs full addition or full subtraction calculation on the intermediate result Ac and the weight sum of node C to obtain the new weight sum of node C, and writes the new weight sum of node C back to the second storage unit.
[0060] In some embodiments, multiple full adders / subtractors can be provided in the weight sum update unit, so as to support parallel execution of the above-mentioned update operation on the weight sum of multiple neighboring nodes of the target node.
[0061] According to some embodiments, the probability calculation acceleration card 200 can further include a third storage unit 220 configured to store a temperature sequence, and a top-level controller 222 configured to instruct the state update unit to sequentially take each temperature parameter included in the temperature sequence as a target temperature parameter to solve the state of the multiple nodes for at least one round, wherein in each round of solving, the multiple nodes are sequentially determined as target nodes.
[0062] In some embodiments, the temperature sequence can be received from the host computer via the interface and stored in the third storage unit. In other embodiments, a temperature sequence generation unit can be provided in the probability calculation acceleration card, and the temperature sequence generated by the temperature sequence generation unit can be stored in the third storage unit. The temperature sequence can include multiple entries, each entry containing a temperature parameter (temperature value) and a corresponding iteration number. In some embodiments, the top-level controller can automatically index the stored temperature sequence according to the current iteration step, and send the corresponding temperature parameter to the state update unit.
[0063] After the solving of the probability graph is completed (e.g., after the entire temperature sequence calculation is completed), the final state of each of the multiple nodes can be taken out from the fourth storage unit, and the final state of each of the multiple nodes is fed back to the host computer via the interface.
[0064] The method of the present disclosure can be used to solve Ising model. According to some embodiments, the probability graph solved by the present disclosure can be based on Ising model. The state of a node can represent a spin variable, which can take a value of +1 or -1. In some embodiments, the probability graph can also be based on a multi-layer neural network, a restricted Boltzmann machine or other models, without limitation.
[0065] Compared with multi-value or continuous value states, the operation of binary states such as multiplication and addition is more simple and efficient, only simple addition and multiplication operations are needed when updating the weight sum of a node, which greatly simplifies the computational complexity, reduces the hardware implementation cost, and enables efficient solving and optimization.
[0066] According to some embodiments, the intermediate processing unit is configured to perform a shift processing on the edge weight taken out by the first storage control unit, so that the value of the intermediate result is twice the edge weight before the shift.
[0067] Shift processing (e.g., shifting the edge weight to double its value) is a very efficient operation in hardware. Compared with multiplication, shift operation usually requires less hardware resources and shorter processing time. By implementing efficient edge weight shift processing in hardware, the computational delay can be significantly reduced, the processing speed and efficiency can be improved, the hardware design can be simplified, the resource utilization can be optimized, and the power consumption can be reduced. In addition, shift processing can reduce numerical errors compared with floating point multiplication, improving the accuracy of the calculation result. These effects make this scheme have significant advantages in hardware acceleration applications that require high performance and low power consumption.
[0068] According to some embodiments, the weight and update unit is configured to: in response to determining that the state of the target node is updated from -1 to +1, perform a full add calculation; and in response to determining that the state of the target node is updated from +1 to -1, perform a full subtract calculation.
[0069] Since the initial weight sum of each node in the plurality of nodes represents the cumulative result of the edge weight between the node and its adjacent nodes based on the initial state of the adjacent nodes, when the state of the target node is updated from -1 to +1, the weight sum of the neighbor nodes of the target node is increased by twice the edge weight between the target node and the neighbor nodes, i.e., a full add calculation is performed on the intermediate result (twice the edge weight) of the weight sum of the neighbor nodes. Similarly, when the state of the target node is updated from +1 to -1, the weight sum of the neighbor nodes of the target node is reduced by twice the edge weight between the target node and the neighbor nodes, i.e., a full subtract calculation is performed on the intermediate result (twice the edge weight) of the weight sum of the neighbor nodes.
[0070] According to some embodiments, determining whether to update the state of the target node based on a comparison result of the state update probability and the random number can include flipping the state of the target node in response to determining that the state update probability is greater than the random number. The random number can be a random number between 0 and 1. The flipping can include flipping the state of the target node from -1 to +1 and flipping the state of the target node from +1 to -1.
[0071] In some embodiments, the source of the random number includes, but is not limited to, quantum random number, random of spintronic device magnetic flipping, thermal noise, linear feedback shift register algorithm, etc.
[0072] In some embodiments, the state implementation includes, but is not limited to, spintronic devices such as magnetic tunnel junction, magnetic multilayer film, spin oscillator, spin valve, magnon, nanomagnet, artificial spin ice, magnetic skyrmion, etc. In the magnetic device integration stage (for example, for MTJ array), the above-mentioned magnetic tunnel junction, magnetic multilayer film, etc. magnetic devices can be directly heterogeneously integrated (deposited) above the CMOS computing control structure, improving integration density, reducing the number of required transistors, reducing energy consumption, improving speed, and physically inherently implementing random numbers or random sampling of activation functions.
[0073] In some embodiments, the write / flipping mechanism can include, but is not limited to, SOT spin orbit torque, STT spin transfer torque, VCMA voltage-controlled magnetization flipping, etc., and the reading mechanism can include, but is not limited to, TMR tunneling magnetoresistance, GMR giant magnetoresistance, various Hall effects, etc. In addition, the activation function (such as tanh, softmax, sigmoid, etc. Linear / non-linear process) can be physically inherently implemented with the above spintronic devices and physical mechanisms.
[0074] In some embodiments, determining whether to update the state of the target node can further include preserving the current state of the target node in response to determining that the state update probability is not greater than the random number.
[0075] In some embodiments, the probability calculation acceleration card can further include a random sequence generator (not shown in the figure). The random sequence generator is configured to generate a sequence of random numbers based on a loaded set of random seeds. The random number used for comparison with the state update probability is selected from the sequence of random numbers.
[0076] According to another aspect of the present disclosure, a probability calculation acceleration method is provided. FIG. 3 shows a flowchart of the probability calculation acceleration method according to an exemplary embodiment of the present disclosure. Referring to FIG. 3, the probability calculation acceleration method 300 comprises: step S301, receiving, via the interface, initial states and initial weight sums of a plurality of nodes in a probability graph and edge weights between the plurality of nodes from the host computer, wherein the edge weights between the plurality of nodes are stored in the first storage unit, the weight sums of the plurality of nodes are stored in the second storage unit, and wherein the initial weight sum of each of the plurality of nodes represents an accumulated result of the edge weights between the node and its adjacent nodes based on the initial states of the adjacent nodes; step S302, determining, by the state update unit, whether to update a state of a target node in the plurality of nodes based on a target temperature parameter and the weight sum of the target node; step S303, in response to determining to update the state of the target node, retrieving, by the first storage control unit, the edge weights between the target node and its adjacent nodes from the first storage unit; step S304, processing, by the intermediate processing unit, the edge weights retrieved by the first storage control unit to obtain an intermediate result, wherein the intermediate result represents a change in the weight sums of the adjacent nodes of the target node before and after the state of the target node is updated; and step S305, performing, by the weight sum update unit, a full add or full subtract calculation on the weight sums of the adjacent nodes of the target node received from the second storage unit and the intermediate result received from the first storage control unit, and then writing the new weight sums back to the second storage unit.
[0077] It can be understood that the operations of steps S301-S305 in method 300 can be respectively referred to the above descriptions of the interface 102, the first storage unit 106, the second storage unit 108, the state update unit 110, the first storage control unit 112, the intermediate processing unit 114 and the weight sum update unit 116 in the probability calculation acceleration card, which will not be repeated here.
[0078] Thus, by providing a storage unit in the probability calculation acceleration card specially for storing the weight sums of the plurality of nodes in the probability graph, and directly receiving the initial weight sums of the plurality of nodes from the host computer, and then updating the weight sums of the adjacent nodes of the target node by using a simple full add or full subtract calculation after updating the state of the target node, it is not necessary to recalculate the weight sums every time it is determined whether to update the state of a node, and thus it is not necessary to reserve a line for each edge in the probability graph, which reduces the complexity of hardware connection implementation and enables efficient solution of a large-scale probability graph with high connectivity.
[0079] According to some embodiments, as shown in FIG. 4, the step S302 of determining, by the state updating unit, whether to update the state of the target node based on the target temperature parameter and the weight sum of the target node in the plurality of nodes can include: a step S401 of mapping a product of the weight sum of the target node and the target temperature parameter to a state updating probability; and a step S402 of determining whether to update the state of the target node based on a comparison result of the state updating probability and a random number.
[0080] According to some embodiments, the initial states of the plurality of nodes can be stored in the fourth storage unit. The probability calculation acceleration method 300 can further include (not shown in the figure): in response to determining to update the state of the target node, storing the updated state of the target node in the fourth storage unit.
[0081] According to some embodiments, the temperature sequence can be stored in the third storage unit. The probability calculation acceleration method 300 can further include (not shown in the figure): instructing, by the top-level controller, the state updating unit to sequentially take each temperature parameter included in the temperature sequence as the target temperature parameter to solve the states of the plurality of nodes for at least one round, wherein in each round of solving, the plurality of nodes are sequentially determined as the target node.
[0082] According to some embodiments, the probability graph can be based on the Ising model, and the state of the node can represent a spin variable, taking a value of +1 or -1.
[0083] According to some embodiments, the step S305 of writing, by the weight sum updating unit, the new weight sum back to the second storage unit after performing the full add or full subtract calculation on the weight sum of the adjacent node of the target node received from the second storage unit and the intermediate result received from the first storage control unit can include: in response to determining that the state of the target node is updated from -1 to +1, performing the full add calculation; and in response to determining that the state of the target node is updated from +1 to -1, performing the full subtract calculation.
[0084] According to some embodiments, the step S402 of determining whether to update the state of the target node based on the comparison result of the state updating probability and the random number includes: in response to determining that the state updating probability is greater than the random number, flipping the state of the target node.
[0085] According to another aspect of the present disclosure, there is provided a probability calculation acceleration apparatus. As shown in FIG. 5, the apparatus 500 comprises: a receiving unit 510 configured to receive, from a host via an interface, initial states and initial weight sums of a plurality of nodes in a probability graph and edge weights between the plurality of nodes, wherein the edge weights between the plurality of nodes are stored in a first storage unit, the weight sums of the plurality of nodes are stored in a second storage unit, and wherein the initial weight sum of each of the plurality of nodes represents an accumulated result of the edge weights between the node and its adjacent nodes based on the initial states of the adjacent nodes; a state updating unit 520 configured to determine, by the state updating unit, whether to update a state of a target node in the plurality of nodes based on a target temperature parameter and the weight sum of the target node; a first storage control unit 530 configured to, in response to a determination that the state of the target node is to be updated, retrieve the edge weights between the target node and its adjacent nodes from the first storage unit; an intermediate processing unit 540 configured to process the edge weights retrieved by the first storage control unit to obtain an intermediate result, wherein the intermediate result represents a change in the weight sums of the adjacent nodes of the target node before and after the state of the target node is updated; and a weight sum updating unit 550 configured to, after performing a full add or full subtract calculation on the weight sums of the adjacent nodes of the target node received from the second storage unit and the intermediate result received from the first storage control unit, write a new weight sum back to the second storage unit.
[0086] It can be understood that the operations of the units 510-550 in the apparatus 500 can refer to the descriptions of the steps S301-S305 of the probability calculation acceleration method 300 above, and will not be repeated here.
[0087] According to another aspect of the present disclosure, there is provided a computer device comprising the probability calculation acceleration card 100 or 200 described above.
[0088] According to another aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program. The computer program, when executed by a processor, causes the processor to perform the probability calculation acceleration method 300 described above.
[0089] According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, causes the processor to perform the probability calculation acceleration method 300 described above.
[0090] In the following, illustrative examples of such computer devices, computer readable storage media and computer program products are described in connection with FIG. 6.
[0091] FIG. 6 shows an example configuration of a computer device 600 that can be used to implement the methods described herein.
[0092] The computer device 600 can be various different types of devices. Examples of computer device 600 include, but are not limited to: a desktop computer, a server computer, a notebook or netbook computer, a mobile device (e.g., a tablet computer, a cellular or other wireless phone (e.g., a smart phone), a notepad computer, a mobile station), a wearable device (e.g., glasses, a watch), an entertainment device (e.g., an entertainment appliance, a set-top box, a game console), a television or other display device, an automobile computer, and so forth.
[0093] The computer device 600 can include at least one processor 602, memory 604, communication interface(s) 606, a display device 608, other input / output (I / O) devices 610, and one or more mass storage devices 612, which can communicate with one another by way of a system bus 614 or other appropriate communication link.
[0094] The processor 602 can be a single processing unit or a plurality of processing units, all of which can include single or multiple computing cores or processing elements. The processor 602 can be implemented as one or more microprocessors, microcomputers, microcontrollers, digital signal processors, central processing units, state machines, logic circuitries, and / or any devices that manipulate signals in accordance with operational instructions. Among other capabilities, the processor 602 can be configured to fetch and execute computer-readable instructions stored in the memory 604, the mass storage device 612, or any other computer-readable medium, such as program code for an operating system 616, program code for applications 618, program code for other programs 620, and the like.
[0095] The memory 604 and the mass storage device 612 are examples of computer-readable storage media for storing instructions which are executed by the processor 602 to implement the various functionalities described above. For example, the memory 604 can generally include both volatile memory and nonvolatile memory (e.g., RAM, ROM, etc.). Further, the mass storage device 612 can generally include hard disk drives, solid state drives, removable media, including external and removable drives, memory cards, flash memory, floppy disks, optical disks (e.g., CD or DVD), storage arrays, network attached storage, storage area networks, and the like. Both the memory 604 and the mass storage device 612 can be collectively referred to herein as the memory or computer-readable storage medium, and can be non-transitory media capable of storing computer-readable, processor-executable program instructions as computer program code that can be executed by the processor 602 as a particular machine configured to implement the operations and functionalities described in the examples herein.
[0096] A number of programs can be stored on the mass storage device 612. These programs include an operating system 616, one or more application programs 618, other programs 620, and program data 622, and they can be loaded into the memory 604 for execution.
[0097] While illustrated in FIG. 6 as being stored in the memory 604 of the computer device 600, modules 616, 618, 620, and 622, or portions thereof, can be implemented using any form of computer-readable media that is accessible by the computer device 600. As used herein, "computer-readable media" includes both computer-readable storage media and communication media.
[0098] Computer-readable storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer-readable storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information for access by a computer device. In contrast, communication media can embody computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave, or other transport mechanism. As defined herein, computer readable storage media does not include communication media.
[0099] One or more communication interfaces 606 are used to exchange data with other devices, such as over a network, direct connection, or the like. Such communication interfaces can be one or more of: any type of network interface (e.g., network interface card (NIC)), wired or wireless (such as IEEE 802.6 wireless LAN (WLAN)) interface, Worldwide Interoperability Microwave Access (Wi-MAX) interface, Ethernet interface, Universal Serial Bus (USB) interface, cellular network interface, Bluetooth™ interface, near field communication (NFC) interface, or the like. The communication interfaces 606 can facilitate communications within a variety of network and protocol types, including wired networks (e.g., LAN, cable, etc.) and wireless networks (e.g., WLAN, cellular, satellite, etc.), the Internet, and the like. The communication interfaces 606 can also provide communication with external storage devices (not shown), such as storage arrays, network attached storage, storage area networks, and the like.
[0100] In some examples, a display device 608, such as a monitor, can be included for displaying information and images to a user. Other I / O devices 610 can be devices that receive various inputs from a user and provide various outputs to the user, and can include touch input devices, gesture input devices, cameras, keyboards, remote controls, mice, printers, audio input / output devices, and the like.
[0101] The technology described herein can be supported by various configurations of the computer device 600, and is not limited to the specific examples that are described herein. For example, the functionality can also be implemented in one or more of the following technologies: cloud computing environments; distributed computing environments; parallel computing environments; grid computing environments; and / or other configurations. Cloud computing environments can include, among others, a platform for delivering resources over the Internet. The platform abstracts underlying functionality of hardware (e.g., servers) and software resources of the cloud. Resources can include applications and / or data that can be utilized while computing processes are executed on servers that are remote from the computer device 600. Resources can also include services provided over the Internet and / or a subscriber network, such as a cellular or Wi-Fi network. The platform can abstract resources and functionality to connect the computer device 600 with other computer devices. Accordingly, the functionality described herein can be distributed throughout the cloud. For example, the functionality can be implemented in part on the computer device 600 and in part by the platform that abstracts the functionality of the cloud.
[0102] It should be understood that various forms of flow shown above can be used, with steps reordered, added, or removed. For example, the steps recited in the present disclosure can be performed in parallel, in series, or in a different order, without limitation herein, so long as the desired results of the technology disclosed in the present disclosure are achieved.
[0103] While embodiments or examples of the present disclosure have been described with reference to the figures, it is understood that the methods, systems, and devices described above are merely exemplary embodiments or examples and that the scope of the present disclosure is not limited to these embodiments or examples. Various elements of the embodiments or examples can be omitted or replaced by equivalents thereof. Furthermore, the steps can be performed in a different order than described in the present disclosure. Further, various elements of the embodiments or examples can be combined in various ways. It is important that many of the elements described herein can be substituted by equivalents which are presented after the present disclosure.
Claims
1. A probabilistic computing accelerator card, comprising: an interface configured to receive, from a host computer, initial states and initial weight sums of a plurality of nodes in a probabilistic graph and edge weights between the plurality of nodes, and to return, to the host computer, final states of the plurality of nodes, wherein an initial weight sum of each node in the plurality of nodes represents an accumulated result of edge weights between the node and its neighboring nodes based on initial states of the neighboring nodes; a first storage unit configured to store the edge weights between the plurality of nodes; a second storage unit configured to store the weight sums of the plurality of nodes respectively; a state updating unit configured to determine whether to update a state of a target node in the plurality of nodes based on a target temperature parameter and the weight sum of the target node; a first storage control unit configured to, in response to a determination to update the state of the target node, fetch, from the first storage unit, edge weights between the target node and neighboring nodes of the target node; an intermediate processing unit configured to process the edge weights fetched by the first storage control unit to obtain an intermediate result, wherein the intermediate result represents a change in the weight sum of the neighboring nodes of the target node before and after the state of the target node is updated; and a weight sum updating unit configured to, after performing a full add or full subtract calculation on the weight sum of the neighboring nodes of the target node received from the second storage unit and the intermediate result received from the first storage control unit, write a new weight sum back to the second storage unit.
2. The probabilistic computing accelerator card of claim 1, wherein, The plurality of nodes have a fully connected relationship, and the states of the nodes represent spin variables with values of +1 or -1.
3. The probabilistic compute accelerator card of claim 2, wherein, The intermediate processing unit is configured to perform a shift operation on the edge weights fetched by the first storage control unit, so that a value of the intermediate result is twice the edge weights before the shift operation.
4. The probabilistic compute accelerator card of claim 2, wherein, The weight sum updating unit is configured to: perform a full add calculation in response to a determination that the state of the target node is updated from -1 to +1; and perform a full subtract calculation in response to a determination that the state of the target node is updated from +1 to -1.
5. The probabilistic compute accelerator card of claim 2, wherein, The state updating unit is configured to: map a product of the weight sum of the target node and the target temperature parameter to a state update probability; and determine whether to update the state of the target node based on a comparison result of the state update probability and a random number.
6. The probabilistic compute accelerator card of claim 5, wherein, Determining whether to update the state of the target node based on the comparison result of the state update probability and the random number comprises: in response to a determination that the state update probability is greater than the random number, flipping the state of the target node.
7. The probabilistic computing accelerator card of any one of claims 1-6, further comprising: a third storage unit configured to store a temperature sequence; and a top-level controller configured to instruct the state updating unit to sequentially use each temperature parameter included in the temperature sequence as the target temperature parameter to solve the states of the plurality of nodes for at least one round, wherein in each round, the plurality of nodes are sequentially determined as the target node.
8. The probabilistic computing accelerator card of any one of claims 1-6, further comprising: a fourth storage unit configured to store initial states of the plurality of nodes respectively, and in response to determining to update a state of a target node, receive an updated state of the target node.
9. A method for accelerating probability calculation, comprising: receiving, via an interface, initial states and initial weight sums of a plurality of nodes in a probability graph and edge weights between the plurality of nodes from a host computer, wherein the edge weights between the plurality of nodes are stored in a first storage unit, the weight sums of the plurality of nodes respectively are stored in a second storage unit, and wherein the initial weight sum of each of the plurality of nodes represents an accumulated result of edge weights between the node and its neighboring nodes based on initial states of the neighboring nodes; determining, by a state update unit, whether to update a state of a target node in the plurality of nodes based on a target temperature parameter and the weight sum of the target node; in response to determining to update the state of the target node, retrieving, by a first storage control unit, the edge weights between the target node and its neighboring nodes from the first storage unit; processing, by an intermediate processing unit, the edge weights retrieved by the first storage control unit to obtain an intermediate result, wherein the intermediate result represents a change in the weight sum of the neighboring nodes of the target node before and after the state update of the target node; and writing, by a weight sum update unit, a new weight sum back to the second storage unit after performing a full add or full subtract calculation on the weight sum of the neighboring nodes of the target node received from the second storage unit and the intermediate result received from the first storage control unit.
10. The method of claim 9, wherein, the state of the node represents a spin variable, taking a value of +1 or -1.
11. The method of claim 10, wherein, processing, by the intermediate processing unit, the edge weights retrieved by the first storage control unit comprises: performing a shift operation on the edge weights retrieved by the first storage control unit, so that a value of the intermediate result is twice the edge weights before the shift operation.
12. The method of claim 10, wherein, writing, by the weight sum update unit, the new weight sum back to the second storage unit after performing the full add or full subtract calculation on the weight sum of the neighboring nodes of the target node received from the second storage unit and the intermediate result received from the first storage control unit comprises: in response to determining that the state of the target node is updated from -1 to +1, performing a full add calculation; and in response to determining that the state of the target node is updated from +1 to -1, performing a full subtract calculation.
13. The method of claim 10, wherein, determining, by the state update unit, whether to update the state of the target node based on the target temperature parameter and the weight sum of the target node comprises: mapping a product of the weight sum of the target node and the target temperature parameter to a state update probability; and determining whether to update the state of the target node based on a comparison result of the state update probability and a random number.
14. The method of claim 13, wherein, determining whether to update the state of the target node based on the comparison result of the state update probability and the random number comprises: in response to determining that the state update probability is greater than the random number, flipping the state of the target node.
15. The method of any one of claims 9-14, wherein, the third storage unit stores a temperature sequence, and the method further comprises: The state updating unit is instructed by the top controller to sequentially take each temperature parameter included in the temperature sequence as a target temperature parameter to solve the states of the plurality of nodes for at least one round, wherein in each round, the plurality of nodes are sequentially determined as target nodes.
16. The method of any one of claims 9-14, wherein, The initial states of the plurality of nodes are stored in a fourth storage unit, and the method further comprises: In response to determining to update the state of the target node, storing the updated state of the target node in the fourth storage unit.
17. A probabilistic computation acceleration device, comprising: a receiving unit configured to receive, from a host computer via an interface, initial states and initial weight sums of a plurality of nodes in a probabilistic graph and edge weights between the plurality of nodes, wherein the edge weights between the plurality of nodes are stored in a first storage unit, the weight sums of the plurality of nodes are stored in a second storage unit, and wherein the initial weight sum of each node in the plurality of nodes represents an accumulated result of edge weights between the node and its neighboring nodes based on the initial states of the neighboring nodes; a state updating unit configured to determine, by the state updating unit, whether to update a state of a target node in the plurality of nodes based on a target temperature parameter and the weight sum of the target node; a first storage control unit configured to, in response to determining to update the state of the target node, retrieve the edge weights between the target node and its neighboring nodes from the first storage unit; an intermediate processing unit configured to process the edge weights retrieved by the first storage control unit to obtain an intermediate result, wherein the intermediate result represents a change in the weight sums of the neighboring nodes of the target node before and after the state update of the target node; and a weight sum updating unit configured to, after performing a full add or full subtract calculation on the weight sums of the neighboring nodes of the target node received from the second storage unit and the intermediate result received from the first storage control unit, write a new weight sum back to the second storage unit.
18. A computer device, comprising: the probabilistic computation acceleration card according to any one of claims 1-8.
19. A computer readable storage medium having stored thereon a computer program, which, when executed by a processor, causes the processor to perform the method according to any one of claims 9-16.
20. A computer program product, comprising a computer program which, when executed by a processor, causes the processor to perform the method according to any one of claims 9-16.
Citation Information
Patent Citations
Network situation awareness method and device based on massive alarm information
CN117978480A
Probability calculation acceleration card, probability calculation acceleration method and device and medium
CN118964284A
Graph inference calculator
WO2017039595A1