A method and device for locating program error reports based on a hardware accelerator platform
By adding sampling and printing logic to the design code of the GPU core unit, and recording and printing key information, the problem of low efficiency in error reporting and locating of the test program on the Emulation platform was solved, and rapid error reporting and locating on the hardware accelerator platform was achieved.
Patent Information
- Application Number
- CN202410666480.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-28
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-05-28
AI Technical Summary
On the Emulation platform of the GPU core computing unit, it is difficult to locate test program errors. Traditional methods need to be transplanted to other platforms to reproduce, which is very time-consuming and cannot directly use waveforms and log information for location, resulting in low efficiency.
Add additional code to the design code of the GPU core unit, sample key information changes in each clock cycle, record the execution stage and status of the GPU, print the positioning information to the log file through the predefined positioning logic call function, and dynamically open the sampling to Help locate error messages.
It realizes the direct positioning of error information on the hardware accelerator platform, improves the efficiency of error positioning of test programs, and reduces the positioning time. For example, the time is shortened from 3 days to 1 day, and the efficiency is increased by 3 times.
Smart Images

Figure CN118245268B
Abstract
Description
Technical Field
[0001] The disclosed embodiments relate to the field of data processing, and in particular to a method and device for locating program errors based on a hardware accelerator platform. Background Art
[0002] After the GPU core computing unit is designed, it is usually tested based on Emulation (hardware accelerator), but it is very difficult to locate the test program error in Emulation. The traditional positioning method requires porting the test program to other platforms for reproduction and positioning, which is very time-consuming and cannot be directly located based on the waveforms and logs provided by the Emulation platform.
[0003] The specific error information of the GPU core computing unit cannot be directly located on the Emulation platform. This is usually due to the following reasons:
[0004] 1. The GPU architecture determines that there are multiple identical instances of the same core computing unit.
[0005] 2. When the program is running, instructions are discretely distributed to any computing unit for execution; any computing unit may have multiple computing tasks at the same time.
[0006] 3. There is too much information about the execution of the instruction, and it is impossible to accurately and quickly determine the specific distribution path and execution status of the instruction through the waveform and log information, and thus it is impossible to find the instruction that reported the error.
[0007] Therefore, how to improve the efficiency of locating test program errors in Emulation is an urgent problem to be solved. Summary of the invention
[0008] The object of the present invention is to provide a method and device for locating program error reports based on a hardware accelerator platform, so as to at least partially solve the above-mentioned problem.
[0009] According to one aspect of the present disclosure, a method for locating program error reports based on a hardware accelerator platform is proposed, comprising:
[0010] Add extra code to the design code of the GPU core unit. The extra code is used to identify the positioning information.
[0011] Based on the functions of the GPU core unit, the key information changes corresponding to each clock cycle are sampled, and the GPU control data is recorded by sampling, and the current GPU execution stage and status are recorded.
[0012] Based on the predefined positioning logic, in response to sampling the expected key positioning signal, the corresponding function is called to record and pass the key positioning information, and the key positioning information is printed to the log file.
[0013] When running the test program on the hardware accelerator platform and positioning information is needed, the sampling of positioning information is dynamically turned on, and the positioning of the GPU core computing unit is assisted by parsing the log file.
[0014] In some embodiments, the method further includes that the additional code is instantiation information for positioning.
[0015] In some embodiments, the method further includes adding a global sampling switch, and the runtime script of the hardware accelerator performs dynamic switch control to close the sampling switch when the key signal does not change.
[0016] In some embodiments, the method further includes adding a printing level, and a runtime script of the hardware accelerator performs sampling of positioning key information according to a predefined printing level.
[0017] In some embodiments, the method further includes printing the key positioning information to a log file, specifically implementing log printing through a DPI function.
[0018] According to another aspect of the present disclosure, a device for locating program errors based on a hardware accelerator platform is provided, comprising:
[0019] Add a module to add extra code to the design code of the GPU core unit. The extra code is used to identify the positioning information.
[0020] The sampling module is used to sample the key information changes corresponding to each clock cycle based on the functions of the GPU core unit, record the GPU control data through sampling, and record the current GPU execution stage and status.
[0021] The printing module is used to call the corresponding function to record and transmit the key positioning information based on the predefined positioning logic in response to sampling the expected key positioning signal, and print the key positioning information to the log file.
[0022] The running module is used to run the test program on the hardware accelerator platform. When positioning information is needed, it dynamically turns on the sampling of positioning information and assists in locating the GPU core computing unit by parsing the log file.
[0023] In some embodiments, the apparatus further includes: the additional code is instantiation information for positioning.
[0024] In some embodiments, the device further includes adding a global sampling switch, and the runtime script of the hardware accelerator performs dynamic switch control to close the sampling switch when the key signal does not change.
[0025] In some embodiments, the device further includes adding a printing level, and a runtime script of the hardware accelerator performs sampling of positioning key information according to a predefined printing level.
[0026] In some embodiments, the device also includes printing the key positioning information to a log file, specifically implementing log printing through a DPI function.
[0027] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the steps in the method of any of the above embodiments by calling the computer program stored in the memory.
[0028] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, wherein the computer program executes the steps in any of the above method embodiments when executed by a processor.
[0029] The present invention provides a method for locating an error in a test program based on a hardware accelerator platform. When designing a GPU core computing unit, instantiated positioning information is added. Through predefined positioning logic, key signal information required for positioning is sampled and recorded in a time sequence. In a hardware accelerator environment, through the implementation of a DPI function, the predefined key signals are printed to a log file. The printed log file is parsed to assist in locating the problem of the GPU core computing unit. This method can realize a one-time positioning of an error / abnormal instruction directly on the hardware accelerator platform, thereby improving the efficiency of problem locating. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 A schematic diagram of a method for locating program errors based on a hardware accelerator platform test provided in an embodiment of the present application.
[0031] Figure 2 A schematic diagram of the structure of a device for locating program errors based on a hardware accelerator platform test provided in an embodiment of the present application.
[0032] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] The specific embodiments of the present invention are further described below in conjunction with the accompanying drawings. It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0034] It should be noted that, in the description of the present invention, the directions or positional relationships indicated by the terms "up", "down", "left", "right", "front", "back", etc. are descriptions of the structure of the present invention based on the accompanying drawings, and are only for the convenience of describing the present invention, and do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as a limitation on the present invention.
[0035] The "first" and "second" in this technical solution are only used to distinguish the names of the same or similar structures, or corresponding structures with similar functions, and are not an arrangement of the importance of these structures, nor do they have a ranking, comparison of size, or other meanings.
[0036] In addition, unless otherwise clearly specified and limited, the terms "installation" and "connection" should be understood in a broad sense. For example, the connection can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be a connection between the two structures. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood based on the overall idea of the present invention and the specific context of the present solution.
[0037] The present application embodiment provides a method for locating a GPU core computing unit based on a hardware accelerator platform. Specifically, please refer to Figure 1 The basic implementation process of this embodiment is as follows:
[0038] Step S1, adding additional code to the design code of the GPU core unit, where the additional code is used to identify positioning information.
[0039] Emulation usually refers to simulation or emulation. The hardware accelerator platform runs the test program, which actually runs the test for the hardware design in the simulation or emulation environment. In the process of hardware design and verification, the hardware accelerator platform is an efficient tool that allows the behavior of the hardware to be simulated in the software environment before the real hardware is launched. This simulation helps to find problems in the design early and reduce the cost of later modifications and iterations.
[0040] GPU core units vary depending on different GPU architectures and manufacturers, but generally include the following key units, Stream Processors: Also known as shaders or rendering pipes, they are responsible for performing graphics rendering and computing tasks. Stream processors are the most basic computing units in GPUs and can process multiple data items in parallel, greatly improving computing efficiency; Texture Units: Responsible for processing texture mapping tasks, applying texture images to three-dimensional objects to achieve more realistic graphics effects, ROPs (Raster Operations Units): Rasterization processing units, which are responsible for converting rendered images from pixel space to screen space and performing pixel-level operations such as depth testing and color mixing, CUDA cores: In NVIDIA's GPUs, CUDA cores are core units for performing general-purpose parallel computing tasks. They provide powerful computing power, enabling GPUs to be used for a variety of computing-intensive tasks, including scientific computing, data analysis, deep learning, etc. Tensor cores: This is a special computing unit introduced by NVIDIA in Volta and subsequent architectures, specifically used for tensor calculations in deep learning tasks, such as matrix multiplication and convolution operations. The Tensor core is used in combination with deep learning frameworks (such as TensorFlow and PyTorch) to greatly improve the processing speed of deep learning tasks. In addition, the GPU core unit may also include a memory controller, which is responsible for managing and scheduling data transfer between the GPU and the memory; a secondary cache (L2 Cache), which is used to cache frequently accessed data to reduce memory access latency; and a control unit, which is responsible for coordinating and managing the work of various units within the GPU.
[0041] After the design of these core units is completed, in order to verify the functions of the design units, they are generally verified through a hardware accelerator platform. Module instantiation refers to referencing another module in a module and making relevant connections to its ports in hardware design or programming. This process establishes a description hierarchy so that a complex system can be composed of multiple interconnected simple modules. The design method of module instantiation splits a complex hardware system into multiple smaller, more manageable modules, each of which can be designed, tested and verified separately. However, the GPU architecture determines that there are multiple identical instantiations of the same core computing unit. The characteristic of the GPU is that the core computing unit will be instantiated multiple times. When locating, it is necessary to obtain the instantiation sequence number to clarify which instantiation unit is performing the current operation. In one possible implementation, additional code is added to the design code of the GPU core unit to record the instantiation sequence number corresponding to the module currently designed, so that different instantiations corresponding to the same computing unit can be identified, and the signal of the instantiation information is added to the code of the core component to provide a basis for subsequent sampling. This part of the instantiation information used for positioning is isolated and distinguished through macro definitions.
[0042] Step S2, based on the function of the GPU core unit, samples the key information changes corresponding to each clock cycle, records the GPU control data through sampling, and records the stage and state of the current GPU execution.
[0043] In the disclosed embodiment, sampling logic is added to sample the execution path and status of the GPU. Including but not limited to the following information: a. GPU task information, such as: how many task packages are currently issued and the type of each task package. The execution status of each package, whether it has been completed; b. The status of GPU task distribution. How a large computing task is split into multiple small tasks. The current execution status of each small task; c. To which computing unit each small task is distributed. d. The execution status of the computing unit: which instruction is currently being executed; whether there is data reading and writing; whether there are exceptions and errors; instruction execution status.
[0044] In a possible implementation, according to the function of the GPU core unit, the key information changes corresponding to each clock cycle are sampled; if the key signal does not change in a certain clock cycle, no sampling is performed, which can reduce unnecessary resource consumption.
[0045] In a possible implementation, a global switch is added to the sampling logic, and dynamic switch control sampling can be performed through a runtime script of the hardware accelerator.
[0046] In addition, in a possible implementation, a printing level is added to the sampling logic, and the printing level can be set and selected through the runtime script of the hardware accelerator, and the required information can be printed according to the actual situation.
[0047] Step S3, based on the predefined positioning logic, in response to sampling the expected key positioning signal, calling the corresponding function to record and transmit the key positioning information, and printing the key positioning information to the log file.
[0048] In the disclosed embodiment, after successful sampling, the function is called through DPI, the key information is passed as the function parameter, and the parameter is printed to the log file in a specific format. In SystemVerilog, DPI (DirectProgramming Interface) is a mechanism that allows user-defined C / C++ functions to interact with SystemVerilog code. DPI enables SystemVerilog modules to call C / C++ functions, or to use C / C++ functions directly in SystemVerilog code as tasks or functions. Therefore, the above functions can be written through C / C++ functions.
[0049] Step S4, when the test program is run on the hardware accelerator platform and positioning information is needed, the sampling of positioning information is dynamically turned on, and the positioning of the GPU core computing unit is assisted by parsing the log file.
[0050] In a possible implementation, the hardware accelerator platform runs the test program in the following steps:
[0051] Prepare test programs: First, prepare test programs written for the hardware design. These test programs are usually written in a hardware description language (such as Verilog or VHDL) and contain a series of test cases for verifying the hardware design.
[0052] Configure the hardware accelerator environment: The hardware accelerator environment needs to be configured. This usually involves loading the hardware design model, setting simulation parameters (such as clock frequency, simulation time, etc.), and specifying input stimulus (i.e. test data).
[0053] Compile and load the design: Use the hardware accelerator platform's compilation tools to compile the hardware design into a format that can be run in the simulation environment. This typically involves converting the hardware description language code into a simulation model and loading it into the hardware accelerator platform's memory.
[0054] Run the test program: Once the hardware accelerator environment is configured and the design is loaded, you can start running the test program. The hardware accelerator platform will simulate the behavior of the hardware and perform corresponding operations according to the test cases in the test program.
[0055] Monitor and analyze results: While the test program is running, you need to monitor the simulation results and check for any unexpected behavior or errors.
[0056] Debug and modify the design: If the test program finds problems or errors, it is necessary to go back to the hardware design and perform corresponding debugging and modifications. This may involve modifying the hardware description language code, updating the simulation model, or adjusting the simulation parameters.
[0057] Iteration and verification: Repeat the above steps until the hardware design passes all test cases on the hardware accelerator platform and exhibits expected behavior.
[0058] In a possible implementation, when the hardware accelerator is running, the DPI related parameters are turned on, the DPI function is enabled and called, and the instruction generating the error / exception is accurately located with the assistance of the log file.
[0059] In summary, when designing the GPU core computing unit, the disclosed embodiment adds instantiation positioning information, and through predefined positioning logic, the key signal information required for positioning is sampled and recorded in time sequence. In the hardware accelerator environment, through the implementation of the DPI function, the predefined key signals are printed to the log file, and the printed log file is parsed to assist in locating the problem of the GPU core computing unit, which can realize one-time positioning of error / abnormal instructions directly on the hardware accelerator platform, thereby improving the efficiency of problem positioning. Based on the traditional positioning method, it takes at least 3 days to locate a typical hardware accelerator test program error caused by a GPU kernel error. Using this method, the cycle can be shortened to 1 day, and the efficiency can be increased by 3 times.
[0060] To achieve the above purpose, this embodiment proposes a device for locating program error reports based on a hardware accelerator platform. For details, please refer to Figure 2 ,include,
[0061] Add a module to add extra code to the design code of the GPU core unit. The extra code is used to identify the positioning information.
[0062] The sampling module is used to sample the key information changes corresponding to each clock cycle based on the functions of the GPU core unit, record the GPU control data through sampling, and record the current GPU execution stage and status.
[0063] The printing module is used to call the corresponding function to record and transmit the key positioning information based on the predefined positioning logic in response to sampling the expected key positioning signal, and print the key positioning information to the log file.
[0064] The running module is used to run the test program on the hardware accelerator platform. When positioning information is needed, it dynamically turns on the sampling of positioning information and assists in locating the GPU core computing unit by parsing the log file.
[0065] In some embodiments, the apparatus further includes: the additional code is instantiation information for positioning.
[0066] In some embodiments, the device further includes adding a global sampling switch, and the runtime script of the hardware accelerator performs dynamic switch control to close the sampling switch when the key signal does not change.
[0067] In some embodiments, the device further includes adding a printing level, and a runtime script of the hardware accelerator performs sampling of positioning key information according to a predefined printing level.
[0068] In some embodiments, the device also includes printing the key positioning information to a log file, specifically implementing log printing through a DPI function.
[0069] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0070] Accordingly, an embodiment of the present application further provides an electronic device, which may be a terminal or a server. Figure 3 As shown, Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0071] The electronic device 300 includes a processor 301 having one or more processing cores, a memory 302 having one or more computer-readable storage media, and a computer program stored in the memory 302 and executable on the processor. The processor 301 is electrically connected to the memory 302. Those skilled in the art will appreciate that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0072] The processor 301 is the control center of the electronic device 300. It uses various interfaces and lines to connect various parts of the entire electronic device 300, and executes various functions of the electronic device 300 and processes data by running or loading software programs (computer programs) and / or units stored in the memory 302, and calling data stored in the memory 302, thereby monitoring the electronic device 300 as a whole.
[0073] In the embodiment of the present application, the processor 301 in the electronic device 300 will load instructions corresponding to the processes of one or more application programs into the memory 302 according to the following steps, and the processor 301 will run the application programs stored in the memory 302 to implement various functions:
[0074] Add extra code to the design code of the GPU core unit. The extra code is used to identify the positioning information.
[0075] Based on the functions of the GPU core unit, the key information changes corresponding to each clock cycle are sampled, and the GPU control data is recorded by sampling, and the current GPU execution stage and status are recorded.
[0076] Based on the predefined positioning logic, in response to sampling the expected key positioning signal, the corresponding function is called to record and pass the key positioning information, and the key positioning information is printed to the log file.
[0077] When running the test program on the hardware accelerator platform and positioning information is needed, the sampling of positioning information is dynamically turned on, and the positioning of the GPU core computing unit is assisted by parsing the log file.
[0078] The specific implementation of the above operations can be found in the aforementioned embodiments, which will not be described in detail here.
[0079] Optional, such as Figure 3 As shown, the electronic device 300 further includes: an error reporting and locating module 303, a communication module 304, an input unit 305 and a power supply 306. The processor 301 is electrically connected to the error reporting and locating module 303, the communication module 304, the input unit 305 and the power supply 306 respectively. Those skilled in the art can understand that Figure 3 The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0080] The error locating module 303 may be used to implement error locating of a test program based on a hardware accelerator platform.
[0081] The communication module 304 can be used to communicate with other devices.
[0082] The input unit 305 may be used to receive input numbers, character information or user feature information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0083] The power supply 306 is used to supply power to various components of the electronic device 300. Optionally, the power supply 306 can be logically connected to the processor 301 through a power management system, so that the power management system can manage charging, discharging, and power consumption. The power supply 306 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0084] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0085] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0086] To this end, an embodiment of the present application provides a computer-readable storage medium, in which multiple computer programs are stored, and the computer program can be loaded by a processor to execute the steps of a method for locating an error in a test program based on a hardware accelerator platform provided in an embodiment of the present application. For example, the computer program can execute the following steps:
[0087] Add extra code to the design code of the GPU core unit. The extra code is used to identify the positioning information.
[0088] Based on the functions of the GPU core unit, the key information changes corresponding to each clock cycle are sampled, and the GPU control data is recorded by sampling, and the current GPU execution stage and status are recorded.
[0089] Based on the predefined positioning logic, in response to sampling the expected key positioning signal, the corresponding function is called to record and pass the key positioning information, and the key positioning information is printed to the log file.
[0090] When running the test program on the hardware accelerator platform and positioning information is needed, the sampling of positioning information is dynamically turned on, and the positioning of the GPU core computing unit is assisted by parsing the log file.
[0091] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0092] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0093] Since the computer program stored in the storage medium can execute the steps in any one of the methods for locating error reports in a test program based on a hardware accelerator platform provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the methods for locating error reports in a test program based on a hardware accelerator platform provided in the embodiments of the present application can be achieved. For details, please refer to the previous embodiments and will not be repeated here.
[0094] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0095] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0096] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0097] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. For those skilled in the art, various changes, modifications, substitutions and variations of these embodiments are made without departing from the principles and spirit of the present invention, and still fall within the scope of protection of the present invention.
Claims
1. A method for locating program error reports based on a hardware accelerator platform, characterized in that: The method comprises: Add extra code to the design code of the GPU core unit. The extra code is used to identify the positioning information. Based on the functions of the GPU core unit, the key information changes corresponding to each clock cycle are sampled, and the GPU control data is recorded by sampling, and the current GPU execution stage and status are recorded. Based on the predefined positioning logic, in response to sampling the expected key positioning signal, the corresponding function is called to record and pass the key positioning information, and the key positioning information is printed to the log file. When running the test program on the hardware accelerator platform and positioning information is needed, the sampling of positioning information is dynamically turned on, and the positioning of the GPU core computing unit is assisted by parsing the log file.
2. The method according to claim 1, characterized in that: The additional code is instantiation information used for positioning.
3. The method according to claim 1, characterized in that: Add a global sampling switch, dynamically control the switch through the runtime script of the hardware accelerator, and turn off the sampling switch when key information does not change.
4. The method according to any one of claims 1 to 3, characterized in that: Add printing levels, and the runtime script of the hardware accelerator prints key information based on the predefined printing levels.
5. The method according to claim 4, characterized in that: Print key positioning information to the log file, specifically by using the DPI function to implement log printing.
6. A device for locating program errors based on a hardware accelerator platform, characterized in that: The device comprises: Add a module to add extra code to the design code of the GPU core unit. The extra code is used to identify the positioning information. The sampling module is used to sample the key information changes corresponding to each clock cycle based on the functions of the GPU core unit, record the GPU control data through sampling, and record the current GPU execution stage and status. The printing module is used to call the corresponding function to record and transmit the key positioning information based on the predefined positioning logic in response to sampling the expected key positioning signal, and print the key positioning information to the log file. The running module is used to run the test program on the hardware accelerator platform. When positioning information is needed, it dynamically turns on the sampling of positioning information and assists in locating the GPU core computing unit by parsing the log file.
7. The device according to claim 6, characterized in that The device also includes: The additional code is instantiation information used for positioning.
8. The device according to claim 6, characterized in that The device also includes: Add a global sampling switch, dynamically control the switch through the runtime script of the hardware accelerator, and turn off the sampling switch when key information does not change.
9. The device according to claim 8, characterized in that: Add printing levels, and the runtime script of the hardware accelerator prints key information based on the predefined printing levels.
10. The device according to any one of claims 6 to 9, characterized in that: Print key positioning information to the log file, specifically by using the DPI function to implement log printing.
11. An electronic device, characterized in that: It comprises a memory storing executable program code and a processor coupled to the memory; wherein the processor calls the executable program code stored in the memory to execute the method according to any one of claims 1-5.
12. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is performed.
