Data processing method and device of TPU, electronic equipment and storage medium
By obtaining the execution time of functional units within the TPU and determining a reference time to correlate data, the problem of low efficiency in TPU data analysis is solved, achieving more efficient and accurate data analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-13
- Publication Date
- 2026-03-31
AI Technical Summary
In existing technologies, Tensor Processing Units (TPUs) suffer from low data analysis efficiency and insufficient accuracy, and the data relationships are complex and disorganized.
By obtaining the execution time of functional units within the TPU, a reference time can be determined to correlate the data processing of different functional units, establish data correlations, and improve analysis efficiency and accuracy.
By referencing time-related data processing, the efficiency and accuracy of TPU's data analysis are improved, which is superior to manual data association methods.
Smart Images

Figure CN115629647B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of mobile tensor processing unit (TPU) technology, and in particular to a data processing method, apparatus, electronic device and storage medium of a tensor processing unit (TPU). Background Technology
[0002] A Tensor Processing Unit (TPU) is a chip specifically designed for machine learning. Trained for deep machine learning, it offers higher performance (computing power per watt). A TPU comprises multiple internal device units, some of which continuously generate large amounts of computational data that needs to be used for various analyses. In related technologies, this data is relatively scattered, with complex and even chaotic interrelationships, leading to low efficiency and accuracy in data analysis. Summary of the Invention
[0003] According to a first aspect of the present disclosure, a data processing method for a Tensor Processing Unit (TPU) is provided, the method comprising:
[0004] Obtain the time for the first functional unit within the Tensor Processing Unit (TPU) to execute a predetermined operation;
[0005] Based on the time when the first functional unit performs the predetermined operation, a reference time for the operation of the first functional unit and / or the second functional unit within the tensor processing unit (TPU) is determined, wherein the reference time includes the start time and / or end time of data processing.
[0006] The data processed by the first functional unit and / or the second functional unit are associated with the reference time.
[0007] In one embodiment, the method further includes:
[0008] Based on the reference time, the associated data is displayed.
[0009] In one embodiment, the first functional unit is a microcontroller (MCU); the second functional unit is a global direct memory access unit (GDMA); determining the reference time for the operation of the first functional unit and / or the second functional unit within the tensor processing unit (TPU) based on the time it takes for the first functional unit to perform the predetermined operation includes:
[0010] The start time of the GDMA operation is determined to be the end time of the first configuration of GDMA parameters by the MCU, wherein the reference time is the start time of the GDMA operation.
[0011] In one embodiment, the first functional unit is an MCU; the second functional unit is a TIU; determining the reference time information for the operation of the first functional unit and / or the second functional unit within the Tensor Processing Unit (TPU) based on the time it takes for the first functional unit to perform the predetermined operation includes:
[0012] The start time of the TIU operation is determined to be the end time of the first TIU parameter configuration of the MCU;
[0013] And / or,
[0014] The start time of the TIU operation is determined as the end time of the first GDMA record by the MCU, wherein the reference time is the start time of the TIU operation.
[0015] In one embodiment, the method further includes:
[0016] In response to the alignment of the MCU's runtime with the host computer's runtime, the start time of the MCU's runtime is determined to be the end time of the host computer sending the first instruction.
[0017] In one embodiment, the method further includes:
[0018] Based on the correlation between the operator and TIU and GDMA, the start time of the operator's operation is determined as the earliest start time of the MCU recording GDMA and TIU.
[0019] or,
[0020] Based on the relationship between the operator and TIU and GDMA, the end time of the operator's operation is determined as the latest end time of GDMA and TIU recorded by the MCU.
[0021] In one embodiment, the method further includes:
[0022] Structure the processed data of the first functional unit and / or the second functional unit;
[0023] Match the processed data with the reference time information.
[0024] In one embodiment, the method further includes:
[0025] Display the runtime sequence of the predetermined object;
[0026] The predetermined object includes at least one of the following:
[0027] GDMA;
[0028] TIU;
[0029] MCU;
[0030] Host computer;
[0031] Operator.
[0032] According to a second aspect of the present disclosure, a tensor processing unit (TPU) is provided, the apparatus comprising:
[0033] The acquisition module is used to acquire the time when the first functional unit within the Tensor Processing Unit (TPU) performs a predetermined operation.
[0034] The determining module is configured to determine reference time information for the operation of the first functional unit and / or the second functional unit within the tensor processing unit (TPU) based on the time when the first functional unit performs the predetermined operation, wherein the reference time includes the start time and / or end time of data processing.
[0035] In one embodiment, the device further includes:
[0036] The display module is used to display the associated data based on the reference time.
[0037] In one embodiment, the first functional unit is a microcontroller (MCU); the second functional unit is a global direct memory access unit (GDMA); the determining module is used to determine the start time of the GDMA operation as the end time of the first configuration of GDMA parameters by the MCU, wherein the reference time is the start time of the GDMA operation.
[0038] In one embodiment, the first functional unit is an MCU; the second functional unit is a TIU; the determining module is used for:
[0039] The start time of the TIU operation is determined to be the end time of the first TIU parameter configuration of the MCU;
[0040] And / or,
[0041] The start time of the TIU operation is determined as the end time of the first GDMA record by the MCU, wherein the reference time is the start time of the TIU operation.
[0042] In one embodiment, the determining module is configured to:
[0043] In response to the alignment of the MCU's runtime with the host computer's runtime, the start time of the MCU's runtime is determined to be the end time of the host computer sending the first instruction.
[0044] In one embodiment, the determining module is configured to:
[0045] Based on the correlation between the operator and TIU and GDMA, the start time of the operator's operation is determined as the earliest start time of the MCU recording GDMA and TIU.
[0046] or,
[0047] Based on the relationship between the operator and TIU and GDMA, the end time of the operator's operation is determined as the latest end time of GDMA and TIU recorded by the MCU.
[0048] In one embodiment, the apparatus further includes:
[0049] A structured module is used to structure the processing data of the first functional unit and / or the second functional unit;
[0050] A matching module is used to match the processed data with the reference time information.
[0051] In one embodiment, the apparatus further includes:
[0052] The display module is used to display the runtime sequence of the predetermined object;
[0053] The predetermined object includes at least one of the following:
[0054] GDMA;
[0055] TIU;
[0056] MCU;
[0057] Host computer;
[0058] Operator.
[0059] According to a third aspect of the present disclosure, an electronic device is provided, comprising:
[0060] processor;
[0061] Memory used to store processor-executable instructions;
[0062] The processor is used to implement the steps in any of the methods described above during execution.
[0063] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, on which a computer program is stored, the program being executed by a processor of any of the methods described above.
[0064] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:
[0065] In this embodiment, the time for a first functional unit within a Tensor Processing Unit (TPU) to perform a predetermined operation is obtained. Based on the time for the first functional unit to perform the predetermined operation, a reference time for the operation of the first functional unit and / or the second functional unit within the TPU is determined, wherein the reference time includes the start and / or end time of data processing. The data processed by the first functional unit and / or the second functional unit is associated based on the reference time. Here, since the reference time for the operation of the first functional unit and / or the second functional unit within the TPU is determined based on the time for the first functional unit to perform the predetermined operation, the reference time is used to associate the data processed by the first functional unit and / or the second functional unit. Thus, the association relationship between the data processed by different functional units can be established through the reference time, and the data is associated and integrated. Compared to methods that rely on manual data association to find correlations, this improves the efficiency and accuracy of data analysis.
[0066] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0067] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0068] Figure 1 This is a schematic diagram illustrating a data processing method of a Tensor Processing Unit (TPU) according to an exemplary embodiment;
[0069] Figure 2 This is a schematic diagram illustrating a data processing method of a Tensor Processing Unit (TPU) according to an exemplary embodiment;
[0070] Figure 3 This is a schematic diagram illustrating a data processing method of a Tensor Processing Unit (TPU) according to an exemplary embodiment;
[0071] Figure 4 This is a schematic diagram of the layout of a display interface according to an exemplary embodiment;
[0072] Figure 5 This is a block diagram illustrating a data processing apparatus for a Tensor Processing Unit (TPU) according to an exemplary embodiment;
[0073] Figure 6 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation
[0074] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of methods and apparatus consistent with some aspects of the invention as detailed in the appended claims.
[0075] To facilitate understanding by those skilled in the art, this disclosure provides multiple embodiments to clearly illustrate the technical solutions of the embodiments of this disclosure. Of course, those skilled in the art will understand that the multiple embodiments provided in this disclosure can be executed individually, or in combination with the methods of other embodiments in this disclosure, or individually or in combination with some methods in other related technologies; this disclosure does not limit these aspects.
[0076] Figure 1 This is a data processing method for a Tensor Processing Unit (TPU) according to an exemplary embodiment, the method comprising:
[0077] Step 11: Obtain the time for the first functional unit within the Tensor Processing Unit (TPU) to execute the predetermined operation;
[0078] Step 12: Determine the reference time for the operation of the first functional unit and / or the second functional unit within the tensor processing unit (TPU) based on the time when the first functional unit performs the predetermined operation, wherein the reference time includes the start time and / or end time of data processing;
[0079] Step 13: Associate the data processed by the first functional unit and / or the second functional unit based on the reference time.
[0080] Here, the TPU can be a cloud-based artificial intelligence (AI) chip or a chip with a similar architecture. The TPU may include a performance monitoring unit (PMU), a microcontroller unit (MCU), a global direct memory access unit (GDMA), and a tensor instruction unit (TIU), etc.
[0081] In one embodiment, the first functional unit is a microcontroller (MCU); the second functional unit is a global direct memory access unit (GDMA) or a TIU.
[0082] It should be noted that a series of performance information is generated during the operation of the TPU, which includes one of the following:
[0083] The PMU records the transmitted bytes, start time, and end time of the GDMA transmission;
[0084] The PMU records the start and end times of the atomic operations performed by the TIU;
[0085] The MCU records the configuration time and wait time for each device operation (e.g., GDMA and TIU).
[0086] The start and end times of the critical functions are recorded on the host computer.
[0087] The matching relationship between low-level atomic operations and high-level operators;
[0088] Current clock speed information;
[0089] Memory request information; and
[0090] Static instruction information.
[0091] In one embodiment, the time for a first functional unit within a Tensor Processing Unit (TPU) to perform a predetermined operation is obtained; based on the time for the first functional unit to perform the predetermined operation, a reference time for the operation of the first functional unit and / or the second functional unit within the TPU is determined, wherein the reference time includes the start time and / or end time of data processing; the data processed by the first functional unit and / or the second functional unit is associated based on the reference time; and the associated data is displayed based on the reference time.
[0092] In one embodiment, the time for the MCU within the Tensor Processing Unit (TPU) to perform a predetermined operation is obtained; based on the time for the MCU to perform the predetermined operation, a reference time for the MCU and / or GDMA operation within the TPU is determined, wherein the reference time includes the start time and / or end time of data processing; and the data processed by the MCU and / or the GDMA is associated with the reference time.
[0093] In one embodiment, the first functional unit is a microcontroller (MCU); the second functional unit is a Global Direct Memory Access Unit (GDMA). The process involves obtaining the time when the MCU within the Tensor Processing Unit (TPU) executes the configuration of GDMA parameters; determining the start time of the GDMA operation as the end time of the MCU's first GDMA parameter configuration; and associating the data processed by the MCU and / or the GDMA based on the reference time; wherein the reference time is the start time of the GDMA operation.
[0094] In one embodiment, the first functional unit is an MCU; the second functional unit is a TIU. The process involves obtaining the time when the MCU within the Tensor Processing Unit (TPU) executes the configuration of the TIU parameters; determining the start time of the GDMA operation as the end time of the MCU's first configuration of GDMA parameters; and associating the data processed by the MCU and / or the GDMA based on the reference time; wherein the reference time is the start time of the TIU operation.
[0095] In this embodiment, the time for a first functional unit within a Tensor Processing Unit (TPU) to perform a predetermined operation is obtained. Based on the time for the first functional unit to perform the predetermined operation, a reference time for the operation of the first functional unit and / or the second functional unit within the TPU is determined, wherein the reference time includes the start time and / or end time of data processing. The data processed by the first functional unit and / or the second functional unit is associated based on the reference time. Here, since the reference time for the operation of the first functional unit and / or the second functional unit within the TPU is determined based on the time for the first functional unit to perform the predetermined operation, the reference time is used to associate the data processed by the first functional unit and / or the second functional unit. Thus, the association relationship between the data processed by different functional units can be established through the reference time, and the data is associated and integrated. Compared to methods that rely on manual data association to find correlations, this improves the efficiency and accuracy of data analysis.
[0096] Figure 2 This is a data processing method for a Tensor Processing Unit (TPU) according to an exemplary embodiment, the method comprising:
[0097] Step 21: Obtain the time for the MCU within the Tensor Processing Unit (TPU) to execute the predetermined operation;
[0098] Step 22: Determine the reference time for the operation of the MCU and / or TIU within the Tensor Processing Unit (TPU) based on the time it takes for the MCU to perform the predetermined operation, wherein the reference time includes the start time and / or end time of data processing;
[0099] Step 23: Associate the data processed by the MCU and / or the TIU (or GDMA) based on the reference time;
[0100] Step 24: Display the associated data based on the reference time.
[0101] In one embodiment, the time for a first functional unit within a Tensor Processing Unit (TPU) to execute a predetermined operation is obtained; based on the time for the first functional unit to execute the predetermined operation, a reference time for the operation of the first functional unit and / or the second functional unit within the TPU is determined, wherein the reference time includes the start time and / or end time of data processing; the data processed by the first functional unit and / or the second functional unit is associated based on the reference time. In response to the alignment of the MCU's runtime with the host computer's runtime, the start time of the MCU's operation is determined to be the end time of the host computer sending the first instruction.
[0102] In one embodiment, the time for a first functional unit within a Tensor Processing Unit (TPU) to perform a predetermined operation is obtained; based on the time for the first functional unit to perform the predetermined operation, a reference time for the operation of the first functional unit and / or the second functional unit within the TPU is determined, wherein the reference time includes the start time and / or end time of data processing; the data processed by the first functional unit and / or the second functional unit is associated based on the reference time. According to the association between the operator and the Tensor Processing Unit (TIU) and the GDMA, the start time of the operator's operation is set to the earliest start time of the GDMA and TIU recorded by the MCU.
[0103] In one embodiment, the time for a first functional unit within a Tensor Processing Unit (TPU) to execute a predetermined operation is obtained; based on the time for the first functional unit to execute the predetermined operation, a reference time for the operation of the first functional unit and / or the second functional unit within the TPU is determined, wherein the reference time includes the start time and / or end time of data processing; the data processed by the first functional unit and / or the second functional unit is associated based on the reference time. According to the association between the operator and the Tensor Processing Unit (TIU) and the Second Dimensioning and Mapping (GDMA), the end time of the operator's operation is set as the latest time the MCU records the end time of the GDMA and TIU.
[0104] In one embodiment, the time for a first functional unit within a Tensor Processing Unit (TPU) to execute a predetermined operation is obtained; based on the time for the first functional unit to execute the predetermined operation, a reference time for the operation of the first functional unit and / or the second functional unit within the TPU is determined, wherein the reference time includes the start time and / or end time of data processing; the data processed by the first functional unit and / or the second functional unit is associated with the reference time. The processing data of the first functional unit and / or the second functional unit is structured; the processing data and the reference time information are matched. For example, the processing data may be structured and converted into readable text information: static instructions are parsed, instruction parameters and memory usage are analyzed, and relevant time records are matched according to the GDMA or TIU ID.
[0105] In one embodiment, the time for a first functional unit within a Tensor Processing Unit (TPU) to execute a predetermined operation is obtained; based on the time for the first functional unit to execute the predetermined operation, a reference time for the operation of the first functional unit and / or the second functional unit within the TPU is determined, wherein the reference time includes the start time and / or end time of data processing; the data processed by the first functional unit and / or the second functional unit is associated based on the reference time. The runtime sequence of the predetermined object is displayed; wherein the predetermined object includes at least one of the following: GDMA; TIU; MCU; host computer; operator.
[0106] Figure 3 This is a data processing method for a Tensor Processing Unit (TPU) according to an exemplary embodiment, the method comprising:
[0107] Step 31: Obtain the time for the MCU within the Tensor Processing Unit (TPU) to execute the predetermined operation;
[0108] Step 32: Determine the reference time for the operation of the MCU and / or TIU within the Tensor Processing Unit (TPU) based on the time it takes for the MCU to perform the predetermined operation, wherein the reference time includes the start time and / or end time of data processing;
[0109] Step 33: Associate the data processed by the MCU and / or the TIU (or GDMA) based on the reference time.
[0110] Step 34: Display the runtime sequence of the predetermined object; wherein the predetermined object includes at least one of the following: GDMA; TIU; MCU; host computer; operator.
[0111] It should be noted that, please refer to Figure 4 The runtime sequence of the predetermined object shown may include at least one of the following:
[0112] The overall runtime sequence is used to display the total time occupied by each data iteration recorded on the host computer;
[0113] The timing sequence of key functions in the host computer is used to display the execution timing of some low-level key functions, including data transmission and command sending.
[0114] The operator runtime sequence is used to display the time range occupied by each functional operator, as well as the operator type and parameter information; height is used to distinguish operator types to meet the needs of parallel display;
[0115] The MCU key function runtime sequence is used to display the time point of each configuration operation, as well as the time period for waiting for each unit to complete its operation;
[0116] GDMA runtime sequence is used to accurately display information such as the actual time, transfer type, number of bytes transferred, and bandwidth of each GDMA operation; and
[0117] The TIU runtime sequence is used to accurately display the actual time, computation type, and utilization rate of each TIU operation.
[0118] In one embodiment, please see again Figure 4 When displaying the runtime sequence of the predetermined object, at least one of the following may also be displayed:
[0119] The zoom slider control includes horizontal and vertical controls; it is used to zoom and slide data blocks to view data details.
[0120] Tags and statistics: different rows display different tags, and statistics include: total time spent, number of records, etc.
[0121] The memory usage curves summarized by space will actually display three curves, which are horizontally summed to represent the total number of bytes recorded in memory usage, the number of bytes read, and the number of bytes written, and are used to analyze the utilization of memory regions.
[0122] The memory usage curve is summarized by time. In fact, three curves are displayed, which are vertically summed for the total number of bytes recorded in memory usage, the number of bytes read, and the number of bytes written. This is used to analyze the memory usage at different times.
[0123] The memory usage space display area displays memory usage records in blocks according to the size of the memory space and the time range.
[0124] The memory usage record displays the start address, end address, start time, end time, read / write flags, and operation-related parameters of the memory.
[0125] In actual use, memory address blocks may be non-contiguous. Displaying them in block segments makes it convenient and efficient to show the effective memory portion.
[0126] Record filters allow you to select a portion of the data to be displayed and hide the rest based on the record's attributes, such as operation type, operator type, or function type.
[0127] In some embodiments, at least one of the following operations can be performed on the display interface:
[0128] Hovering the mouse over each record displays detailed information about that record;
[0129] The mouse wheel can be scrolled horizontally along the time dimension, and related records are stretched or shrunk synchronously.
[0130] The vertical zoom slider is responsible for vertical zoom and display area settings;
[0131] You can drag the coordinate area to display data that is not displayed in the upper, lower, left, and right areas;
[0132] Clicking on a relevant record will center and enlarge it, while other related data will also be synchronized to the corresponding time point.
[0133] The memory display area is optional and can be collapsed; it will not be displayed if there is no memory usage information.
[0134] In one embodiment, the relevant data information is also displayed in a collapsible table. The data displayed in the table is consistent with the record filter above. Please refer to Table 1. Only basic information is shown here. The specific settings can be adjusted according to the actual scenario. When the table header is clicked, each row of data can be sorted in ascending, descending, or original order according to the values of the corresponding columns, making it convenient to find bottleneck data. In addition, the table and related data can be exported as offline files, allowing users to perform offline analysis.
[0135] Table 1:
[0136] Record Category Operation type superior records Memory usage Time usage Parameter information X Y Z A B C
[0137] Figure 5 This is a tensor processing unit (TPU) illustrated according to an exemplary embodiment, the device comprising:
[0138] The acquisition module 51 is used to acquire the time when the first functional unit in the tensor processing unit (TPU) performs a predetermined operation;
[0139] The determining module 52 is used to determine the reference time information of the operation of the first functional unit and / or the second functional unit in the tensor processing unit (TPU) based on the time when the first functional unit performs the predetermined operation, wherein the reference time includes the start time and / or end time of data processing.
[0140] In one embodiment, the device further includes:
[0141] Display module 53 is used to display the associated data based on the reference time.
[0142] In one embodiment, the first functional unit is a microcontroller (MCU); the second functional unit is a global direct memory access unit (GDMA); the determining module 52 is used to determine the start time of the GDMA operation as the end time of the first configuration of GDMA parameters by the MCU, wherein the reference time is the start time of the GDMA operation.
[0143] In one embodiment, the first functional unit is an MCU; the second functional unit is a TIU; the determining module 52 is used for:
[0144] The start time of the TIU operation is determined to be the end time of the first TIU parameter configuration of the MCU;
[0145] And / or,
[0146] The start time of the TIU operation is determined as the end time of the first GDMA record by the MCU, wherein the reference time is the start time of the TIU operation.
[0147] In one embodiment, the determining module 52 is configured to:
[0148] In response to the alignment of the MCU's runtime with the host computer's runtime, the start time of the MCU's runtime is determined to be the end time of the host computer sending the first instruction.
[0149] In one embodiment, the determining module 52 is configured to:
[0150] Based on the correlation between the operator and TIU and GDMA, the start time of the operator's operation is determined as the earliest start time of the MCU recording GDMA and TIU.
[0151] or,
[0152] Based on the relationship between the operator and TIU and GDMA, the end time of the operator's operation is determined as the latest end time of GDMA and TIU recorded by the MCU.
[0153] In one embodiment, the apparatus further includes:
[0154] The structuring module 54 is used to structure the processing data of the first functional unit and / or the second functional unit;
[0155] The matching module 55 is used to match the processed data and the reference time information.
[0156] In one embodiment, the apparatus further includes:
[0157] Display module 53 is used to display the runtime sequence of the predetermined object;
[0158] The predetermined object includes at least one of the following:
[0159] GDMA;
[0160] TIU;
[0161] MCU;
[0162] Host computer;
[0163] Operator.
[0164] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the fingerprint recognition method, and will not be elaborated upon here.
[0165] This disclosure provides an electronic device, the electronic device comprising: a processor and a memory for storing computer services that can run on the processor, wherein, when the processor is used to run the computer services, it implements the method described in any embodiment of this disclosure.
[0166] This disclosure provides a storage medium having computer-executable instructions that are executed by a processor to implement the methods described in any embodiment of this disclosure.
[0167] Figure 6 This is a block diagram illustrating an electronic device 700 according to an exemplary embodiment. For example, the electronic device 700 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0168] Reference Figure 6 The electronic device 700 may include one or more of the following components: a processing component 702, a storage component 704, a power component 706, a multimedia component 708, an audio component 710, an input / output (I / O) interface 712, a sensor component 714, and a communication component 716.
[0169] Processing component 702 typically controls the overall operation of electronic device 700, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 702 may include one or more modules to facilitate interaction between processing component 702 and other components. For example, processing component 702 may include a multimedia module to facilitate interaction between multimedia component 708 and processing component 702.
[0170] Memory 704 is configured to store various types of data to support the operation of electronic device 700. Examples of this data include instructions for any application or method operating on electronic device 700, contact data, phonebook data, messages, pictures, videos, etc. Memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0171] Power component 706 provides power to various components of electronic device 700. Power component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 700.
[0172] Multimedia component 708 includes a screen that provides an output interface between the electronic device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 708 includes a front-facing camera and / or a rear-facing camera. When the electronic device 700 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0173] Audio component 710 is configured to output and / or input audio signals. For example, audio component 710 includes a microphone (MIC) configured to receive external audio signals when electronic device 700 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 704 or transmitted via communication component 716. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.
[0174] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0175] Sensor assembly 714 includes one or more sensors for providing state assessments of various aspects of electronic device 700. For example, sensor assembly 714 can detect the on / off state of electronic device 700, the relative positioning of components such as the display and keypad of electronic device 700, changes in position of electronic device 700 or a component of electronic device 700, the presence or absence of user contact with electronic device 700, orientation or acceleration / deceleration of electronic device 700, and temperature changes of electronic device 700. Sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 714 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.
[0176] Communication component 716 is configured to facilitate wired or wireless communication between electronic device 700 and other devices. Electronic device 700 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 716 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 716 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0177] In an exemplary embodiment, the electronic device 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0178] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, which can be executed by a processor 720 of an electronic device 700 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0179] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the following claims.
[0180] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A data processing method of a tensor processing unit (TPU), comprising: The method comprises: acquiring a time for a first functional unit in a tensor processing unit (TPU) to perform a predetermined operation; determining a reference time for the first functional unit and / or a second functional unit in the tensor processing unit (TPU) to run according to the time for the first functional unit to perform the predetermined operation, wherein the reference time comprises a start time and / or an end time of data processing; associating data processed by the first functional unit based on the reference time of the first functional unit; and / or, associating data processed by the second functional unit based on the reference time of the second functional unit.
2. The method of claim 1, wherein, The method further comprises: displaying the associated data based on the reference time.
3. The method of claim 1, wherein, The first functional unit is a microcontroller unit (MCU), and the second functional unit is a global direct memory access unit (GDMA); and the determining of the reference time for the first functional unit and / or the second functional unit in the tensor processing unit (TPU) to run according to the time for the first functional unit to perform the predetermined operation comprises: determining a start time of the GDMA to be an end time of the MCU to first configure a GDMA parameter, wherein the reference time is the start time of the GDMA.
4. The method of claim 1, wherein, The first functional unit is an MCU, and the second functional unit is a tensor instruction unit (TIU); and the determining of the reference time for the first functional unit and / or the second functional unit in the tensor processing unit (TPU) to run according to the time for the first functional unit to perform the predetermined operation comprises: determining a start time of the TIU to be an end time of the MCU to first configure a TIU parameter; and / or, determining a start time of the TIU to be an end time of the MCU to first record the GDMA, wherein the reference time is the start time of the TIU. The method further comprises:
5. The method of claim 1, wherein, determining the start time of the MCU to be an end time of a host computer to send a first instruction in response to a running time of the MCU being aligned with a running time of the host computer. The method further comprises:
6. The method of claim 1, wherein, determining a start time of an operator to be an earliest start time of the MCU to record the GDMA and the TIU according to an association relationship between the operator and the TIU and the GDMA; or, determining an end time of the operator to be a latest end time of the MCU to record the GDMA and the TIU according to the association relationship between the operator and the TIU and the GDMA. The method further comprises: structuring processing data of the first functional unit and / or the second functional unit; 7. The method of claim 1, wherein, matching the processing data and the reference time. The method further comprises: displaying a running sequence of a predetermined object; 8. The method of claim 1, wherein, wherein the predetermined object comprises at least one of the following: the GDMA; the TIU; the MCU; the host computer; the operator. The apparatus comprises: an acquisition module configured to acquire a time for a first functional unit in a tensor processing unit (TPU) to perform a predetermined operation; 9. A data processing apparatus of a tensor processing unit (TPU), comprising: The determining module is configured to determine a reference time at which the first functional unit and / or the second functional unit run in the tensor processing unit (TPU) according to a time at which the first functional unit performs the predetermined operation, wherein the reference time comprises a start time and / or an end time of data processing; associate data processed by the first functional unit based on the reference time of the first functional unit; and / or associate data processed by the second functional unit based on the reference time of the second functional unit.
10. The apparatus of claim 9, wherein, The apparatus further comprises: The display module is configured to display the associated data based on the reference time.
11. The apparatus of claim 9, wherein, The first functional unit is a micro controller unit (MCU), and the second functional unit is a global direct memory access unit (GDMA). The determining module is configured to determine a start time at which the GDMA runs as an end time at which the MCU first configures a GDMA parameter, wherein the reference time is the start time at which the GDMA runs.
12. The apparatus of claim 9, wherein, The first functional unit is a micro controller unit (MCU), and the second functional unit is a global direct memory access unit (GDMA). The determining module is configured to determine a start time at which the GDMA runs as an end time at which the MCU first configures a GDMA parameter, wherein the reference time is the start time at which the GDMA runs. The determining module is configured to: In response to a running time of the MCU being aligned with a running time of a host computer, determine a start time at which the MCU runs as an end time at which the host computer sends a first instruction. The determining module is configured to:
13. The apparatus of claim 9, wherein, According to an association relationship between the operator and the TIU and the GDMA, determine a start time at which the operator runs as an earliest start time at which the MCU records the GDMA and the TIU; or according to the association relationship between the operator and the TIU and the GDMA, determine an end time at which the operator runs as a latest end time at which the MCU records the GDMA and the TIU. The apparatus further comprises:
14. The apparatus of claim 9, wherein, The structuring module is configured to structure processing data of the first functional unit and / or the second functional unit. The matching module is configured to match the processing data and the reference time. The apparatus further comprises: The display module is configured to display a running sequence of a predetermined object.
15. The apparatus of claim 9, wherein, The predetermined object comprises at least one of the following: The GDMA; The TIU; 16. The apparatus of claim 9, wherein, The MCU; The host computer; The operator. The electronic device comprises a processor and a memory for storing a computer service capable of running on the processor, wherein the processor is configured to run the computer service to implement the method of any one of claims 1 to 8. The storage medium has computer executable instructions, and the computer executable instructions are executed by the processor to implement the method of any one of claims 1 to 8. 17. An electronic device, comprising: 18. A storage medium, characterized by
Citation Information
Patent Citations
Incremental tensor decomposition method and system for open source event association prediction
CN111461193A
Adaptive timing prediction for updating information
CN112396505A