Inference acceleration circuit, system and chip for large model action block continuous output
By designing an action block continuous output inference acceleration circuit for large models and using a predictive scheduling controller to determine the low water level threshold, the problem of mismatch between action block generation and execution is solved, realizing continuous periodic output of action blocks and efficient resource utilization.
Patent Information
- Application Number
- CN202611433078.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-16
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2046-09-16
AI Technical Summary
In existing technologies, the action block generation methods for multimodal large models have problems such as action output delay and mismatch between action block generation and execution. Especially in edge deployment scenarios, the mismatch between action block generation and execution timing leads to delay and resource waste.
An inference acceleration circuit for continuous output of action blocks in large models is designed, including a backbone inference module, an action block generation module, a prediction scheduling controller, and an action buffer module. The prediction scheduling controller determines the low water level threshold to realize the delay prediction triggering and boundary switching of action blocks, ensuring the continuous periodic output of action blocks.
It reduces action block boundary waiting, avoids action blocks being interrupted prematurely, improves the continuity of action output and resource utilization efficiency, adapts to different model structures and hardware resource conditions, and reduces the time interval between action generation and execution.
Smart Images

Figure CN122947835B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of circuit and system technology, and more specifically, relates to an inference acceleration circuit, system and chip for continuous output of large model action blocks. Background Technology
[0002] In recent years, multimodal large-scale models have gradually expanded from tasks such as text generation, image understanding, and semantic question answering to robot action decision-making and execution tasks, forming action-output-oriented multimodal large-scale models such as Vision-Language-Action (VLA) models and embodied intelligence models. Unlike text generation tasks, robot action output is usually not a single discrete token, but a continuous amount of action containing multiple control dimensions. In existing models, one approach is to discretize continuous actions into action tokens and use the autoregressive decoding process of large language models to generate action results token by token; however, a multidimensional action often needs to be represented by multiple action tokens, and after output, it still needs to undergo dequantization, denormalization, format conversion, and range constraints to form an executable action. The token-by-token serial generation method is prone to increasing action output latency and affecting the continuous control response at the edge.
[0003] To reduce the latency caused by generating action-per-action lemmas or action steps, some action-output-oriented multimodal large models adopt an action block output method, that is, generating an action sequence containing multiple future action steps at once. An action block can typically be represented as a sequence containing... Each future action step has a future action step, and each action step has Each action dimension Structure. However, existing action block generation methods are mostly designed from the perspective of model training or control strategies, and usually rely on GPUs or general inference frameworks for implementation. Existing large model inference acceleration circuits are also mainly geared towards text generation tasks, lacking dedicated circuits for the action block output stage that can generate in parallel and output periodically.
[0004] Furthermore, in existing action block generation methods, there is a timing mismatch between action block generation and action execution. Action blocks are typically generated all at once in a burst, while downstream action execution modules often read action steps gradually according to a fixed control cycle. Without an on-chip buffer and scheduling mechanism for action blocks, when the current action block is nearing completion and the next action block is not yet ready, action output waiting or buffer gaps can easily occur. Switching the buffer too early may cause the current action block to be interrupted before it is fully output. Further, even with on-chip action buffering, if the trigger time for the generation of the next action block is determined solely by a fixed empirical threshold or a simple water level signal, it is difficult to adapt to different action block lengths, action control cycles, and action block preparation delays. If the trigger is too late, the next action block may not be ready before the current action block finishes reading, resulting in action block boundary waiting or action slot gaps; if the trigger is too early, the next action block and its target buffer bank will reside prematurely for an extended period. Especially in edge deployment scenarios where on-chip storage and computing resources are constrained, the aforementioned premature residency will prolong the time when limited on-chip resources are occupied in advance. At the same time, if the next action block is generated prematurely without conditions, the action to be executed may reside prematurely in the buffer; when action generation depends on real-time scene information or robot state, it may also increase the time interval between the basis for action generation and the actual execution time, resulting in the risk of outdated action information. Summary of the Invention
[0005] In view of the above-mentioned defects or improvement needs of the prior art, the present invention provides an inference acceleration circuit, system and chip for continuous output of large model action blocks. The purpose is to provide a dedicated inference acceleration circuit that can convert the burst output of action blocks of multimodal large models into a continuous periodic action flow, while avoiding the next action block and the target buffer storage from entering the resident state unconditionally and prematurely.
[0006] To achieve the above objectives, in a first aspect, the present invention provides an inference acceleration circuit for continuous output of action blocks in large models, comprising: a backbone inference module, an action block generation module, a prediction scheduling controller, an action output module, and an action buffer module including multiple memory banks. The main inference module is used in the current work round. At that time, directly receive the round. Input information below And generate the corresponding action generation state vector. ;exist When the predictive scheduling controller receives the first... After receiving the trigger signal input in each working cycle, the receiving cycle... Input information below And generate the corresponding action generation state vector. ; The action block generation module is used in rounds Below, according to Generate an action block containing H future action steps. And cache it in an idle memory location; H is a positive integer; The action dimension for each future action step; different memory blocks store different action blocks; Predictive scheduling controller is used when At that time, the main inference module begins to receive input information. To the corresponding action block The time required for the full cache to be in the corresponding memory This allows for the determination of low water level thresholds. ;in, ; The action execution cycle; To pre-set a safety margin; It is a rounding function; The predictive scheduling controller is also used to monitor the state of each memory bank in real time throughout the operation of the inference acceleration circuit. For any memory bank b, when memory bank b is empty, its state is set to idle state; when it completes the caching of a complete action block, it is set to ready state; and when the actions in it begin to be retrieved, it is set to read state. Predictive scheduling controllers are also used in rounds Below, when storing action blocks The memory is in a read state, and the remaining action blocks within it have been detected for the first time. The number of time steps is less than or equal to the low water level threshold. At that time, a trigger signal is sent to the main inference module; The predictive scheduling controller is also used to continuously control the action output module to retrieve actions from the memory according to the order in which the memory enters the ready state throughout the entire operation of the inference acceleration circuit, and to ensure that all actions under a future action step are retrieved in one action execution cycle.
[0007] More preferably, the predictive scheduling controller is also used to re-record the start time of input information received by the backbone inference module in the current working cycle when the operating conditions of the inference acceleration circuit change. To the corresponding action block The time required for the complete cache to reside in the corresponding memory, thereby redetermining the low watermark threshold. .
[0008] More preferably, the action buffer module further includes: a write selector and a read selector; the input of the write selector is connected to the output of the action block generation module; the output of the read selector is connected to the input of the action output module. The predictive scheduling controller is also used to set any memory bank b to a write state when it begins a caching action while monitoring the status of each memory bank in real time. Predictive scheduling controllers are also used in rounds Next, generate action blocks in the action block generation module. Previously, the output of the control write selector was used to buffer action blocks. The memory bank is connected to the memory bank, and when the memory bank is in a write state, the output of the write selector is continuously connected to the memory bank; The predictive scheduling controller is also used to control the input of the read selector to be connected to the memory bank before the action output module retrieves an action from any memory bank during the entire operation of the inference acceleration circuit, and to keep the input of the read selector connected to the memory bank while the memory bank is in the reading state.
[0009] More preferably, the above-mentioned action block generation module includes: an action generation state cache unit, a grouping unit, a calculation unit, an action head weight storage unit, and an accumulation unit; The action generation state caching unit is used to cache the action generation state vectors generated by the main inference module. ; Grouping units are used to generate state vectors from actions. Divide into P groups to obtain P state sub-vectors. And send them sequentially to the computing unit; ; The action head weight storage unit is used to store... The first state data corresponding to each state data The next step and the first Weight data for the first action dimension, and the weight data for the second action dimension. The next step and the first Bias data under each action dimension ; ; ; The computing unit includes an array of processing units; the array of processing units includes H rows and D columns of processing units; the processing unit is a multiply-accumulate unit; the computing unit is used to process the received data... p State subvectors Then, the state sub-vector corresponding to that state is retrieved from the action head weight storage unit. The next step and the first Weight vector under each action dimension Then calculate the first p The result of the multiplication and accumulation operation of the H rows and D columns corresponding to the group is output to the accumulation unit; where, ; include The first state data corresponding to each state data The next step and the first Weight data under each action dimension; p The group corresponding to the first row and number The result of the column multiplication and summation operation is The accumulation unit is used to add the corresponding number of elements in each group. Line 1 After summing the results of the multiplication and accumulation operations under the column, the sum is obtained from the action head weight storage unit. The next step and the first Bias data under each action dimension Add them together to get the action block. The Middle The next step and the first Actions within each action dimension, thus obtaining action blocks. .
[0010] More preferably, the computing unit is used to... The input is sent to each processing unit, Enter to the number Line 1 In the processing unit of the column, the multiplication and accumulation operations of the corresponding state sub-vector and weight vector are performed in parallel in each processing unit to obtain the first... p The result of the multiplication and accumulation operation of the H row and D column corresponding to the group is output to the accumulation unit.
[0011] More preferably, the above-mentioned action block generation module further includes an action post-processing unit, used for processing the action block. Post-processing is performed; post-processing includes one or more of the following: scaling, limiting, denormalization, and format conversion.
[0012] More preferably, This is the floor function.
[0013] More preferably, the backbone inference module is a Transformer accelerator.
[0014] In a second aspect, the present invention provides a robot motion control system, comprising: the inference acceleration circuit provided in the first aspect of the present invention.
[0015] Thirdly, the present invention provides an electronic chip including the inference acceleration circuit provided in the first aspect of the present invention.
[0016] In summary, the above-described technical solutions conceived in this invention can achieve the following beneficial effects: 1. This invention provides an inference acceleration circuit for continuous output of action blocks in large models. It establishes a delay prediction triggering and boundary switching mechanism. The predictive scheduling controller determines a low-water threshold based on the next action block preparation time and action control cycle, plans the preparation of the next action block, and switches to read the memory bank when the current block is completed and the target memory bank is ready. This reduces action block boundary waiting and prevents the current action block from being prematurely interrupted. Simultaneously, this invention separates action block writing and action step reading through at least two memory banks, ensuring that the action block burst generation process does not directly block downstream action step reading according to the control cycle, improving the continuity of action output. Based on this, this invention can transform the burst output of action blocks in multimodal large models into a continuous periodic action flow, while preventing the next action block and the target buffer memory bank from unconditionally entering a resident state prematurely.
[0017] 2. Furthermore, the inference acceleration circuit provided by this invention can parameterize the action block length, action dimension, action control cycle, and computational parallelism scale according to the target model and the edge hardware platform, and determine and update the low-water threshold based on the action block preparation time and operating conditions. Therefore, this invention can adapt to different model structures, action output formats, control frequencies, and hardware resource conditions, further improving the accuracy of trigger signal transmission timing and reducing late or unconditionally early triggering caused by fixed empirical thresholds in different deployment environments.
[0018] 3. Further, in the inference acceleration circuit provided by the present invention, there are an action generation state cache unit, a grouping unit, a calculation unit, an action head weight storage unit, and an accumulation unit; the action block generation module takes the same action generation state vector as input, and performs parallel processing on multiple future action steps in the action block and the output positions corresponding to each action dimension, thereby generating a complete action block containing multiple future action steps, reducing the waiting caused by sequential generation of action steps or action lexical units. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the architecture of the inference acceleration circuit provided in an embodiment of the present invention.
[0020] Figure 2 This is a schematic diagram of the action block generation module structure provided in an embodiment of the present invention.
[0021] Figure 3 This is a schematic diagram of the action buffer module and predictive scheduling controller provided in an embodiment of the present invention.
[0022] Figure 4 This is a schematic diagram of the continuous output timing of the action block based on the delay-aware low water level threshold provided in an embodiment of the present invention. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0024] To achieve the above objectives, in a first aspect, the present invention provides an inference acceleration circuit for continuous output of action blocks in a large model, which is used to execute multiple working rounds and start a new working round after receiving a trigger signal from the output of the previous working round, including: a backbone inference module, an action block generation module, a prediction scheduling controller, an action output module, and an action buffer module including multiple storage units. The main inference module is used in the current work round. At that time, directly receive the round. Input information below And generate the corresponding action generation state vector. ;exist When the predictive scheduling controller receives the first... After receiving the trigger signal input in each working cycle, the receiving cycle... Input information below And generate the corresponding action generation state vector. It should be noted that the input information can be visual information, language commands, robot status, or other input information related to action generation; there are no restrictions here. The action block generation module is used in rounds Below, according to Generate an action block containing H future action steps. And cache it in an idle memory location; H is a positive integer; The action dimension for each future action step; different memory blocks store different action blocks; Predictive scheduling controller is used when At that time, the main inference module begins to receive input information. To the corresponding action block The time required for the full cache to be in the corresponding memory (i.e., action block preparation time), thereby determining the low water level threshold. ;in, ; The action execution cycle; This is a preset safety margin used to cover additional time that is not fully accounted for, such as delay estimation errors, operational jitter, and cross-clock domain synchronization. It is a rounding function; The predictive scheduling controller is also used to monitor the state of each memory bank in real time throughout the operation of the inference acceleration circuit. For any memory bank b, when memory bank b is empty, its state is set to idle state; when it completes the caching of a complete action block, it is set to ready state; and when the actions in it begin to be retrieved, it is set to read state. Predictive scheduling controllers are also used in rounds Below, when storing action blocks The memory is in a read state, and the remaining action blocks within it have been detected for the first time. The number of time steps is less than or equal to the low water level threshold. At that time, a trigger signal is sent to the main inference module; The predictive scheduling controller is also used to continuously control the action output module to retrieve actions from the memory according to the order in which the memory enters the ready state throughout the entire operation of the inference acceleration circuit, and to ensure that all actions under a future action step are retrieved in one action execution cycle.
[0025] It should be noted that, if L action steps have not yet been output when the current action block is read from the memory at the time of triggering, the overlapping time window formed by the current action block continuing to output according to the action control cycle is: To ensure that the target memory enters the ready state no later than the boundary of the current action block, the following conditions must be met: Safety margin This is used to cover additional time that is not fully accounted for, such as delay estimation errors, operational jitter, and cross-clock domain synchronization. Therefore, This represents the minimum number of action steps that must be retained to ensure continuous output, given a latency budget and safety margin. When the low-water threshold is the aforementioned minimum number of action steps that must be retained, and triggering occurs when the remaining number of action steps drops to this threshold, the cycle reads of the remaining action steps of the current memory block overlap with the state acquisition, generation, and writing processes of the next action block. Provided the total preparation latency does not exceed the adopted budget, this overlap time can precisely cover the complete preparation process of the next action block, thus allowing the target memory block to enter a ready state at or before the end of the current action block read, avoiding action block boundary underload due to late triggering. On the other hand, among multiple candidate thresholds that satisfy the continuous output constraint, the value of the equality sign in the above expression can be used as the threshold corresponding to the latest safe trigger. If the threshold is one or more action steps smaller than this value, the overlap time can be used to reduce one or more action control cycles accordingly, which may not be sufficient to cover the total preparation latency; if the threshold is one or more action steps larger than this value, it will not further increase the boundary continuity under the given latency budget, but will only advance the generation request by one or more corresponding action control cycles and extend the early residence time of the next action block or the target memory block. Therefore, the threshold is not aimed at triggering as early as possible, but rather at selecting the minimum advance amount that satisfies the continuous output condition given a safety margin.
[0026] It should be noted that this invention establishes a delay prediction triggering and boundary switching mechanism. The predictive scheduling controller determines the low watermark threshold based on the preparation time of the next action block and the action control cycle, plans the preparation of the next action block, and switches to read the memory when the current block is completed and the target memory is in a ready state, thereby reducing action block boundary waiting and avoiding premature interruption of the current action block.
[0027] Meanwhile, the present invention separates the writing of action blocks from the reading of action steps by using at least two buffer storage units, so that the action block burst generation process does not directly block the downstream reading of action steps according to the control cycle, thereby improving the continuity of action output.
[0028] Furthermore, this invention supports parameterized edge deployment. Parameters such as action blocks, memory, and scheduling thresholds can be configured according to the target model, action format, control cycle, and edge hardware resources, enabling the circuit to adapt to different action output continuity, on-chip resource usage time, and computational parallelism, and making it suitable for large multimodal models with different action output types.
[0029] Preferably, in an optional implementation, the predictive scheduling controller is further configured to re-record the start time of input information received by the backbone inference module in the current working round when the operating conditions of the inference acceleration circuit change. To the corresponding action block The time required for the complete cache to reside in the corresponding memory, thereby redetermining the low watermark threshold. The operating conditions of the aforementioned inference acceleration circuit include at least one of the following: hardware operating frequency, action control frequency, state data source, data transmission path, storage access load, and computing resource usage.
[0030] In one optional implementation, the action buffer module further includes: a write selector and a read selector; the input of the write selector is connected to the output of the action block generation module; the output of the read selector is connected to the input of the action output module. The predictive scheduling controller is also used to set any memory bank b to a write state when it begins a caching action while monitoring the status of each memory bank in real time. Predictive scheduling controllers are also used in rounds Next, generate action blocks in the action block generation module. Previously, the output of the control write selector was used to buffer action blocks. The memory bank is connected to the memory bank, and when the memory bank is in a write state, the output of the write selector is continuously connected to the memory bank; The predictive scheduling controller is also used to control the input of the read selector to be connected to the memory bank before the action output module retrieves an action from any memory bank during the entire operation of the inference acceleration circuit, and to keep the input of the read selector connected to the memory bank while the memory bank is in the reading state, so as to ensure the orderliness of action output.
[0031] In one optional implementation, the above-mentioned action block generation module includes: an action generation state cache unit, a grouping unit, a calculation unit, an action header weight storage unit, and an accumulation unit; The action generation state caching unit is used to cache the action generation state vectors generated by the main inference module. ; Grouping units are used to generate state vectors from actions. Divide into P groups to obtain P state sub-vectors. And send them sequentially to the computing unit; ; The action head weight storage unit is used to store... The first state data corresponding to each state data The next step and the first Weight data for the first action dimension, and the weight data for the second action dimension. The next step and the first Bias data under each action dimension ; ; ; The computing unit includes an array of processing units; the array of processing units includes H rows and D columns of processing units; the processing unit is a multiply-accumulate unit; the computing unit is used to process the received data... pState subvectors Then, the state sub-vector corresponding to that state is retrieved from the action head weight storage unit. The next step and the first Weight vector under each action dimension Then calculate the first p The result of the multiplication and accumulation operation of the H rows and D columns corresponding to the group is output to the accumulation unit; where, ; include The first state data corresponding to each state data The next step and the first Weight data under each action dimension; p The group corresponding to the first row and number The result of the column multiplication and summation operation is ; The accumulation unit is used to add the corresponding number of groups. Line number After summing the results of the multiplication and accumulation operations under the column, the sum is obtained from the action head weight storage unit. The next step and the first Bias data under each action dimension Add them together to get the action block. The Middle The next step and the first Actions within each action dimension, thus obtaining action blocks. .
[0032] It should be noted that the above computing units can obtain the first result through fully parallel, grouped parallel, or time-sharing multiplexing methods. p The result of the multiplication and summation operation of the H rows and D columns corresponding to the group is not limited here. Preferably, in an optional implementation, the above-mentioned calculation unit is used to... The input is sent to each processing unit, Enter to the number Line number In the processing unit of the column, the multiplication and accumulation operations of the corresponding state sub-vector and weight vector are performed in parallel in each processing unit to obtain the first... p The result of the multiplication and accumulation operation of the H row and D column corresponding to the group is output to the accumulation unit.
[0033] It should be noted that the above optional implementation constructs a parallel expansion path for action blocks. Through the action block generation module, the action head weight storage unit, and the calculation unit, the action generation state is expanded and calculated in both the time step and action dimension directions, reducing the dependence of the action output stage on the serial generation of tokens or action steps.
[0034] In one optional implementation, the above-mentioned action block generation module further includes an action post-processing unit, used for processing the action block. Post-processing is performed; post-processing includes one or more of the following: scaling, limiting, denormalization, and format conversion.
[0035] It should be noted that the above rounding function This can be a rounding-up function, a rounding-down function, a rounding-to-the-floor function, etc., and is not limited here. Preferably, in one optional implementation, This is the floor function.
[0036] It should be noted that the aforementioned backbone inference module can be any type of feature extraction module, and the action-generated state vector is equivalent to the features of the extracted input information. The aforementioned backbone inference module can be a Transformer accelerator, a state-space model (such as Mamba) accelerator, a convolutional neural network accelerator, a recurrent neural network accelerator, or a hybrid model accelerator formed by one or more of the above accelerators; no limitation is made here. Preferably, in one optional implementation, the aforementioned backbone inference module is a Transformer accelerator.
[0037] It should be noted that the aforementioned inference acceleration circuit can be implemented using a SoC, ASIC, or custom SoC with programmable logic, and can also be implemented on a Jetson in a software or hardware-software co-implementation manner. Preferably, in one optional implementation, the aforementioned inference acceleration circuit is deployed on an FPGA.
[0038] To further illustrate the inference acceleration circuit for continuous output of large model action blocks provided by the present invention, a specific embodiment is described in detail below: like Figure 1 The diagram shown is a schematic of the overall architecture of the inference acceleration circuit provided in this embodiment. This circuit can serve as an action output acceleration unit in an edge-side inference system, suitable for VLA models or other action-output type multimodal large models that output action sequences or action blocks through an action head. The circuit includes an input interface, a global buffer module, a backbone inference module, an action block output acceleration module, a storage controller, and off-chip memory (in this embodiment, off-chip high-bandwidth memory); wherein, the action block output acceleration module includes: an action block generation module, a prediction scheduling controller, an action output module, and an on-chip action buffer module including multiple memory banks; The backbone inference module generates action generation state vectors based on the input data. Specifically, it completes backbone inference with data support from the global buffer module and the storage controller, and outputs action generation state vectors. The action generation state is an intermediate representation output by the backbone inference module that drives action output; it can be a hidden state, action head input vector, action lexical decoding state, or a projected action condition vector.
[0039] The action block generation module is used to generate action blocks containing multiple future action steps based on the action generation state vector; an action block can be represented as: Where H represents the number of future action steps contained in the action block; This represents the motion dimension of each action step; Indicates the first Each motion control cycle outputs motion steps progressively. In robot motion control scenarios, because a robot typically needs to control multiple joints or actuators simultaneously at a single control moment, the actions under each motion step include: the position, speed, and torque of each joint, as well as the pose and gripper opening / closing degree of the robotic arm end effector.
[0040] The predictive scheduling controller determines the low-water threshold based on the next action block preparation delay and the action control cycle. It triggers the preparation of the next action block based on the comparison between the remaining number of action steps for the current memory read and the low-water threshold. It also controls the memory read switching based on the current action block read completion condition and the next memory read read read status. The next action block preparation time can be calculated as the sum of the next action generation status acquisition delay, the action block generation delay, and the action block write delay (i.e., the delay at which the backbone inference module begins receiving input information). To the corresponding action block The time required for the full cache to be in the corresponding memory The behavior is characterized and can be obtained through configuration registers or runtime counter statistics. Specifically, the prediction scheduling controller receives feedback on the water level and memory status of the on-chip action buffer module, and obtains parameters such as action block generation delay, action control cycle, and safety margin through the scheduling parameter configuration module, thereby generating generation trigger and read switching control signals (i.e., trigger signals). Thus, the backbone inference module provides the action generation status, and the action block output acceleration module completes the parallel generation, on-chip buffering, and continuous output of action blocks.
[0041] like Figure 2 The diagram shown is a structural schematic of the action block generation module provided in this embodiment. The action block generation module includes an action generation state cache unit, a grouping unit, a calculation unit, an action header weight storage unit, an accumulation unit, and an action post-processing unit. The action generation state caching unit is used to cache the action generation state vectors generated by the main inference module. .
[0042] Grouping units are used to generate state vectors from actions. Divide the data into P groups (it should be noted that grouping can be done by the number of groups, the number of action steps, or the number of actions; there is no limitation here), resulting in P state sub-vectors. And send them sequentially to the computing unit; .
[0043] The action head weight storage unit is used to store... The first state data corresponding to each state data The next step and the first Weight data for the first action dimension, and the weight data for the second action dimension. The next step and the first Bias data under each action dimension It also provides the computing unit with weight data corresponding to each action step and action dimension; ; .
[0044] The computing unit includes a processing unit array (such as a PE or MAC parallel array); the processing unit array includes H rows and D columns of processing units; the processing unit is a multiply-accumulate unit; the computing unit is used to perform action head calculation, which can adopt a fully parallel, grouped parallel, or time-division multiplexing approach to calculate multiple action steps and multiple action dimensions in the action block. In this embodiment, the computing unit is used to receive the first... p State subvectors Then, the state sub-vector corresponding to that state is retrieved from the action head weight storage unit. The next step and the first Weight vector under each action dimension ; include The first state data corresponding to each state data The next step and the first Weight data for each action dimension; The input is sent to each processing unit, Enter to the number Line number In the processing unit of the column, the multiplication and accumulation operations of the corresponding state sub-vector and weight vector are performed in parallel in each processing unit to obtain the first... p The result of the multiplication and accumulation operation of the H rows and D columns corresponding to the group is output to the accumulation unit; where, ;No. p The group corresponding to the first The next step and the first The result of the multiplication and accumulation operation under the action dimension (i.e., the first action dimension) p The group corresponding to the first row and number The result of the multiplication and summation operation of the column is .
[0045] The accumulation unit is used to add the corresponding number of groups. Line number After summing the results of the multiplication and accumulation operations under the column, the sum is obtained from the action head weight storage unit. The next step and the first Bias data under each action dimension Add them together to get the action block. The Middle The next step and the first Actions within each action dimension, thus obtaining action blocks. For the first action block The next step and the first For each action dimension, the action head calculation can be represented as: .
[0046] The post-processing unit is used for processing action blocks. Post-processing is required; this includes one or more of the following: scaling, limiting, denormalization, and format conversion. For example, in robot motion control scenarios, the action terms generated by the model are usually just discrete codes of action values and cannot be directly sent to the robot. They need to be converted back to continuous values, restored to the actual physical quantity range, converted into the data format required by the controller, and limited within a safe range. Therefore, post-processing operations are necessary.
[0047] With the above structure, the action block generation module takes the same action generation state vector as input and processes multiple future action steps and their corresponding output positions in parallel within the action block, thereby generating a complete action block containing multiple future action steps, reducing the waiting time caused by sequential generation of action steps or action lexical units. Preferably, in an optional embodiment, the action block can also be divided into multiple action sub-blocks, and each action sub-block is written to the target buffer storage segment by segment after its generation is completed; the target buffer storage is only updated to the ready state after all action sub-blocks have been written.
[0048] In this embodiment, the action generates a state vector. It has 256 dimensions and ultimately generates 8 steps. A 7-dimensional action block. The circuit first reads a 256-dimensional action generation state from HBM, stores it in the on-chip state buffer, and locks the action header weights and biases. The 256-dimensional state is divided into 32 groups, each containing 8 state values.
[0049] The circuit selects eight output positions from the action block each time, such as different time steps or different action dimensions, and reads the weights corresponding to these eight output positions. (The entire action block has 56 output positions because of the 8 steps.) The process involves 7 dimensions, with each position ultimately generating a 16-bit action value. Since each step has 7 dimensions, and the hardware processes 8 outputs in parallel per round, a single set may naturally contain different action steps and different action dimensions. The cell array performs 64 multiplications simultaneously per cycle: the 8 state values are multiplied by the weights of the 8 output positions. Each output position yields 8 products, which are then summed in parallel. The circuit processes all 32 sets of states sequentially, continuously accumulating the results and adding corresponding biases, ultimately obtaining 8 complete action values. These 8 action values are scaled, rounded, limited, and converted to a 16-bit format before being stored in the action block result buffer. This process is repeated 7 times, resulting in a total of 56 action values. The result buffer then rearranges the 56 action values according to "8 future action steps, 7 action dimensions per step," and sequentially writes the 8 complete action steps into the target memory. Only after the last action step is written is the action block marked as complete and ready.
[0050] like Figure 3 The diagram shows the structure of the on-chip action buffer module and predictive scheduling controller provided in this embodiment. The on-chip action buffer module includes an action block write interface, a write selector, multiple memory banks, and a read selector. The action output module includes an action step read interface and an action output register. Among the multiple memory banks of the action buffer module, one memory bank is selected as the current read memory bank for outputting the current action block; another memory bank is selected as the target memory bank for receiving or temporarily storing the next action block. The target memory bank can be in the idle, writing, and ready states sequentially; the current read memory bank is released to the idle state after the current action block is read and the read memory bank switching is completed.
[0051] The action block output by the action block generation module enters the on-chip action buffer module via the action block write interface, and is written to the target memory bank by the write selector. The read selector selects the memory bank to be read according to the read memory bank selection signal. The action step read interface reads the action steps in the current action block sequentially according to the read pointer, and the action output register latches and outputs the current action step under the action control cycle clock. Each buffer memory bank can be in an idle, writing, ready, or reading state. The figure shows two buffer memory banks as an example, but in actual implementation, it can be expanded to multiple buffer memory banks. A memory bank in the idle state enters the writing state after being selected as the write memory bank, and enters the ready state after the complete action block is written; a memory bank in the ready state enters the reading state after being selected as the current read memory bank, and is released to the idle state after the current action block is completely read and the read memory bank switch is completed.
[0052] Taking H=8, D=7, and dual memory banks as an example, the above process is as follows: Selecting an idle storage bank: Before action block generation begins, the scheduler selects an idle storage bank from two storage banks as the target storage bank. If the other storage bank is currently outputting an action, it remains the currently read storage bank.
[0053] Write the next action block: After the action head completes the calculation and rearrangement of 56 action values, the write interface writes according to the action steps: one complete 7-dimensional action step is written per cycle; steps 0 to 7 are written continuously, and effective data writing requires 8 cycles. The write selection circuit sends these action steps to the corresponding memory bank according to the target memory bank number.
[0054] The target memory bank enters the write state: When the first action step begins writing, the target memory bank changes from "idle" to "writing". During this period, even if part of the action step has been written, it cannot be selected by the read selection circuit.
[0055] The target memory is marked as ready only after the entire write operation is completed: the target memory changes from "writing" to "ready" only after the 7th step, which is the last action step, has been legally completed. This ensures that the reading side will not read an action block that has only been partially written.
[0056] The current memory bank outputs according to the control cycle; simultaneously, the currently read memory bank remains in a "reading" state. At each action control cycle, the circuit reads a 7-dimensional action step: in the 0th control cycle, step 0 is output; in the 1st control cycle, step 1 is output; and so on, with step 7 being output in the 7th control cycle. The read 7-dimensional action value is latched into the action output register. The action output register keeps the output value stable between two control cycles.
[0057] Simultaneous writing and reading: While the current memory bank slowly outputs action steps according to a control cycle of 10, 20, or 50 ms, another memory bank can write the next action block in a concentrated manner over several hardware cycles. Therefore, the two tasks can overlap: Memory bank 0: Reads the current action block cycle by cycle. Memory bank 1: Writes the next action block in a concentrated manner, and then the roles are switched in the next round.
[0058] Switching at the action block boundary: After the 7th step of the current memory bank is output, the scheduler checks another memory bank: If another memory bank is ready, it is switched to the new current read memory bank; the original current read memory bank is released to an idle state; the next control cycle begins outputting step 0 of the new action block. Even if the target memory bank is ready ahead of time, it must wait until step 7 of the current block is completely output before switching.
[0059] When the next memory bank is not ready in time: If the current block has been output and the next memory bank is not ready, the circuit will not read the data that has not been fully written: the action output register retains its original value; the record boundary is underloaded; and the circuit waits for the target memory bank to be fully ready before switching and resuming output.
[0060] The predictive scheduling controller controls the collaborative operation of the action block generation module and the on-chip action buffer module. It includes a read / write pointer management unit, a water level counting unit, a low water level threshold determination unit, a memory state management unit, and a triggering and switching control unit. The read / write pointer management unit generates the action block write address and the action step read address (since H and D are fixed, this embodiment uses pointer addressing to determine whether the corresponding memory is empty, whether the corresponding memory has completed caching of a complete action block, whether the action in the corresponding memory has started to be retrieved, and whether the corresponding memory has started caching actions). The water level counting unit obtains the number of outputtable action steps remaining in the currently read memory. The low water level threshold determination unit converts the next action block preparation delay into the number of action steps that need to be retained in the currently read memory according to the action control cycle, and determines the low water level threshold based on a safety margin. In one implementation, the low water level threshold satisfies: ; The action execution cycle; This is a non-negative preset safety margin; This is the floor function.
[0061] When satisfied When the current memory bank is in a reading state, the prediction scheduling controller generates a next action block generation trigger signal (and prohibits the repeated generation of the next action block generation trigger signal before the next action block generation request is completed) to request or read the next action block generation state in advance and start the next action block generation. The memory bank state management unit is used to maintain the state of each memory bank, enabling each memory bank to switch between idle state, write state, ready state, and reading state. The target memory bank remains in a non-ready state while receiving the next action block, and is converted to a ready state after all action steps of the next action block are written. When the target memory bank is converted to a ready state before all action steps of the current action block are output, the prediction scheduling controller keeps the current memory bank unchanged, and switches the target memory bank in the ready state to the new current memory bank after the last action step of the current action block is output. The trigger and switching control unit generates generation trigger, write memory bank selection, read memory bank selection, and read switching control signals according to the current water level, low water level threshold, and memory bank state. After the next action block is written to the memory bank in the idle state and completed, the memory bank is marked as ready. The current memory bank remains unchanged until the current action block has finished reading. When the current action block finishes reading and the target memory bank is in a ready state, the predictive scheduling controller switches the memory bank to be read at the action block boundary. If the action sub-block pipelined writing method is used, the memory bank state management unit can record the completion status of the action sub-block writing and mark the target memory bank as ready after all action sub-blocks have been written.
[0062] like Figure 4 The diagram shown is a schematic of the continuous output timing of action blocks based on a delay-aware low water level threshold provided in this embodiment. Let the currently read action block be... The current storage device being read is storage device 0, and the target storage device is storage device 1, which is initially in an idle state. In the initial phase, the action output interface reads and outputs data sequentially from storage device 0 according to the action control cycle. The action steps are completed, and storage 1 remains idle. The remaining number of action steps in storage 0... Drop to low water level threshold At that time, the predictive scheduling controller generates a generation trigger signal, requests or invokes the next action generation state, and starts the next action block. The generation of the next action block is as follows: After receiving the trigger signal for the generation of the next action block, the main inference module generates the next action generation state based on the scene information and robot state obtained near the trigger time. This ensures the timely readiness of the next action block while shortening the time interval between the information upon which action generation is based and the actual output time of the action. During this time, the memory is not switched, and memory 0 continues to output the remaining action steps of the current action block; the generated action block... Write to memory bank 1; when the write completion signal is valid, the memory bank status management unit updates the status of memory bank 1 to the ready state.
[0063] when When the last action step is read and reaches the action block boundary, if memory bank 1 is already in a ready state, the predictive scheduling controller will switch the current memory bank being read from memory bank 0 to memory bank 1, and the action output interface will continue to output action blocks according to the action control cycle. The action step is initiated; subsequently, storage 0 can be released to an idle state to receive the next action block; if storage 1 is not yet in a ready state, the prediction scheduling controller maintains the current action output register state or output wait flag, and performs a read storage switch after storage 1 is updated to be ready. Thus, low-water triggering is used to start the generation of the next action block in advance, and the read storage switch is only performed when the action block boundary is reached and the target storage is ready, so that the generation and writing of the next action block can overlap with the periodic read process of the current action block, thereby reducing the waiting time at the action block boundary and ensuring continuous output of action steps. At the same time, when the next action generation state is generated by real-time scene information or robot state, the delay-aware triggering can avoid the unconditional premature generation of the next action block, which is beneficial to reducing the early accumulation of actions to be executed and the risk of outdated information on the basis of action generation. In an optional embodiment, the next action block can be generated in a pipeline according to action sub-blocks and written to the target storage in segments, but the read switch is still conditional on the complete action block in the target storage being ready and the current action block reaching the read boundary.
[0064] During operation, the backbone inference module first generates an action generation state vector based on the current input; the action block generation module generates the current action block in parallel based on this action generation state; the on-chip action buffer module writes the current action block into free memory and outputs the action steps in it sequentially according to the action control cycle. When the number of remaining action steps in the currently read memory is less than or equal to the low watermark threshold, the prediction scheduling controller, under the condition that there is a writable target memory and there is no incomplete next action block request, issues a next action generation state request or reads the cached next action generation state and triggers the generation of the next action block; this trigger does not change the currently read memory. After the next action block is generated, it is written into the target memory, and the memory state management unit marks the target memory as ready; the current read memory remains unchanged until the current action block has been read completely; when the current action block has been read completely and the target memory is in a ready state, the prediction scheduling controller switches the target memory to the current read memory at the action block boundary, so that the action output interface continues to output the action steps in the next action block according to the action control cycle.
[0065] In one optional implementation, the action block generation module can divide an action block into multiple action sub-blocks, and after each action sub-block completes its calculation and rearrangement, write it to the corresponding address area of the target memory. The memory status management unit records the write completion status of each action sub-block and marks the target memory as ready after all action sub-blocks have been written. By writing action sub-blocks in segments, the calculation, rearrangement, and writing processes of action sub-blocks can partially overlap, reducing the additional waiting time caused by writing the entire action block after its generation.
[0066] In addition, the global buffer module is used to temporarily store model weights, intermediate activations, key-value data, and data to be loaded into the action head weight storage unit or action generation state cache required during the backbone inference and action block generation processes. The storage controller is used to manage data transfer between on-chip circuitry and off-chip memory, and to perform weight loading, data transfer, and necessary data write-back according to the needs of backbone inference and action block generation.
[0067] In summary, this embodiment can achieve the following beneficial effects: 1) This embodiment reduces the dependence of the action output stage on the sequential generation process of step-by-step or step-by-step word generation by using the parallel generation method of action blocks, thereby improving the efficiency of action generation on the end side.
[0068] 2) This embodiment uses an on-chip multi-memory action buffer structure to decouple the burst writing of action blocks from the periodic reading of action steps, so that the downstream action execution module can continuously obtain action steps according to the control cycle, thereby improving the continuity and stability of action output.
[0069] 3) This embodiment utilizes latency-aware low-water level scheduling to convert the latency of acquiring the next action generation state, the action block generation latency, and the action block write latency into the number of action steps required for early triggering based on the action control cycle. Compared to triggering too late or using fixed empirical thresholds, this embodiment can reduce action block boundary underload and action slot gaps. Compared to unconditional full early generation, this embodiment can shorten the unnecessary early residence time of the next action block in the target memory while maintaining the continuity of action output, which helps reduce the early accumulation of actions to be executed and the risk of outdated information on the basis of action generation. This effect is particularly suitable for edge-side inference systems with limited on-chip buffers and computing resources.
[0070] 4) This embodiment can be configured according to parameters such as action block length, action dimension, parallel computing scale, number of memory blocks, memory block depth and low water level threshold. It can be integrated into the edge inference chip or dedicated acceleration circuit and has the ability to adapt to different action output formats and edge hardware resources.
[0071] In a second aspect, the present invention provides a robot motion control system, comprising: the inference acceleration circuit provided in the first aspect of the present invention.
[0072] The related technical solutions are the same as the inference acceleration circuit provided in the first aspect of this invention, and will not be described in detail here.
[0073] Thirdly, the present invention provides an electronic chip including the inference acceleration circuit provided in the first aspect of the present invention.
[0074] The related technical solutions are the same as the inference acceleration circuit provided in the first aspect of this invention, and will not be described in detail here.
[0075] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. An inference acceleration circuit for continuous output of large model action blocks, characterized in that, include: The system consists of a main inference module, an action block generation module, a prediction scheduling controller, an action output module, and an action buffer module that includes multiple storage units. The backbone inference module is used in the current work round. At that time, directly receive the round. Input information below And generate the corresponding action generation state vector. ;exist When receiving the prediction scheduling controller's first... After receiving the trigger signal input in each working cycle, the receiving cycle... Input information below And generate the corresponding action generation state vector. ; The action block generation module is used in rounds Below, according to Generate an action block containing H future action steps. And cache it in an idle memory location; H is a positive integer; The action dimension for each future action step; different storage volumes are used to store different action blocks; The predictive scheduling controller is used when At that time, the main inference module is recorded as starting to receive input information. To the corresponding action block The time required for the full cache to be in the corresponding memory This allows for the determination of low water level thresholds. ;in, ; The action execution cycle; To pre-set a safety margin; It is a rounding function; The predictive scheduling controller is also used to monitor the state of each memory bank in real time throughout the entire operation of the inference acceleration circuit. For any memory bank b, when memory bank b is empty, its state is set to idle state; when it completes the caching of a complete action block, it is set to ready state; and when the action in it begins to be retrieved, it is set to reading state. The predictive scheduling controller is also used in rounds Below, when storing action blocks The memory is in a read state, and the remaining action blocks within it have been detected for the first time. The number of time steps is less than or equal to the low water level threshold. At that time, a trigger signal is sent to the main inference module; The predictive scheduling controller is also used to continuously control the action output module to retrieve actions from the storage according to the order in which the storage enters the ready state during the entire operation of the inference acceleration circuit, and to ensure that all actions under a future action step are retrieved under one action execution cycle.
2. The inference acceleration circuit for continuous output of large model action blocks according to claim 1, characterized in that, The predictive scheduling controller is also used to re-record the start time of input information received by the backbone inference module in the current working cycle when the operating conditions of the inference acceleration circuit change. To the corresponding action block The time required for the complete cache to reside in the corresponding memory, thereby redetermining the low watermark threshold. .
3. The inference acceleration circuit for continuous output of large model action blocks according to claim 1, characterized in that, The action buffer module further includes a write selector and a read selector; the input of the write selector is connected to the output of the action block generation module; the output of the read selector is connected to the input of the action output module. The predictive scheduling controller is also used to set any memory bank b to a write state when any memory bank b starts a caching action while monitoring the state of each memory bank in real time. The predictive scheduling controller is also used in rounds Next, an action block is generated in the action block generation module. Previously, the output of the write selector was controlled by the buffer action block. The write selector is connected to the memory bank, and when the memory bank is in a write state, the output of the write selector is continuously connected to the memory bank. The predictive scheduling controller is also used to connect the input of the read selector to the memory bank before the action output module retrieves an action from any memory bank during the entire operation of the inference acceleration circuit, and to continuously keep the input of the read selector connected to the memory bank when the memory bank is in a reading state.
4. The inference acceleration circuit for continuous output of large model action blocks according to any one of claims 1-3, characterized in that, The action block generation module includes: an action generation state cache unit, a grouping unit, a calculation unit, an action header weight storage unit, and an accumulation unit; The action generation state caching unit is used to cache the action generation state vector generated by the backbone inference module. ; The grouping unit is used to generate state vectors from actions. Divide into P groups to obtain P state sub-vectors. And sequentially send them to the computing unit; ; The motion head weight storage unit is used to store... The first state data corresponding to each state data The next step and the first Weight data for the first action dimension, and the weight data for the second action dimension. The next step and the first Bias data under each action dimension ; ; ; The computing unit includes a processing unit array; the processing unit array includes H rows and D columns of processing units; the processing unit is a multiply-accumulate; the computing unit is used to process the received data... p State subvectors Then, the state sub-vector corresponding to the action head weight storage unit is obtained from the action head weight storage unit. The next step and the first Weight vector under each action dimension Then calculate the first p The result of the multiplication and accumulation operation of the H rows and D columns corresponding to the group is output to the accumulation unit; wherein, ; include The first state data corresponding to each state data The next step and the first Weight data under each action dimension; p The group corresponding to the first row and number The result of the column multiplication and summation operation is The accumulation unit is used to accumulate the corresponding first group of each group. Line number After summing the results of the multiplication and accumulation operations under the column, the sum is added to the result obtained from the action head weight storage unit. The next step and the first Bias data under each action dimension Add them together to get the action block. The Middle The next step and the first Actions within each action dimension, thus obtaining action blocks. .
5. The inference acceleration circuit for continuous output of large model action blocks according to claim 4, characterized in that, The computing unit is used to... The input is sent to each processing unit, Enter to the number Line number In the processing unit of the column, the multiplication and accumulation operations of the corresponding state sub-vector and weight vector are performed in parallel in each processing unit to obtain the first... p The result of the multiplication and accumulation operation of the H rows and D columns corresponding to the group is output to the accumulation unit.
6. The inference acceleration circuit for continuous output of large model action blocks according to claim 4, characterized in that, The action block generation module also includes an action post-processing unit for processing the action blocks. Post-processing is performed; wherein, the post-processing includes one or more of the following: scaling, limiting, denormalization, and format conversion.
7. The inference acceleration circuit for continuous output of large model action blocks according to any one of claims 1-3, characterized in that, This is the floor function.
8. The inference acceleration circuit for continuous output of large model action blocks according to any one of claims 1-3, characterized in that, The main inference module is a Transformer accelerator.
9. A robot motion control system, characterized in that, include: The inference acceleration circuit for continuous output of large model action blocks as described in any one of claims 1-8.
10. An electronic chip, characterized in that, Including the inference acceleration circuit for continuous output of large model action blocks as described in any one of claims 1-8.
