WO2021232958A1 - Method and apparatus for executing operation, electronic device, and storage medium - Google Patents

Method and apparatus for executing operation, electronic device, and storage medium Download PDF

Info

Publication number
WO2021232958A1
WO2021232958A1 PCT/CN2021/085028 CN2021085028W WO2021232958A1 WO 2021232958 A1 WO2021232958 A1 WO 2021232958A1 CN 2021085028 W CN2021085028 W CN 2021085028W WO 2021232958 A1 WO2021232958 A1 WO 2021232958A1
Authority
WO
WIPO (PCT)
Prior art keywords
neural network
information
network
operator
processing chip
Prior art date
Application number
PCT/CN2021/085028
Other languages
French (fr)
Chinese (zh)
Inventor
谭志鹏
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2021232958A1 publication Critical patent/WO2021232958A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/06Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
    • G06N3/063Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the embodiments of the present application relate to the field of computer technology, and in particular to a method, electronic equipment, device, and storage medium for performing operations.
  • the electronic device can process the specified data based on the neural network, and perform the specified operation according to the processing result.
  • the electronic device needs to perform network inference on the neural network in the central processing unit (English: Central Processing Unit, abbreviation: CPU) after receiving the specified data.
  • the operator calculation part of the neural network needs to be executed in a dedicated processing chip. Since the central processing unit performs a calculation for each operator in the neural network, it is necessary to call a dedicated processing chip once, and transfer the data back and forth between the central processing unit and the dedicated processing chip once. Therefore, the time overhead of the electronic device in this scenario is relatively large, and the processing efficiency is relatively low.
  • the embodiments of the present application provide a method, electronic equipment, device, and storage medium for performing operations.
  • the technical solution is as follows:
  • a method for performing operations which is applied to an electronic device, the electronic device includes a dedicated processing chip, and the method includes:
  • the second neural network is a neural network established according to network information, and the network information is used to instruct the first neural network.
  • the network structure of a neural network
  • a device for performing operations which is applied to an electronic device, the electronic device includes a dedicated processing chip, and the device includes:
  • the information receiving module is used to instruct the central processing unit to receive target information, where the target information is information to be processed by the first neural network;
  • the data acquisition module is used to instruct the dedicated processing chip to process the target information according to a pre-established second neural network to obtain target result data.
  • the second neural network is a neural network established according to network information, and the network information Used to indicate the network structure of the first neural network;
  • a data transmission module for transmitting the target result data back to the central processing unit
  • the operation execution module is used to execute the corresponding operation according to the target result data.
  • an electronic device includes a processor and a memory, and at least one instruction is stored in the memory.
  • the instruction is loaded and executed by the processor to realize This application implements the methods for performing operations provided.
  • a computer-readable storage medium stores at least one instruction, and the instruction is loaded and executed by a processor to implement the execution operation provided by the implementation of the present application. method.
  • a computer program product includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device implements the use method of the secondary cell data provided in the above-mentioned various aspects.
  • Fig. 1 is a structural block diagram of an electronic device provided by an exemplary embodiment of the present application
  • Fig. 2 is a flowchart of a method for performing operations provided by an exemplary embodiment of the present application
  • FIG. 3 is a schematic diagram of an operation method in a related technology involved in an embodiment of the present application.
  • FIG. 4 is a schematic diagram of an operation method involved in an embodiment of the present application.
  • FIG. 5 is a flowchart of a method for performing operations according to another exemplary embodiment of the present application.
  • FIG. 6 is a graph structure of a first neural network based on the embodiment shown in FIG. 5;
  • Fig. 7 is a structural block diagram of a device for performing operations according to an exemplary embodiment of the present application.
  • the deep learning computing framework includes two main modules, namely the network inference module and the operator realization module.
  • the network reasoning module is used to realize network reasoning
  • the operator realization module is used to realize operator calculation.
  • electronic devices usually implement network inference on the CPU and operator calculation on the GPU side.
  • the GPU needs to be called once. Since data is frequently moved and copied between the memory of the CPU and the memory of the GPU, the efficiency of processing the data through the neural network is poor and the time cost is high.
  • the stage that consumes more time is the operator calculation stage executed by the operator realization module.
  • a deep learning network includes dozens or hundreds of layers of operators. Based on this application scenario, the embodiment of the present application provides a method for improving the calculation efficiency of an operator.
  • the embodiments of the present application provide a deep learning computing framework that can reduce the number of calls and memory movement between the CPU and the dedicated processing chip when the CPU and the dedicated processing chip cooperate to perform heterogeneous calculations. frequency.
  • This application can analyze the network model of the first neural network on the CPU side, and then continuously transmit operator information to the dedicated processing chip side. After the analysis of the entire network is completed, the dedicated processing chip will successfully construct a second neural network.
  • the dedicated processing chip side can also fuse operators that can be merged with each other in the second neural network. Then, in the operation process, the CPU side only needs to send one instruction to complete the inference of the entire second neural network on the dedicated processing chip side, obtain the final calculation result and return it to the CPU side, thereby completing the entire processing flow.
  • Dedicated processing chip used to construct the second neural network, and use the second neural network to perform the network inference process according to the target information forwarded by the central processing unit.
  • the dedicated processing chip may be an image processor (English: Graphics Processing Unit, abbreviation: GPU), a digital signal processor (English: Digital Signal Processing, abbreviation: DSP), a neural network processor (English: Neural network Processing) Unit, abbreviation: NPU), tensor processor (English: Tensor Processing Unit, abbreviation: TPU), deep learning processor or brain processor (English: Brain Processing Unit, abbreviation: BPU) one or more of them.
  • image processor English: Graphics Processing Unit, abbreviation: GPU
  • DSP Digital Signal Processing
  • NPU Neural network Processing
  • tensor processor English: Tensor Processing Unit, abbreviation: TPU
  • deep learning processor or brain processor
  • the GPU is designed to accelerate the processing of operations in the image field.
  • the GPU needs to work under the call of the CPU. Therefore, in the actual application process, when the neural network processes data, it always performs calculations through a heterogeneous computing framework that combines CPU and GPU.
  • the CPU analyzes the first neural network.
  • the GPU is called once.
  • the number of times the CPU calls the GPU is 201 times.
  • 200 calls are used to call the GPU to perform operator calculations, and one call is used to initialize the GPU.
  • the CPU After the CPU receives the target information, it can parse out the network information of the first neural network in the initialization phase, and send it to the GPU in the form of initialization instructions.
  • the GPU establishes a second neural network according to the network information, and the next time the CPU sends a running instruction that includes the target information, it will automatically complete the processing of the entire target information on the GPU and feed back the target result data to the CPU.
  • the CPU only needs to send an initialization instruction and a run instruction once throughout the entire process, which greatly reduces the time overhead and memory relocation operations caused by calling the GPU.
  • DSP digital signal processing
  • the NPU simulates human neurons and synapses at the circuit layer, and uses deep learning instruction sets to directly process large-scale neurons and synapses. NPU can realize the integration of storage and calculation through synaptic weights, thereby improving operating efficiency.
  • the TPU can provide high-throughput and low-precision calculations for forward operations of neural networks.
  • the operation of the TPU needs to be controlled by the CPU.
  • the BPU can implement a chip structure through multiple architectures.
  • the architecture supported by the BPU includes at least one of Gaussian architecture, Bernoulli architecture, or Bayesian architecture.
  • specific operations need to be performed in accordance with the control instructions of the CPU.
  • Target information the information to be processed by the first neural network.
  • the target information may be image information or audio information. It should be noted that the target information is the data processed in the inference stage after the first neural network completes the training.
  • the first neural network is used to classify the image information, or the first neural network is used to identify the type of objects in the image information.
  • the target information is audio information
  • the first neural network is used to identify the speaker of the audio information, or the first neural network is used to identify text information in the audio information. It should be noted that the above-mentioned relationship between the target information and the first neural network is only exemplary, and does not substantially limit the form of the relationship between the target information and the first neural network.
  • the target information is information sent by an application layer in the terminal.
  • the terminal can be equipped with a corresponding operating system, and the application program in the operating system interacts with the underlying hardware controlled by the operating system through the application layer.
  • the target information is information forwarded by the terminal to the server.
  • Information sent by the application layer in the terminal is information forwarded by the terminal to the server.
  • the target information may be a picture to be detected.
  • a method for performing operations wherein, applied to an electronic device, the electronic device includes a dedicated processing chip, and the method includes: instructing a central processing unit to receive target information, the target information being information to be processed by a first neural network ; Instruct the dedicated processing chip to process the target information according to a pre-established second neural network to obtain target result data, the second neural network is a neural network established according to network information, and the network information includes the first The network structure and weight information of the neural network; the target result data is transmitted back to the central processing unit; the corresponding operation is performed according to the target result data.
  • the method further includes: when a network construction instruction is received Analyze the first neural network to obtain the network information, where the network information includes graph structure information and weight information of the first neural network; and instruct the dedicated processing chip to establish the first neural network according to the network information 2.
  • a network construction instruction is received Analyze the first neural network to obtain the network information, where the network information includes graph structure information and weight information of the first neural network; and instruct the dedicated processing chip to establish the first neural network according to the network information 2.
  • the instructing the dedicated processing chip to establish the second neural network according to the network information includes: obtaining a global memory of a predetermined storage space in the dedicated processing chip; and according to the data of the dedicated processing chip Specification, storing the network information in the global memory; instructing the dedicated processing chip to establish the second neural network according to the network information.
  • the instructing the dedicated processing chip to establish the second neural network according to the network information includes: obtaining graph structure information and weight information in the network information; and determining according to the graph structure information
  • the weight information determines the corresponding convolution kernel, and the convolution kernel is the input tensor of the corresponding operator.
  • the completion of concatenating the operators in the second neural network according to the identification of the input tensor and the identification of the output tensor of each operator includes: When the first operator is constructed, it is detected whether the first operator has the conditions for fusion with the second operator, and the second operator is an operator that has been constructed in the second neural network; when the When the first operator meets the conditions for fusion with the second operator, the first operator and the second operator are fused; and the network information in the global memory is updated according to the fused operator.
  • the method further includes: determining the number of operator layers of the first neural network according to the graphic structure information; when the number of operator layers is greater than or equal to a threshold value of the number of layers, executing the instruction The step of processing the target information by a dedicated processing chip according to the pre-established second neural network to obtain target result data.
  • the method further includes: deleting the information of the second neural network in the dedicated processing chip in response to the logout of the process invoking the first neural network.
  • the method further includes: in response to the logout of the process calling the first neural network, storing the information of the second neural network in the dedicated processing chip locally, and deleting the dedicated processing chip Information in the second neural network.
  • the method further includes: when the target result data is image recognition data, displaying a frame-selected result area in the recognized target image; or, when the target result data is voice recognition data , Play the synthesized artificial intelligence voice or display the recognized text.
  • the dedicated processing chip includes at least one of the following: an image processor, a digital signal processor, a neural network processor, a tensor processor, a deep learning processor, or a brain processor.
  • the embodiment of the application can instruct the central processing unit to receive the information to be processed by the first neural network in an electronic device including a dedicated processing chip, and instruct the dedicated processing card chip to process the target information according to the pre-established second neural network to obtain target result data , And send the target result data back to the central processing unit, so that the electronic device executes the corresponding operation according to the target result data.
  • the second neural network is a neural network established based on network information, and the network information indicates the network structure of the first neural network, which overcomes the need to use the central processing unit to establish and analyze the neural network and frequently call the dedicated processing chip to execute the neural network.
  • the operator calculation in the network brings about the problems of large time overhead and low calculation efficiency, which improves the calculation efficiency of the neural network without changing the hardware architecture.
  • Electronic devices can include mobile phones, tablets, laptops, desktop computers, all-in-one computers, servers, workstations, TVs, set-top boxes, smart glasses, smart watches, digital cameras, MP4 playback electronic devices, MP5 playback electronic devices, learning machines , Point reading machine, electronic paper book, electronic dictionary or on-board electronic equipment, etc.
  • FIG. 1 is a structural block diagram of an electronic device provided by an exemplary embodiment of the present application.
  • the electronic device includes a processor 120, a memory 140, and a bus 160. At least one instruction is stored, and the instruction is loaded and executed by the processor 120 to implement the method for performing operations as described in each method embodiment of the present application.
  • the processor 120 includes a central processing unit 121 and a dedicated processing chip 122. It should be noted that the central processing unit 121 includes memory, and the dedicated processing chip 122 also includes memory.
  • the processor 120 may include one or more processing cores.
  • the processor 120 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes by running or executing instructions, programs, code sets, or instruction sets stored in the memory 140, and calling data stored in the memory 140.
  • Various functions and processing data of the electronic device 100 may be implemented in a hardware form of at least one of a digital signal processor, a field-programmable gate array (Field-Programmable Gate Array, FPGA), and a programmable logic array (Programmable Logic Array, PLA).
  • the processor 120 may be integrated with one or a combination of a central processing unit, an image processor, and a modem.
  • the CPU mainly processes the operating system, user interface, and application programs; the GPU is used to render and draw the content that needs to be displayed on the display screen; the modem is used to process wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 120, but may be implemented by a chip alone.
  • the memory 140 may include random access memory (RAM), or read-only memory (ROM).
  • the memory 140 includes a non-transitory computer-readable storage medium.
  • the memory 140 may be used to store instructions, programs, codes, code sets or instruction sets.
  • the memory 140 may include a program storage area and a data storage area, where the program storage area may store instructions for implementing the operating system and instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), Instructions used to implement the following method embodiments; the storage data area can store the data involved in the following method embodiments.
  • the bus 160 is used to connect various hardware components in the electronic device to facilitate data interaction between various hardware components.
  • the bus 160 is used to connect the processor 120 and the memory 140, so that the above two pieces of hardware can exchange data.
  • FIG. 2 is a flowchart of a method for performing operations according to an exemplary embodiment of the present application. This method of performing operations can be applied to the electronic device shown in FIG. 1 above.
  • the method of performing operations includes:
  • Step 210 Instruct the central processing unit to receive target information, where the target information is information to be processed by the first neural network.
  • the electronic device is used as the execution subject of the entire solution.
  • the system service or third-party application in the electronic device will call the first neural network to process the target information.
  • the electronic device will initialize the first neural network.
  • the electronic device can instruct the central processing unit to receive target information.
  • the target information may be information sent by the application or service to the CPU, and the information is the information to be processed by the first neural network.
  • the target information may be an image collected by a camera application.
  • Step 220 Instruct the dedicated processing chip to process the target information according to the pre-established second neural network to obtain target result data.
  • the second neural network is a neural network established according to the network information, and the network information includes the network structure and weights of the first neural network. information.
  • the dedicated processing chip in the embodiment of the present application will process the target information according to the second neural network established in advance.
  • the dedicated processing chip can establish a second neural network on the side of the dedicated processing chip when receiving the network information sent by the CPU.
  • a neural network there are five different first neural networks built into electronic devices, namely A neural network, B neural network, C neural network, D neural network, and E neural network.
  • Each neural network has a specific function, please refer to Table 1 for details.
  • the processor when the electronic device executes the corresponding function, the processor will initialize the corresponding first neural network and process the data.
  • the camera application is started as the triggering event of A neural network initialization.
  • the electronic device instructs the CPU to load the information of the A neural network.
  • the CPU sends the network information of the A neural network to the special processing chip, and the special processing chip will establish a second neural network corresponding to the A neural network based on the network information.
  • FIG. 3 is a schematic diagram of an operation method in a related technology involved in an embodiment of the present application.
  • the central processing unit 121 constructs a first neural network including n operators, and initializes the dedicated processing chip 122 in the calling operation 310.
  • each operator needs to call the dedicated processing chip 122 once for calculation. That is, in the operator calculation operation 320, the central processing unit 121 calls the dedicated processing chip 122 a total of n times.
  • the electronic device makes the central processing unit 121 call the dedicated processing chip 122 (n+1) times in total.
  • FIG. 4 is a schematic diagram of an operation method involved in an embodiment of the present application.
  • the central processing unit 121 may execute step 410 and step 420.
  • step 410 when the central processing unit 121 receives the network construction instruction, it parses the first neural network to obtain network information. Among them, the network information is used to indicate the graphic structure information and weight information of the first neural network.
  • step 420 the central processing unit 121 sends network information to the dedicated processing chip 122.
  • the dedicated processing chip 122 establishes a second neural network according to the network information.
  • step 440 when the central processing unit 121 processes the target information, it only needs to send the target information and the running instruction to the dedicated processing chip 122 to complete one running call.
  • the central processing unit 121 can obtain the target result data.
  • the electronic device in order to obtain the result data, causes the central processing unit 121 to call the dedicated processing chip 122 twice.
  • step 230 the target result data is transmitted back to the central processing unit.
  • the electronic device can transmit the target result data back to the central processing unit after the dedicated processing chip calculates the target result data.
  • Step 240 Perform a corresponding operation according to the target result data.
  • the electronic device can also execute the corresponding application operation according to the target result data.
  • the corresponding application operation may be a visible graphic display operation, or a data processing flow that is not visible in the background, which is not limited in the embodiment of the present application.
  • the electronic device may display the recognized face area in the image in the face recognition scene.
  • the electronic device can also play the synthesized artificial intelligence speech or display the recognized text.
  • the method for performing operations provided in this embodiment can instruct the central processing unit to receive the information to be processed by the first neural network in an electronic device that includes a dedicated processing chip, and instruct the dedicated processing card chip according to the pre-established first neural network.
  • the neural network processes the target information, obtains the target result data, and returns the target result data to the central processing unit.
  • the second neural network is a neural network established based on network information, and the network information indicates the network structure of the first neural network, which overcomes the need to use the central processing unit to establish and analyze the neural network and frequently call the dedicated processing chip to execute the neural network.
  • the operator calculation in the network brings about the problems of large time overhead and low calculation efficiency, which improves the calculation efficiency of the neural network without changing the hardware architecture.
  • the electronic device can also establish a second neural network in the dedicated processing chip, thereby reducing the number of calls between the CPU and the dedicated processing chip. Please refer to the following embodiment.
  • FIG. 5 is a flowchart of a method for performing operations according to another exemplary embodiment of the present application. This method of performing operations can be applied to the electronic device shown in FIG. 1 above.
  • the method of performing operations includes:
  • Step 511 When a network construction instruction is received, the first neural network is parsed to obtain network information, and the network information is used to indicate the graph structure information and weight information of the first neural network.
  • the electronic device can trigger the network construction instruction when the application is started or when the function is called. At this time, the electronic device will instruct the CPU to parse the designated first neural network to obtain network information. Among them, because the network information includes graphic structure information and weight information.
  • Step 512 Instruct the dedicated processing chip to establish a second neural network according to the network information.
  • the electronic device can instruct the dedicated processing chip to establish the second neural network based on the network information.
  • the electronic device may also implement step (a1), step (a2), and step (a3) to implement the process of instructing the dedicated processing chip to establish the second neural network based on the network information.
  • step (a1), step (a2), and step (a3) to implement the process of instructing the dedicated processing chip to establish the second neural network based on the network information.
  • Step (a1) Obtain a global memory of a predetermined storage space in a dedicated processing chip.
  • the electronic device can obtain a predetermined storage space of a predetermined size in a dedicated processing chip.
  • the predetermined storage space is a global memory, so that each component in the dedicated processing chip can smoothly access network information.
  • Step (a2) according to the data specification of the dedicated processing chip, store the network information in the global memory.
  • the electronic device may store the network information in accordance with the data specification of the dedicated chip when storing the network information.
  • the data specification is the definition of the second neural network in the dedicated processing chip.
  • the second neural network includes the definition of operators and the definition of tensors. Details are as follows:
  • NetDef represents the entire second neural network, which includes several tensors and operators.
  • the dedicated processing chip reconstructs the second neural network according to the format of the data specification provided in the above-mentioned first neural network by the network information.
  • the electronic device obtains the graph structure information and weight information in the network information; according to the graph structure information, the input tensor and output tensor of each operator are determined. Quantity; according to the identification of the input tensor and the identification of the output tensor of each operator, complete the concatenation of the operators in the second neural network; determine the corresponding convolution according to the weight information
  • the kernel, the convolution kernel is the input tensor of the corresponding operator.
  • the graph structure information can indicate which operator's input tensor is another operator's input tensor.
  • the electronic device can determine the position of the input tensor and the position of the output tensor of each operator according to the graphic structure information. Therefore, it can be seen that the graphic structure information will help each operator complete the concatenation.
  • the dedicated processing chip can also fuse the first operator and the second operator in the second neural network when the operator has the fusion condition.
  • the electronic device can change the name of the output tensor of the first operator to the name of the output tensor of the second operator, and at the same time, follow the information of the fused operator , Update the definition of the first operator in the second neural network.
  • the dedicated processing chip will retain each operator.
  • the first operator when the first operator is constructed by the dedicated processing chip, it is checked whether the first operator meets the conditions for fusion with the second operator.
  • the second operator is the operator that has been constructed in the second neural network.
  • the first operator and the second operator are fused; the network information in the global memory is updated according to the fused operator.
  • Step (a3) instruct the dedicated processing chip to establish a second neural network according to the network information.
  • the electronic device may also implement step (b1), step (b2), and step (b3) to implement the process of instructing the dedicated processing chip to establish the second neural network according to the network information.
  • step (b1), step (b2), and step (b3) to implement the process of instructing the dedicated processing chip to establish the second neural network according to the network information.
  • Step (b1) obtain the graphic structure information and weight information in the network information.
  • Step (b2) according to the graphic structure information, complete the concatenation of the operators in the second neural network.
  • Step (b3) according to the weight information, determine the weight between the operators.
  • the embodiment of the present application is taken as an example to improve the operating efficiency of the dedicated processing chip.
  • the storage space of the dedicated processing chip occupied by the second neural network is released in a corresponding manner.
  • the electronic device deletes the information of the second neural network in the dedicated processing chip in response to the logout of the process calling the first neural network.
  • the electronic device stores the information of the second neural network in the dedicated processing chip locally in response to the logout of the process calling the first neural network.
  • the local storage area may be a non-volatile storage medium, including an external memory of an electronic device.
  • the electronic device deletes the information of the second neural network in the dedicated processing chip.
  • the information of the second neural network includes network information and all the information in the second neural network.
  • Step 520 Receive target information.
  • step 520 is the same as the execution process of step 210, and will not be repeated here.
  • Step 531 Determine the number of operator layers of the first neural network according to the graphic structure information.
  • Step 532 When the number of operator layers is greater than or equal to the threshold value of the number of layers, instruct the dedicated processing chip to process the target information according to the pre-established second neural network to obtain target result data.
  • the electronic device can select whether to enable the operation execution method shown in the present application according to the number of operator layers. That is, when the number of operator levels is greater than or equal to the level threshold, the method for performing operations shown in this application is started.
  • the layer number threshold may be 10, 15, 20, 50, etc., which is not limited in the embodiment of the present application.
  • the first neural network adopts the operation execution method provided in this application when it needs to be optimized.
  • Step 541 When the target result data is image recognition data, display the result area selected by the frame in the recognized target image.
  • Step 542 When the target result data is speech recognition data, play the synthesized artificial intelligence speech or display the recognized text.
  • the electronic device can implement the method for performing operations introduced in the embodiment of the present application by executing step (c1), step (c2), step (c3), and step (c4).
  • the introduction is as follows:
  • the electronic device can analyze the first neural network on the CPU side.
  • the model is analyzed on the CPU side first, and the content of the analysis includes the graphic structure of the model and the weight data of the model.
  • FIG. 6 is a graph structure of a first neural network provided based on the embodiment shown in FIG. 5.
  • the first neural network 600 includes an operator 610, an operator 620, and an operator 630.
  • the operator 610 includes an input tensor 611 and an output tensor 612.
  • the operator 620 includes an input tensor 621 and an output tensor 622.
  • the operator 630 includes an input tensor 631 and an output tensor 632.
  • the first neural network 600 is formed by concatenating several operators, and each operator has several inputs and one output. It should be noted that, except for the final output operator, the output of each operator must be the input of other specified operators.
  • the weight data of the second neural network is the data saved when the first neural network completes the training. In a possible manner, the weight data may be a convolution kernel. Illustratively, the weight data can be used as an input of the operator.
  • Step (c2) the CPU side transfers network information to the dedicated processing chip.
  • the CPU transfers the analyzed graph structure and weight data of the first neural network to the dedicated processing chip at one time. Because the way of expressing the first neural network on the side of the dedicated processing chip is different from that of the CPU.
  • the dedicated processing chip constructs the second neural network, each time an operator is constructed, the fusion of an operator needs to be completed. In other words, the embodiment of the present application can complete the concatenation between operators in a manner that can be understood by the calculation framework of the dedicated processing chip, until all operators are integrated, thereby constructing a second neural network.
  • step (c3) the CPU side sends a running instruction to the dedicated processing chip, so that the dedicated processing chip side completes network inference.
  • the electronic device causes the CPU to send a running instruction to the dedicated processing chip, and the GPU directly calculates the target result data through the second neural network.
  • Step (c4) the dedicated processing chip side returns the target result data of the second neural network to the CPU side. In this step, after the dedicated processing chip obtains the target result data, it only needs to pass the calculation result to the CPU side once.
  • a second neural network is constructed on the side of the dedicated processing chip based on the network information, and the constructed second neural network can be processed exclusively.
  • Chip recognition the dedicated processing chip can place the network information in the global memory of the predetermined storage space, so that the embodiment of the present application can effectively construct the second nerve that the dedicated processing chip can recognize in the dedicated processing chip.
  • the network improves the stability of the operation of electronic equipment based on the neural network.
  • the method for performing operations provided in this embodiment can also effectively reduce frequent calls between the CPU and the dedicated processing chip and memory migration operations in a scenario with a large number of neural network layers.
  • FIG. 7 is a structural block diagram of a device for performing operations according to an exemplary embodiment of the present application.
  • the device for performing operations can be implemented as all or a part of the electronic device through software, hardware, or a combination of the two.
  • the device includes:
  • the information receiving module 710 is configured to instruct the central processing unit to receive target information, where the target information is information to be processed by the first neural network;
  • the data obtaining module 720 is used to instruct the dedicated processing chip to process the target information according to a second neural network established in advance to obtain target result data.
  • the second neural network is a neural network established according to network information. Information indicates the network structure of the first neural network;
  • a data transmission module 730 configured to transmit the target result data back to the central processing unit
  • the operation execution module 740 is configured to execute corresponding operations according to the target result data.
  • the device further includes a network analysis module and a network construction instruction module.
  • the network analysis module is configured to analyze the first neural network to obtain the network information when a network construction instruction is received, and the network information includes graph structure information and weight information of the first neural network;
  • the network construction instruction module is used to instruct the dedicated processing chip to establish the second neural network according to the network information.
  • the network construction instruction module is configured to obtain a global memory of a predetermined storage space in the dedicated processing chip; according to the data specification of the dedicated processing chip, store the network information in In the global memory; instruct the dedicated processing chip to establish the second neural network according to the network information.
  • the network construction instruction module is used to obtain graph structure information and weight information in the network information; and determine the input tensor and output of each operator according to the graph structure information Tensor; according to the identification of the input tensor and the identification of the output tensor of each operator, complete the concatenation of the operators in the second neural network; determine the corresponding volume according to the weight information
  • the product kernel, the convolution kernel is the input tensor of the corresponding operator.
  • the network construction instruction module is configured to detect whether the first operator meets the conditions for fusion with the second operator when the first operator is constructed by the dedicated processing chip,
  • the second operator is an operator that has been constructed in the second neural network; when the first operator meets the conditions for fusion with the second operator, the first operator and the second operator are combined. Two operators are merged; according to the merged operator, the network information in the global memory is updated.
  • the device further includes a layer number determining module.
  • the layer number determining module is configured to determine the number of operator layers of the first neural network according to the graphic structure information; the data obtaining module 720 is configured to determine when the number of operator layers is greater than or equal to a threshold value of the number of layers.
  • the device further includes a first deletion module, configured to log off the information of the second neural network in the dedicated processing chip in response to the process of invoking the first neural network. delete.
  • the device further includes a second deletion module, configured to log off the information of the second neural network in the dedicated processing chip in response to the process of invoking the first neural network. Stored locally, and delete the information of the second neural network in the dedicated processing chip.
  • the data return module 730 is configured to display the frame-selected result area in the recognized target image when the target result data is image recognition data; or, the The data return module 730 is used for playing the synthesized artificial intelligence voice or displaying the recognized text when the target result data is voice recognition data.
  • the dedicated processing chip involved in the device includes at least one of the following: an image processor, a digital signal processor, a neural network processor, a tensor processor, a deep learning processor, or a brain processor.
  • a second neural network is constructed on the side of the dedicated processing chip based on the network information, and the constructed second neural network can be processed exclusively.
  • Chip recognition the dedicated processing chip can place the network information in the global memory of the predetermined storage space, so that the embodiment of the present application can effectively construct the second nerve that the dedicated processing chip can recognize in the dedicated processing chip.
  • the network improves the stability of the operation of electronic equipment based on the neural network.
  • the device for performing operations provided in this embodiment can also effectively reduce frequent calls and memory migration between the CPU and the dedicated processing chip in a scenario with a large number of neural network layers.
  • the embodiments of the present application also provide a computer-readable medium that stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the operations described in each of the above embodiments. method.
  • the device for performing operations provided in the above embodiments executes the method for performing operations provided in this application, only the division of the above functional modules is used for illustration. In actual applications, the above functions can be allocated according to needs. It is completed by different functional modules, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the apparatus for performing operations provided in the above-mentioned embodiments belongs to the same concept as the embodiments of the methods for performing operations. For the specific implementation process, refer to the method embodiments, which will not be repeated here.
  • the program can be stored in a computer-readable storage medium.
  • the storage medium mentioned can be a read-only memory, a magnetic disk or an optical disk, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Neurology (AREA)
  • Image Analysis (AREA)

Abstract

A method and apparatus for executing an operation, an electronic device, and a storage medium, which belong to the technical field of computers. The method comprises: in an electronic device with a dedicated processing chip, instructing a central processing unit to receive information to be processed by a first neural network (210); instructing the dedicated processing chip to process target information according to a pre-established second neural network, so as to obtain target result data (220); and transmitting the target result data back to the central processing unit (230), wherein the second neural network is a neural network established according to network information, and the network information indicates a network structure of the first neural network. The problems in the prior art of a large time overhead and a low calculation efficiency caused by generally establishing and parsing a neural network by means of a central processing unit and frequently calling a dedicated processing chip to execute operator calculation in the neural network are solved, and the operation efficiency of the neural network is improved on the basis of not changing a hardware architecture.

Description

执行操作的方法、电子设备、装置及存储介质Method, electronic equipment, device and storage medium for performing operation
本申请要求于2020年5月18日提交的申请号为202010419847.9、发明名称为“执行操作的方法、电子设备、装置及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed on May 18, 2020, with the application number 202010419847.9 and the invention title "Methods, electronic equipment, devices and storage media for performing operations", the entire contents of which are incorporated herein by reference. Applying.
技术领域Technical field
本申请实施例涉及计算机技术领域,特别涉及一种执行操作的方法、电子设备、装置及存储介质。The embodiments of the present application relate to the field of computer technology, and in particular to a method, electronic equipment, device, and storage medium for performing operations.
背景技术Background technique
随着神经网络技术的快速发展,基于神经网络的应用也在生活中快速应用和普及。With the rapid development of neural network technology, applications based on neural networks are also rapidly applied and popularized in life.
相关技术中,电子设备可以基于神经网络对指定的数据进行处理,并根据处理结果执行指定的操作。首先,电子设备需要在接收到指定的数据后,在中央处理器(英文:Central Processing Unit,缩写:CPU)中对该神经网络进行网络推理。而针对神经网络的算子计算部分,需要在专用处理芯片中执行。由于中央处理器对神经网络中的每一个算子进行一次计算,均需要调用一次专用处理芯片,并将数据在中央处理器和专用处理芯片之间来回转移一次。因此,电子设备在该场景中的时间开销较大,处理效率较低。In the related art, the electronic device can process the specified data based on the neural network, and perform the specified operation according to the processing result. First, the electronic device needs to perform network inference on the neural network in the central processing unit (English: Central Processing Unit, abbreviation: CPU) after receiving the specified data. The operator calculation part of the neural network needs to be executed in a dedicated processing chip. Since the central processing unit performs a calculation for each operator in the neural network, it is necessary to call a dedicated processing chip once, and transfer the data back and forth between the central processing unit and the dedicated processing chip once. Therefore, the time overhead of the electronic device in this scenario is relatively large, and the processing efficiency is relatively low.
发明内容Summary of the invention
本申请实施例提供了一种执行操作的方法、电子设备、装置及存储介质。所述技术方案如下:The embodiments of the present application provide a method, electronic equipment, device, and storage medium for performing operations. The technical solution is as follows:
根据本申请的一方面内容,提供了一种执行操作的方法,应用于电子设备中,所述电子设备包括专用处理芯片,所述方法包括:According to one aspect of the present application, there is provided a method for performing operations, which is applied to an electronic device, the electronic device includes a dedicated processing chip, and the method includes:
指示中央处理器接收目标信息,所述目标信息是第一神经网络待处理的信息;Instruct the central processing unit to receive target information, where the target information is information to be processed by the first neural network;
指示所述专用处理芯片根据预先建立的第二神经网络处理所述目标信息,获取目标结果数据,所述第二神经网络是根据网络信息建立的神经网络,所述网络信息用于指示所述第一神经网络的网络结构;Instruct the dedicated processing chip to process the target information according to a pre-established second neural network to obtain target result data. The second neural network is a neural network established according to network information, and the network information is used to instruct the first neural network. The network structure of a neural network;
将所述目标结果数据传回所述中央处理器;Transmitting the target result data back to the central processing unit;
根据所述目标结果数据,执行对应的操作。Perform corresponding operations according to the target result data.
根据本申请的另一方面内容,提供了一种执行操作的装置,应用于电子设备中,所述电子设备包括专用处理芯片,所述装置包括:According to another aspect of the present application, there is provided a device for performing operations, which is applied to an electronic device, the electronic device includes a dedicated processing chip, and the device includes:
信息接收模块,用于指示中央处理器接收目标信息,所述目标信息是第一神经网络待处理的信息;The information receiving module is used to instruct the central processing unit to receive target information, where the target information is information to be processed by the first neural network;
数据获得模块,用于指示所述专用处理芯片根据预先建立的第二神经网 络处理所述目标信息,获得目标结果数据,所述第二神经网络是根据网络信息建立的神经网络,所述网络信息用于指示所述第一神经网络的网络结构;The data acquisition module is used to instruct the dedicated processing chip to process the target information according to a pre-established second neural network to obtain target result data. The second neural network is a neural network established according to network information, and the network information Used to indicate the network structure of the first neural network;
数据传回模块,用于将所述目标结果数据传回所述中央处理器;A data transmission module for transmitting the target result data back to the central processing unit;
操作执行模块,用于根据所述目标结果数据,执行对应的操作。The operation execution module is used to execute the corresponding operation according to the target result data.
根据本申请的另一方面内容,提供了一种电子设备,所述电子设备包括处理器和存储器,所述存储器中存储有至少一条指令,所述指令由所述处理器加载并执行以实现如本申请实施提供的执行操作的方法。According to another aspect of the present application, an electronic device is provided. The electronic device includes a processor and a memory, and at least one instruction is stored in the memory. The instruction is loaded and executed by the processor to realize This application implements the methods for performing operations provided.
根据本申请的另一方面内容,提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令,所述指令由处理器加载并执行以实现如本申请实施提供的执行操作的方法。According to another aspect of the present application, a computer-readable storage medium is provided, the storage medium stores at least one instruction, and the instruction is loaded and executed by a processor to implement the execution operation provided by the implementation of the present application. method.
根据本申请的一个方面,提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备实现上述各个方面提供的辅小区数据的使用方法。According to one aspect of the present application, a computer program product is provided, the computer program product includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device implements the use method of the secondary cell data provided in the above-mentioned various aspects.
附图说明Description of the drawings
为了更清楚地介绍本申请实施例中的技术方案,下面将对本申请实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to more clearly introduce the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings that need to be used in the description of the embodiments of the present application. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained from these drawings without creative work.
图1是本申请一个示例性实施例提供的一种电子设备的结构框图;Fig. 1 is a structural block diagram of an electronic device provided by an exemplary embodiment of the present application;
图2是本申请一个示例性实施例提供的一种执行操作的方法的流程图;Fig. 2 is a flowchart of a method for performing operations provided by an exemplary embodiment of the present application;
图3是本申请实施例涉及的一种相关技术中运算方式的示意图;FIG. 3 is a schematic diagram of an operation method in a related technology involved in an embodiment of the present application;
图4是本申请实施例涉及的一种运算方式的示意图;FIG. 4 is a schematic diagram of an operation method involved in an embodiment of the present application;
图5是本申请另一个示例性实施例提供的一种执行操作的方法流程图;FIG. 5 is a flowchart of a method for performing operations according to another exemplary embodiment of the present application;
图6是基于图5所示实施例提供的一种第一神经网络的图形结构;FIG. 6 is a graph structure of a first neural network based on the embodiment shown in FIG. 5;
图7是本申请一个示例性实施例提供的一种执行操作的装置的结构框图。Fig. 7 is a structural block diagram of a device for performing operations according to an exemplary embodiment of the present application.
具体实施方式Detailed ways
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the purpose, technical solutions, and advantages of the present application clearer, the implementation manners of the present application will be described in further detail below in conjunction with the accompanying drawings.
下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the application as detailed in the appended claims.
在本申请的描述中,需要理解的是,术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性。在本申请的描述中,需要说明的是,除非另有明确的规定和限定,术语“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是机械 连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本申请中的具体含义。此外,在本申请的描述中,除非另有说明,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。In the description of this application, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance. In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "connected" and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral Ground connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood under specific circumstances. In addition, in the description of this application, unless otherwise specified, "plurality" means two or more. "And/or" describes the association relationship of the associated objects, indicating that there can be three types of relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, and B exists alone. The character "/" generally indicates that the associated objects before and after are in an "or" relationship.
在本申请实施例中,涉及深度学习计算框架。深度学习计算框架包括两个主要的模块,分别是网络推理模块和算子实现模块。其中,网络推理模块用于实现网络推理,算子实现模块用于实现算子计算。In the embodiments of the present application, it relates to a deep learning calculation framework. The deep learning computing framework includes two main modules, namely the network inference module and the operator realization module. Among them, the network reasoning module is used to realize network reasoning, and the operator realization module is used to realize operator calculation.
相关技术中,电子设备通常在CPU实现网络推理,在GPU侧实现算子计算。在该处理方式中,CPU每计算一个算子,均需要调用一次GPU。由于数据在CPU的内存和GPU的内存之间频繁搬移和拷贝,使得通过神经网络处理数据的效率较差,时间开销较高。In related technologies, electronic devices usually implement network inference on the CPU and operator calculation on the GPU side. In this processing method, each time the CPU calculates an operator, the GPU needs to be called once. Since data is frequently moved and copied between the memory of the CPU and the memory of the GPU, the efficiency of processing the data through the neural network is poor and the time cost is high.
示意性的,一个深度学习神经网络计算过程中,时间消耗较多的阶段是算子实现模块执行的算子计算阶段。在一种可能的方式中,一个深度学习网络包括几十层或几百层算子。基于该应用场景,本申请实施例提供一种提高算子计算效率的方法。Illustratively, in a deep learning neural network calculation process, the stage that consumes more time is the operator calculation stage executed by the operator realization module. In one possible way, a deep learning network includes dozens or hundreds of layers of operators. Based on this application scenario, the embodiment of the present application provides a method for improving the calculation efficiency of an operator.
概括而言,本申请实施例提供一种深度学习计算框架,该深度学习计算框架能够在CPU与专用处理芯片配合进行异构计算时,减小CPU与专用处理芯片之间的调用次数以及内存搬移次数。本申请能够在CPU侧解析第一神经网络的网络模型,然后不断向专用处理芯片侧传递算子信息。整个网络解析完成之后,专用处理芯片侧将成功构建出第二神经网络。其中,专用处理芯片侧还可以将第二神经网络中能够相互融合的算子进行融合。然后,在运算过程中,CPU侧仅需发送一条指令,在专用处理芯片侧完成整个第二神经网络的推理,得到最后的计算结果并返回到CPU侧,从而完成整个处理流程。In summary, the embodiments of the present application provide a deep learning computing framework that can reduce the number of calls and memory movement between the CPU and the dedicated processing chip when the CPU and the dedicated processing chip cooperate to perform heterogeneous calculations. frequency. This application can analyze the network model of the first neural network on the CPU side, and then continuously transmit operator information to the dedicated processing chip side. After the analysis of the entire network is completed, the dedicated processing chip will successfully construct a second neural network. Among them, the dedicated processing chip side can also fuse operators that can be merged with each other in the second neural network. Then, in the operation process, the CPU side only needs to send one instruction to complete the inference of the entire second neural network on the dedicated processing chip side, obtain the final calculation result and return it to the CPU side, thereby completing the entire processing flow.
为了本申请实施例所示方案易于理解,下面对本申请实施例中出现的若干名词进行介绍。In order to facilitate the understanding of the solutions shown in the embodiments of the present application, several terms appearing in the embodiments of the present application are introduced below.
专用处理芯片:用于构建第二神经网络,以及根据中央处理器转发的目标信息,使用第二神经网络进行网络推理过程。Dedicated processing chip: used to construct the second neural network, and use the second neural network to perform the network inference process according to the target information forwarded by the central processing unit.
可选地,专用处理芯片可以是图像处理器(英文:Graphics Processing Unit,缩写:GPU)、数字信号处理器(英文:Digital Signal Processing,缩写:DSP)、神经网络处理器(英文:Neural network Processing Unit,缩写:NPU)、张量处理器(英文:Tensor Processing Unit,缩写:TPU)、深度学习处理器或大脑处理器(英文:Brain Processing Unit,缩写:BPU)中的一项或多项。Optionally, the dedicated processing chip may be an image processor (English: Graphics Processing Unit, abbreviation: GPU), a digital signal processor (English: Digital Signal Processing, abbreviation: DSP), a neural network processor (English: Neural network Processing) Unit, abbreviation: NPU), tensor processor (English: Tensor Processing Unit, abbreviation: TPU), deep learning processor or brain processor (English: Brain Processing Unit, abbreviation: BPU) one or more of them.
示意性的,GPU被设计为加速处理图像领域的运算。在实现过程中,GPU需要在CPU的调用下进行工作。因此,在实际应用过程中,神经网络在处理数据时,总是通过CPU和GPU结合的异构计算框架进行计算。Schematically, the GPU is designed to accelerate the processing of operations in the image field. In the implementation process, the GPU needs to work under the call of the CPU. Therefore, in the actual application process, when the neural network processes data, it always performs calculations through a heterogeneous computing framework that combines CPU and GPU.
例如,若第一神经网络中的算子层级是200层(也即该第一神经网络包 括200个算子),则在现有的深度学习计算框架中,CPU对第一神经网络进行解析。在CPU需要对每一个算子进行计算时,调用一次GPU。在该场景中,CPU调用GPU的次数为201次。其中,200次调用用于调用GPU执行算子计算,1次调用用于初始化GPU。For example, if the operator level in the first neural network is 200 layers (that is, the first neural network includes 200 operators), then in the existing deep learning calculation framework, the CPU analyzes the first neural network. When the CPU needs to perform calculations on each operator, the GPU is called once. In this scenario, the number of times the CPU calls the GPU is 201 times. Among them, 200 calls are used to call the GPU to perform operator calculations, and one call is used to initialize the GPU.
若使用本申请实施例提供的方法,则CPU在接收目标信息后,能够在初始化阶段将第一神经网络的网络信息解析出,以初始化指令的方式发送至GPU。GPU根据该网络信息建立第二神经网络,并在下一次CPU发送包括目标信息的运行指令时,将自动在GPU完成整个目标信息的处理,并将目标结果数据反馈给CPU。在该场景中,CPU全程仅需要发送一次初始化指令和一次运行指令,大幅减少了调用GPU带来的时间开销和内存搬迁操作。If the method provided by the embodiment of the present application is used, after the CPU receives the target information, it can parse out the network information of the first neural network in the initialization phase, and send it to the GPU in the form of initialization instructions. The GPU establishes a second neural network according to the network information, and the next time the CPU sends a running instruction that includes the target information, it will automatically complete the processing of the entire target information on the GPU and feed back the target result data to the CPU. In this scenario, the CPU only needs to send an initialization instruction and a run instruction once throughout the entire process, which greatly reduces the time overhead and memory relocation operations caused by calling the GPU.
示意性的,DSP的工作原理是通过接收模拟信号,将模拟信号转换为数字信号,对数字信号进行修改、删除或强化,并在其它系统芯片中把数字数据解译回模拟数据或实际环境格式。Schematically, the working principle of DSP is to receive analog signals, convert analog signals into digital signals, modify, delete or enhance digital signals, and interpret digital data back to analog data or actual environment format in other system chips. .
示意性的,NPU在电路层模拟人类神经元和突触,并且用深度学习指令集直接处理大规模的神经元和突触。NPU能够通过突触权重实现存储和计算一体化,从而提高了运行效率。Schematically, the NPU simulates human neurons and synapses at the circuit layer, and uses deep learning instruction sets to directly process large-scale neurons and synapses. NPU can realize the integration of storage and calculation through synaptic weights, thereby improving operating efficiency.
示意性的,TPU能够提供高吞吐量的低精度计算,用于神经网络的前向运算。在实际应用中,TPU的运行需要由CPU的控制。Illustratively, the TPU can provide high-throughput and low-precision calculations for forward operations of neural networks. In practical applications, the operation of the TPU needs to be controlled by the CPU.
示意性的,BPU能够通过多种架构实现芯片结构。其中,BPU支持的架构包括高斯架构、伯努利架构或贝叶斯架构中至少一种。BPU在当前的应用方式中,需要按照CPU的控制指令执行具体的操作。Illustratively, the BPU can implement a chip structure through multiple architectures. Among them, the architecture supported by the BPU includes at least one of Gaussian architecture, Bernoulli architecture, or Bayesian architecture. In the current application mode of the BPU, specific operations need to be performed in accordance with the control instructions of the CPU.
目标信息:是第一神经网络待处理的信息。例如,该目标信息可以是图像信息,也可以是音频信息。需要说明的是,目标信息是第一神经网络完成训练后在推理阶段处理的数据。Target information: the information to be processed by the first neural network. For example, the target information may be image information or audio information. It should be noted that the target information is the data processed in the inference stage after the first neural network completes the training.
当目标信息是图像信息时,第一神经网络用于对图像信息进行分类,或者,第一神经网络用于识别图像信息中的物体类型。当目标信息是音频信息时,第一神经网络用于识别音频信息的发声者,或,第一神经网路用于识别音频信息中的文字信息。需要说明的是,上述目标信息和第一神经网络之间的关系仅为示例性说明,不对目标信息与第一神经网络之间的关系形式实质限定。When the target information is image information, the first neural network is used to classify the image information, or the first neural network is used to identify the type of objects in the image information. When the target information is audio information, the first neural network is used to identify the speaker of the audio information, or the first neural network is used to identify text information in the audio information. It should be noted that the above-mentioned relationship between the target information and the first neural network is only exemplary, and does not substantially limit the form of the relationship between the target information and the first neural network.
可选地,当电子设备是终端时,目标信息是终端中的应用层发送的信息。需要说明的是,终端中可以搭载相应的操作系统,操作系统中的应用程序通过应用层与操作系统所控制的底层硬件进行交互。Optionally, when the electronic device is a terminal, the target information is information sent by an application layer in the terminal. It should be noted that the terminal can be equipped with a corresponding operating system, and the application program in the operating system interacts with the underlying hardware controlled by the operating system through the application layer.
可选地,当电子设备是服务器时,目标信息是由终端转发至服务器的信息。终端中的应用层发送的信息。Optionally, when the electronic device is a server, the target information is information forwarded by the terminal to the server. Information sent by the application layer in the terminal.
在一种可能的落地实现方案中,例如,当第一神经网络是一个人脸检测网络,则目标信息可以是待检测的图片。In a possible implementation solution, for example, when the first neural network is a face detection network, the target information may be a picture to be detected.
在本申请实施例中,提供有如下技术方案:In the embodiments of this application, the following technical solutions are provided:
一种执行操作的方法,其中,应用于电子设备中,所述电子设备包括专 用处理芯片,所述方法包括:指示中央处理器接收目标信息,所述目标信息是第一神经网络待处理的信息;指示所述专用处理芯片根据预先建立的第二神经网络处理所述目标信息,获取目标结果数据,所述第二神经网络是根据网络信息建立的神经网络,所述网络信息包括所述第一神经网络的网络结构和权值信息;将所述目标结果数据传回所述中央处理器;根据所述目标结果数据,执行对应的操作。A method for performing operations, wherein, applied to an electronic device, the electronic device includes a dedicated processing chip, and the method includes: instructing a central processing unit to receive target information, the target information being information to be processed by a first neural network ; Instruct the dedicated processing chip to process the target information according to a pre-established second neural network to obtain target result data, the second neural network is a neural network established according to network information, and the network information includes the first The network structure and weight information of the neural network; the target result data is transmitted back to the central processing unit; the corresponding operation is performed according to the target result data.
可选地,在所述指示所述专用处理芯片根据所述预先建立的所述第二神经网络处理所述目标信息,获得目标结果数据之前,所述方法还包括:当接收到网络构建指令时,解析所述第一神经网络,获得所述网络信息,所述网络信息包括所述第一神经网络的图形结构信息和权值信息;指示所述专用处理芯片根据所述网络信息建立所述第二神经网络。Optionally, before the instructing the dedicated processing chip to process the target information according to the pre-established second neural network to obtain target result data, the method further includes: when a network construction instruction is received Analyze the first neural network to obtain the network information, where the network information includes graph structure information and weight information of the first neural network; and instruct the dedicated processing chip to establish the first neural network according to the network information 2. Neural network.
可选地,所述指示所述专用处理芯片根据所述网络信息建立所述第二神经网络,包括:在所述专用处理芯片中获取预定存储空间的全局内存;按照所述专用处理芯片的数据规范,将所述网络信息存储在所述全局内存中;指示所述专用处理芯片按照所述网络信息建立所述第二神经网络。Optionally, the instructing the dedicated processing chip to establish the second neural network according to the network information includes: obtaining a global memory of a predetermined storage space in the dedicated processing chip; and according to the data of the dedicated processing chip Specification, storing the network information in the global memory; instructing the dedicated processing chip to establish the second neural network according to the network information.
可选地,所述指示所述专用处理芯片按照所述网络信息建立所述第二神经网络,包括:获取所述网络信息中的图形结构信息和权值信息;根据所述图形结构信息,确定各个算子的输入张量和输出张量;根据各个算子的所述输入张量的标识和所述输出张量的标识,将所述第二神经网络中的算子完成串接;根据所述权值信息,确定对应的卷积核,所述卷积核是对应的算子的输入张量。Optionally, the instructing the dedicated processing chip to establish the second neural network according to the network information includes: obtaining graph structure information and weight information in the network information; and determining according to the graph structure information The input tensor and output tensor of each operator; according to the identifier of the input tensor and the identifier of the output tensor of each operator, complete the concatenation of the operators in the second neural network; The weight information determines the corresponding convolution kernel, and the convolution kernel is the input tensor of the corresponding operator.
可选地,所述根据各个算子的所述输入张量的标识和所述输出张量的标识,将所述第二神经网络中的算子完成串接,包括:当所述专用处理芯片构建完成第一算子时,检测所述第一算子是否具备与第二算子融合的条件,所述第二算子是所述第二神经网络中已经完成构建的算子;当所述第一算子具备与第二算子融合的条件时,将所述第一算子和所述第二算子融合;根据融合后的算子,更新所述全局内存中的网络信息。Optionally, the completion of concatenating the operators in the second neural network according to the identification of the input tensor and the identification of the output tensor of each operator includes: When the first operator is constructed, it is detected whether the first operator has the conditions for fusion with the second operator, and the second operator is an operator that has been constructed in the second neural network; when the When the first operator meets the conditions for fusion with the second operator, the first operator and the second operator are fused; and the network information in the global memory is updated according to the fused operator.
可选地,所述方法还包括:根据所述图形结构信息,确定所述第一神经网络的算子层数;当所述算子层数大于等于层数阈值时,执行所述指示所述专用处理芯片根据所述预先建立的所述第二神经网络处理所述目标信息,获得目标结果数据的步骤。Optionally, the method further includes: determining the number of operator layers of the first neural network according to the graphic structure information; when the number of operator layers is greater than or equal to a threshold value of the number of layers, executing the instruction The step of processing the target information by a dedicated processing chip according to the pre-established second neural network to obtain target result data.
可选地,所述方法还包括:响应于调用所述第一神经网络的进程注销,将所述专用处理芯片中的所述第二神经网络的信息删除。Optionally, the method further includes: deleting the information of the second neural network in the dedicated processing chip in response to the logout of the process invoking the first neural network.
可选地,所述方法还包括:响应于调用所述第一神经网络的进程注销,将所述专用处理芯片中的所述第二神经网络的信息存储在本地,并删除所述专用处理芯片中的所述第二神经网络的信息。Optionally, the method further includes: in response to the logout of the process calling the first neural network, storing the information of the second neural network in the dedicated processing chip locally, and deleting the dedicated processing chip Information in the second neural network.
可选地,所述方法还包括:当所述目标结果数据是图像识别数据时,在被识别的目标图像中显示被框选的结果区域;或,当所述目标结果数据是语音识别数据时,播放合成后的人工智能语音或显示识别出的文本。Optionally, the method further includes: when the target result data is image recognition data, displaying a frame-selected result area in the recognized target image; or, when the target result data is voice recognition data , Play the synthesized artificial intelligence voice or display the recognized text.
可选地,所述专用处理芯片包括以下至少一项:图像处理器、数字信号处理器、神经网络处理器、张量处理器、深度学习处理器或大脑处理器。Optionally, the dedicated processing chip includes at least one of the following: an image processor, a digital signal processor, a neural network processor, a tensor processor, a deep learning processor, or a brain processor.
本申请实施例提供的技术方案带来的有益效果可以包括:The beneficial effects brought about by the technical solutions provided in the embodiments of the present application may include:
本申请实施例能够在包括专用处理芯片的电子设备中,指示中央处理器接收第一神经网络待处理的信息,指示专用处理卡芯片根据预先建立的第二神经网络处理目标信息,获得目标结果数据,并将该目标结果数据回传至中央处理器,令电子设备根据目标结果数据执行对应的操作。其中,第二神经网络是根据网络信息建立的神经网络,网络信息是指示第一神经网络的网络结构,克服了本领域中通常通过中央处理器建立并解析神经网络,频繁调用专用处理芯片执行神经网络中的算子计算,带来的时间开销大和计算效率低的问题,在不改变硬件架构的基础上提高了神经网络的运算效率。The embodiment of the application can instruct the central processing unit to receive the information to be processed by the first neural network in an electronic device including a dedicated processing chip, and instruct the dedicated processing card chip to process the target information according to the pre-established second neural network to obtain target result data , And send the target result data back to the central processing unit, so that the electronic device executes the corresponding operation according to the target result data. Among them, the second neural network is a neural network established based on network information, and the network information indicates the network structure of the first neural network, which overcomes the need to use the central processing unit to establish and analyze the neural network and frequently call the dedicated processing chip to execute the neural network. The operator calculation in the network brings about the problems of large time overhead and low calculation efficiency, which improves the calculation efficiency of the neural network without changing the hardware architecture.
示例性地,本申请实施例所示的执行操作的方法,可以应用在电子设备中,该电子设备具备显示屏且具备运算功能。电子设备可以包括手机、平板电脑、膝上型电脑、台式电脑、电脑一体机、服务器、工作站、电视、机顶盒、智能眼镜、智能手表、数码相机、MP4播放电子设备、MP5播放电子设备、学习机、点读机、电纸书、电子词典或车载电子设备等。Exemplarily, the method for performing operations shown in the embodiments of the present application can be applied to an electronic device that has a display screen and has a computing function. Electronic devices can include mobile phones, tablets, laptops, desktop computers, all-in-one computers, servers, workstations, TVs, set-top boxes, smart glasses, smart watches, digital cameras, MP4 playback electronic devices, MP5 playback electronic devices, learning machines , Point reading machine, electronic paper book, electronic dictionary or on-board electronic equipment, etc.
请参见图1,图1是本申请一个示例性实施例提供的一种电子设备的结构框图,如图1所示,该电子设备包括处理器120、存储器140和总线160,所述存储器140中存储有至少一条指令,所述指令由所述处理器120加载并执行以实现如本申请各个方法实施例所述的执行操作的方法。其中,处理器120包括中央处理器121和专用处理芯片122。需要说明的是,中央处理器121中包括内存,专用处理芯片122中同样包括内存。Please refer to FIG. 1. FIG. 1 is a structural block diagram of an electronic device provided by an exemplary embodiment of the present application. As shown in FIG. 1, the electronic device includes a processor 120, a memory 140, and a bus 160. At least one instruction is stored, and the instruction is loaded and executed by the processor 120 to implement the method for performing operations as described in each method embodiment of the present application. Among them, the processor 120 includes a central processing unit 121 and a dedicated processing chip 122. It should be noted that the central processing unit 121 includes memory, and the dedicated processing chip 122 also includes memory.
处理器120可以包括一个或者多个处理核心。处理器120利用各种接口和线路连接整个电子设备100内的各个部分,通过运行或执行存储在存储器140内的指令、程序、代码集或指令集,以及调用存储在存储器140内的数据,执行电子设备100的各种功能和处理数据。可选的,处理器120可以采用数字信号处理器、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器120可集成中央处理器、图像处理器和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示屏所需要显示的内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器120中,单独通过一块芯片进行实现。The processor 120 may include one or more processing cores. The processor 120 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes by running or executing instructions, programs, code sets, or instruction sets stored in the memory 140, and calling data stored in the memory 140. Various functions and processing data of the electronic device 100. Optionally, the processor 120 may be implemented in a hardware form of at least one of a digital signal processor, a field-programmable gate array (Field-Programmable Gate Array, FPGA), and a programmable logic array (Programmable Logic Array, PLA). The processor 120 may be integrated with one or a combination of a central processing unit, an image processor, and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is used to render and draw the content that needs to be displayed on the display screen; the modem is used to process wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 120, but may be implemented by a chip alone.
存储器140可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory,ROM)。可选的,该存储器140包括非瞬时性计算机可读介质(non-transitory computer-readable storage medium)。存储器140可用于存储指令、程序、代码、代码集或指令集。存储器140可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统 的指令、用于至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等;存储数据区可存储下面各个方法实施例中涉及到的数据等。The memory 140 may include random access memory (RAM), or read-only memory (ROM). Optionally, the memory 140 includes a non-transitory computer-readable storage medium. The memory 140 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 140 may include a program storage area and a data storage area, where the program storage area may store instructions for implementing the operating system and instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), Instructions used to implement the following method embodiments; the storage data area can store the data involved in the following method embodiments.
总线160用于连接电子设备中各个硬件组件,便于各个硬件组件进行数据交互。在本申请实施例中,总线160用于连接处理器120和存储器140,以便上述两个硬件进行数据交换。The bus 160 is used to connect various hardware components in the electronic device to facilitate data interaction between various hardware components. In the embodiment of the present application, the bus 160 is used to connect the processor 120 and the memory 140, so that the above two pieces of hardware can exchange data.
请参考图2,图2是本申请一个示例性实施例提供的一种执行操作的方法的流程图。该执行操作的方法可以应用在上述图1所示的电子设备中。在图2中,该执行操作的方法包括:Please refer to FIG. 2, which is a flowchart of a method for performing operations according to an exemplary embodiment of the present application. This method of performing operations can be applied to the electronic device shown in FIG. 1 above. In Figure 2, the method of performing operations includes:
步骤210,指示中央处理器接收目标信息,目标信息是第一神经网络待处理的信息。Step 210: Instruct the central processing unit to receive target information, where the target information is information to be processed by the first neural network.
在本申请实施例中,电子设备作为整个方案的执行主体。在一些应用场景中,电子设备中的系统服务或者第三方应用将调用第一神经网络处理目标信息。当上述应用或服务需要调用第一神经网络时,电子设备将初始化第一神经网络。其中,电子设备能够指示中央处理器接收目标信息。目标信息可以是应用或服务发送至CPU的信息,该信息是第一神经网络待处理的信息。In the embodiment of the present application, the electronic device is used as the execution subject of the entire solution. In some application scenarios, the system service or third-party application in the electronic device will call the first neural network to process the target information. When the above application or service needs to call the first neural network, the electronic device will initialize the first neural network. Among them, the electronic device can instruct the central processing unit to receive target information. The target information may be information sent by the application or service to the CPU, and the information is the information to be processed by the first neural network.
例如,当第一神经网络是用于识别人脸的模型时,目标信息可以是相机应用采集的图像。For example, when the first neural network is a model for recognizing a human face, the target information may be an image collected by a camera application.
步骤220,指示专用处理芯片根据预先建立的第二神经网络处理目标信息,获取目标结果数据,第二神经网络是根据网络信息建立的神经网络,网络信息包括第一神经网络的网络结构和权值信息。Step 220: Instruct the dedicated processing chip to process the target information according to the pre-established second neural network to obtain target result data. The second neural network is a neural network established according to the network information, and the network information includes the network structure and weights of the first neural network. information.
可选的,本申请实施例中的专用处理芯片将根据预先建立的第二神经网络,处理目标信息。其中,专用处理芯片可以在接收到CPU发出的网络信息时,在专用处理芯片侧建立第二神经网络。Optionally, the dedicated processing chip in the embodiment of the present application will process the target information according to the second neural network established in advance. Among them, the dedicated processing chip can establish a second neural network on the side of the dedicated processing chip when receiving the network information sent by the CPU.
例如,电子设备中内置有5种各不相同的第一神经网络,分别为A神经网络、B神经网络、C神经网络、D神经网络和E神经网络。每种神经网络具有指定的功能,详情请参见表一。For example, there are five different first neural networks built into electronic devices, namely A neural network, B neural network, C neural network, D neural network, and E neural network. Each neural network has a specific function, please refer to Table 1 for details.
表一Table I
A神经网络A neural network B神经网络B neural network C神经网络C neural network D神经网络D neural network E神经网络E neural network
人脸检测Face Detection 车辆号牌识别Vehicle number plate recognition 知识问答Quiz 商品识图Commodity Recognition Map 终端模式判定Terminal mode determination
在表一所示的5种不同的第一神经网络中,当电子设备执行相应的功能时,处理器中将初始化相应的第一神经网络并处理数据。例如,电子设备中以相机应用开启作为A神经网络初始化的触发事件。当电子设备中的相机应用开启时,电子设备指示CPU加载A神经网络的信息。此时,CPU将A神经网络的网络信息发送至专用处理芯片,专用处理芯片将根据网络信息建立A神经网络对应的第二神经网络。In the five different first neural networks shown in Table 1, when the electronic device executes the corresponding function, the processor will initialize the corresponding first neural network and process the data. For example, in the electronic device, the camera application is started as the triggering event of A neural network initialization. When the camera application in the electronic device is started, the electronic device instructs the CPU to load the information of the A neural network. At this time, the CPU sends the network information of the A neural network to the special processing chip, and the special processing chip will establish a second neural network corresponding to the A neural network based on the network information.
请参见图3,图3是本申请实施例涉及的一种相关技术中运算方式的示意图。在图3中,包括中央处理器121和专用处理芯片122。中央处理器121构 建了包括n个算子的第一神经网络,并在调用操作310中对专用处理芯片122进行初始化。在中央处理器121运用第一神经网络处理目标信息时,每一个算子进行运算时,需要调用一次专用处理芯片122。即在算子计算操作320中,中央处理器121调用专用处理芯片122一共n次。在该过程中,电子设备为得到结果数据,共令中央处理器121调用专用处理芯片122(n+1)次。Please refer to FIG. 3, which is a schematic diagram of an operation method in a related technology involved in an embodiment of the present application. In FIG. 3, a central processing unit 121 and a dedicated processing chip 122 are included. The central processing unit 121 constructs a first neural network including n operators, and initializes the dedicated processing chip 122 in the calling operation 310. When the central processing unit 121 uses the first neural network to process the target information, each operator needs to call the dedicated processing chip 122 once for calculation. That is, in the operator calculation operation 320, the central processing unit 121 calls the dedicated processing chip 122 a total of n times. In this process, in order to obtain the result data, the electronic device makes the central processing unit 121 call the dedicated processing chip 122 (n+1) times in total.
请参见图4,图4是本申请实施例涉及的一种运算方式的示意图。在图4中,包括中央处理器121和专用处理芯片122。中央处理器121可以执行步骤410和步骤420。在步骤410中,中央处理器121在接收到网络构建指令时,解析第一神经网络,获得网络信息。其中,网络信息用于指示第一神经网络的图形结构信息和权值信息。在步骤420中,中央处理器121向专用处理芯片122发送网络信息。在步骤430中,专用处理芯片122根据网络信息建立第二神经网络。在在步骤440中,中央处理器121处理目标信息时,仅需将目标信息和运行指令一并发送专用处理芯片122,完成一次运行调用。中央处理器121即可获得目标结果数据。在该过程中,电子设备为得到结果数据,共令中央处理器121调用专用处理芯片122的次数是2次。Please refer to FIG. 4, which is a schematic diagram of an operation method involved in an embodiment of the present application. In FIG. 4, a central processing unit 121 and a dedicated processing chip 122 are included. The central processing unit 121 may execute step 410 and step 420. In step 410, when the central processing unit 121 receives the network construction instruction, it parses the first neural network to obtain network information. Among them, the network information is used to indicate the graphic structure information and weight information of the first neural network. In step 420, the central processing unit 121 sends network information to the dedicated processing chip 122. In step 430, the dedicated processing chip 122 establishes a second neural network according to the network information. In step 440, when the central processing unit 121 processes the target information, it only needs to send the target information and the running instruction to the dedicated processing chip 122 to complete one running call. The central processing unit 121 can obtain the target result data. In this process, in order to obtain the result data, the electronic device causes the central processing unit 121 to call the dedicated processing chip 122 twice.
由上述图3和图4运行情况的对比可知,本申请实施例提供的执行操作的方法,能够有效减少CPU调用专用处理芯片的次数,使得电子设备在运行相同的第一神经网络时,缩短得出目标结果数据的时长。It can be seen from the comparison of the operating conditions of Figures 3 and 4 that the method of performing operations provided by the embodiments of the present application can effectively reduce the number of times that the CPU calls the dedicated processing chip, so that when the electronic device runs the same first neural network, it can be shortened by The duration of the target result data.
步骤230,将目标结果数据传回中央处理器。In step 230, the target result data is transmitted back to the central processing unit.
在本申请实施例中,电子设备能够在专用处理芯片计算得到目标结果数据后,将目标结果数据传回到中央处理器中。In the embodiment of the present application, the electronic device can transmit the target result data back to the central processing unit after the dedicated processing chip calculates the target result data.
步骤240,根据目标结果数据,执行对应的操作。Step 240: Perform a corresponding operation according to the target result data.
在本申请实施例中,电子设备还能够根据目标结果数据,执行对应的应用操作。其中,对应的应用操作既可以是可视的图形显示操作,也可以是后台不可视的数据处理流程,本申请实施例对此不作限定。In the embodiment of the present application, the electronic device can also execute the corresponding application operation according to the target result data. Wherein, the corresponding application operation may be a visible graphic display operation, or a data processing flow that is not visible in the background, which is not limited in the embodiment of the present application.
在一种可能的实现方式中,电子设备可以在人脸识别场景中,在图像中显示被识别出来的人脸区域。In a possible implementation manner, the electronic device may display the recognized face area in the image in the face recognition scene.
在另一种可能的实现方式中,电子设备还可以播放合成后的人工智能语音或显示识别出的文本。In another possible implementation manner, the electronic device can also play the synthesized artificial intelligence speech or display the recognized text.
综上所述,本实施例提供的执行操作的方法,能够在包括专用处理芯片的电子设备中,指示中央处理器接收第一神经网络待处理的信息,指示专用处理卡芯片根据预先建立的第二神经网络处理目标信息,获得目标结果数据,并将该目标结果数据回传至中央处理器。其中,第二神经网络是根据网络信息建立的神经网络,网络信息是指示第一神经网络的网络结构,克服了本领域中通常通过中央处理器建立并解析神经网络,频繁调用专用处理芯片执行神经网络中的算子计算,带来的时间开销大和计算效率低的问题,在不改变硬件架构的基础上提高了神经网络的运算效率。To sum up, the method for performing operations provided in this embodiment can instruct the central processing unit to receive the information to be processed by the first neural network in an electronic device that includes a dedicated processing chip, and instruct the dedicated processing card chip according to the pre-established first neural network. 2. The neural network processes the target information, obtains the target result data, and returns the target result data to the central processing unit. Among them, the second neural network is a neural network established based on network information, and the network information indicates the network structure of the first neural network, which overcomes the need to use the central processing unit to establish and analyze the neural network and frequently call the dedicated processing chip to execute the neural network. The operator calculation in the network brings about the problems of large time overhead and low calculation efficiency, which improves the calculation efficiency of the neural network without changing the hardware architecture.
基于上一个实施例所公开的方案,电子设备还能够在专用处理芯片中建 立第二神经网络,从而减少CPU与专用处理芯片之间的调用次数,请参考如下实施例。Based on the solution disclosed in the previous embodiment, the electronic device can also establish a second neural network in the dedicated processing chip, thereby reducing the number of calls between the CPU and the dedicated processing chip. Please refer to the following embodiment.
请参见图5,图5是本申请另一个示例性实施例提供的一种执行操作的方法流程图。该执行操作的方法可以应用在上述图1所示的电子设备中。在图5中,该执行操作的方法包括:Please refer to FIG. 5, which is a flowchart of a method for performing operations according to another exemplary embodiment of the present application. This method of performing operations can be applied to the electronic device shown in FIG. 1 above. In Figure 5, the method of performing operations includes:
步骤511,当接收到网络构建指令时,解析第一神经网络,获得网络信息,网络信息用于指示第一神经网络的图形结构信息和权值信息。Step 511: When a network construction instruction is received, the first neural network is parsed to obtain network information, and the network information is used to indicate the graph structure information and weight information of the first neural network.
示意性的,电子设备能够在应用启动时或者功能被调用时,触发网络构建指令。此时,电子设备将指示CPU解析指定的第一神经网络,获得网络信息。其中,由于网络信息包括图形结构信息和权值信息。Illustratively, the electronic device can trigger the network construction instruction when the application is started or when the function is called. At this time, the electronic device will instruct the CPU to parse the designated first neural network to obtain network information. Among them, because the network information includes graphic structure information and weight information.
步骤512,指示专用处理芯片根据网络信息建立第二神经网络。Step 512: Instruct the dedicated processing chip to establish a second neural network according to the network information.
示意性的,电子设备能够指示专用处理芯片根据网络信息,建立第二神经网络。Illustratively, the electronic device can instruct the dedicated processing chip to establish the second neural network based on the network information.
在本申请实施例中,电子设备还可以通过执行步骤(a1)、步骤(a2)和步骤(a3)来实现指示专用处理芯片根据网络信息建立第二神经网络的流程。介绍如下:In the embodiment of the present application, the electronic device may also implement step (a1), step (a2), and step (a3) to implement the process of instructing the dedicated processing chip to establish the second neural network based on the network information. The introduction is as follows:
步骤(a1),在专用处理芯片中获取预定存储空间的全局内存。Step (a1): Obtain a global memory of a predetermined storage space in a dedicated processing chip.
可选地,电子设备能够在专用处理芯片中获得预定大小的预定存储空间。并且,该预定存储空间是全局内存,从而有利于专用处理芯片中的各个组件顺利访问到网络信息。Optionally, the electronic device can obtain a predetermined storage space of a predetermined size in a dedicated processing chip. In addition, the predetermined storage space is a global memory, so that each component in the dedicated processing chip can smoothly access network information.
步骤(a2),按照专用处理芯片的数据规范,将网络信息存储在全局内存中。Step (a2), according to the data specification of the dedicated processing chip, store the network information in the global memory.
可选地,为了专用处理芯片中的各个组件顺利访问到网络信息,电子设备可以在存储网络信息时,按照专用芯片的数据规范,对该网络信息进行存储。Optionally, in order for each component in the dedicated processing chip to smoothly access the network information, the electronic device may store the network information in accordance with the data specification of the dedicated chip when storing the network information.
可选地,数据规范是专用处理芯片中对于第二神经网络的定义。在该定义中,第二神经网络包括算子的定义和张量的定义。详情如下:Optionally, the data specification is the definition of the second neural network in the dedicated processing chip. In this definition, the second neural network includes the definition of operators and the definition of tensors. Details are as follows:
Figure PCTCN2021085028-appb-000001
Figure PCTCN2021085028-appb-000001
Figure PCTCN2021085028-appb-000002
Figure PCTCN2021085028-appb-000002
其中,NetDef表示整个第二神经网络,该网络包括若干个张量和算子。针对张量维度dims而言,数据1,224,224,3表示该矩阵维度中的BATCH=1,HEIGHT=224,WIDTH=224,CHANNLE=3。Among them, NetDef represents the entire second neural network, which includes several tensors and operators. For the tensor dimension dims, the data 1,224,224,3 represents BATCH=1, HEIGHT=224, WIDTH=224, and CHANNLE=3 in the matrix dimension.
在本申请实施例中,专用处理芯片将网络信息按照上述第一神经网络中提供的数据规范的格式,重新构建第二神经网络。In the embodiment of the present application, the dedicated processing chip reconstructs the second neural network according to the format of the data specification provided in the above-mentioned first neural network by the network information.
在一种第二神经网络的算子串接方式中,电子设备获取所述网络信息中的图形结构信息和权值信息;根据所述图形结构信息,确定各个算子的输入张量和输出张量;根据各个算子的所述输入张量的标识和所述输出张量的标识,将所述第二神经网络中的算子完成串接;根据所述权值信息,确定对应的卷积核,所述卷积核是对应的算子的输入张量。In a second neural network operator serial connection method, the electronic device obtains the graph structure information and weight information in the network information; according to the graph structure information, the input tensor and output tensor of each operator are determined. Quantity; according to the identification of the input tensor and the identification of the output tensor of each operator, complete the concatenation of the operators in the second neural network; determine the corresponding convolution according to the weight information The kernel, the convolution kernel is the input tensor of the corresponding operator.
需要说明的是,图形结构信息可以指示哪一个算子的输入张量是另一个算子的输入张量。电子设备能够根据该图形结构信息,确定各个算子的输入张量的位置和输出张量的位置。因此可见,图形结构信息将有助于各个算子之间完成串接。It should be noted that the graph structure information can indicate which operator's input tensor is another operator's input tensor. The electronic device can determine the position of the input tensor and the position of the output tensor of each operator according to the graphic structure information. Therefore, it can be seen that the graphic structure information will help each operator complete the concatenation.
在一种可能的方式中,专用处理芯片还能够在算子具备融合条件时,将第二神经网络中的第一算子和第二算子进行融合。当第一算子和第二算子融合后,电子设备可以将第一算子的输出张量的名称更改为第二算子的输出张量的名称,同时,按照融合后的算子的信息,更新第一算子在第二神经网络中的定义。In a possible manner, the dedicated processing chip can also fuse the first operator and the second operator in the second neural network when the operator has the fusion condition. After the first operator and the second operator are fused, the electronic device can change the name of the output tensor of the first operator to the name of the output tensor of the second operator, and at the same time, follow the information of the fused operator , Update the definition of the first operator in the second neural network.
另一方面,当第二神经网络中的算子之前不能融合时,专用处理芯片将保留各个算子。On the other hand, when the operators in the second neural network cannot be merged before, the dedicated processing chip will retain each operator.
在一种执行方式中,当专用处理芯片构建完成第一算子时,检测第一算子是否具备与第二算子融合的条件,第二算子是第二神经网络中已经完成构建的算子;当第一算子具备与第二算子融合的条件时,将第一算子和第二算子融合;根据融合后的算子,更新全局内存中的网络信息。In one execution mode, when the first operator is constructed by the dedicated processing chip, it is checked whether the first operator meets the conditions for fusion with the second operator. The second operator is the operator that has been constructed in the second neural network. When the first operator meets the conditions for fusion with the second operator, the first operator and the second operator are fused; the network information in the global memory is updated according to the fused operator.
步骤(a3),指示专用处理芯片按照网络信息建立第二神经网络。Step (a3), instruct the dedicated processing chip to establish a second neural network according to the network information.
在另一种可能的实现方式中,电子设备还可以通过执行步骤(b1)、步骤(b2)和步骤(b3)来实现指示专用处理芯片根据网络信息建立第二神经网络的流程。介绍如下:In another possible implementation manner, the electronic device may also implement step (b1), step (b2), and step (b3) to implement the process of instructing the dedicated processing chip to establish the second neural network according to the network information. The introduction is as follows:
步骤(b1),获取网络信息中的图形结构信息和权值信息。Step (b1), obtain the graphic structure information and weight information in the network information.
步骤(b2),根据图形结构信息,将第二神经网络中的算子完成串接。Step (b2), according to the graphic structure information, complete the concatenation of the operators in the second neural network.
步骤(b3),根据权值信息,确定算子之间的权值。Step (b3), according to the weight information, determine the weight between the operators.
需要说明的是,由于第二神经网络占据一定的存储空间,本申请实施例 为例提高专用处理芯片的运行效率。在调用第一神经网络的进程注销时,通过相应的方式释放第二神经网络占用的专用处理芯片的存储空间。It should be noted that, since the second neural network occupies a certain storage space, the embodiment of the present application is taken as an example to improve the operating efficiency of the dedicated processing chip. When the process calling the first neural network is logged off, the storage space of the dedicated processing chip occupied by the second neural network is released in a corresponding manner.
在一种可能的实现方式中,电子设备响应于调用第一神经网络的进程注销,将专用处理芯片中的第二神经网络的信息删除。In a possible implementation manner, the electronic device deletes the information of the second neural network in the dedicated processing chip in response to the logout of the process calling the first neural network.
在另一种可能的实现方式中,电子设备响应于调用第一神经网络的进程注销,将专用处理芯片中的第二神经网络的信息存储在本地。其中,本地的存储区域可以是非易失性存储介质,包括电子设备的外部存储器。当第二神经网络的信息已经存储在电子设备的本地时,电子设备将专用处理芯片中的第二神经网络的信息删除。需要说明的是,第二神经网络的信息包括网络信息和第二神经网络中的全部信息。In another possible implementation manner, the electronic device stores the information of the second neural network in the dedicated processing chip locally in response to the logout of the process calling the first neural network. Wherein, the local storage area may be a non-volatile storage medium, including an external memory of an electronic device. When the information of the second neural network has been stored locally in the electronic device, the electronic device deletes the information of the second neural network in the dedicated processing chip. It should be noted that the information of the second neural network includes network information and all the information in the second neural network.
步骤520,接收目标信息。Step 520: Receive target information.
在本申请实施例中,步骤520的执行过程和步骤210的执行过程相同,此处不再赘述。In the embodiment of the present application, the execution process of step 520 is the same as the execution process of step 210, and will not be repeated here.
步骤531,根据图形结构信息,确定第一神经网络的算子层数。Step 531: Determine the number of operator layers of the first neural network according to the graphic structure information.
步骤532,当算子层数大于等于层数阈值时,指示专用处理芯片根据预先建立的第二神经网络处理目标信息,获取目标结果数据。Step 532: When the number of operator layers is greater than or equal to the threshold value of the number of layers, instruct the dedicated processing chip to process the target information according to the pre-established second neural network to obtain target result data.
在本申请实施例中,电子设备能够根据算子层数选择是否开启本申请所示的执行操作的方法。即当算子层数大于等于层数阈值时,启动执行本申请所示的执行操作的方法。示意性的,层数阈值可以是10、15、20或50等,本申请实施例对此不作限定。In the embodiment of the present application, the electronic device can select whether to enable the operation execution method shown in the present application according to the number of operator layers. That is, when the number of operator levels is greater than or equal to the level threshold, the method for performing operations shown in this application is started. Illustratively, the layer number threshold may be 10, 15, 20, 50, etc., which is not limited in the embodiment of the present application.
需要说明的是,当第一神经网络的算子层数大于层数阈值时,说明第一神经网络的结构较为复杂,采用传统的架构将导致较长的计算时长。因此,本申请通过设置层数阈值,使得第一神经网络在需要被优化时采用本申请提供的执行操作的方法。It should be noted that when the number of operator layers of the first neural network is greater than the threshold value of the number of layers, it indicates that the structure of the first neural network is relatively complicated, and the use of a traditional architecture will lead to a longer calculation time. Therefore, in this application, by setting the layer number threshold, the first neural network adopts the operation execution method provided in this application when it needs to be optimized.
步骤541,当目标结果数据是图像识别数据时,在被识别的目标图像中显示被框选的结果区域。Step 541: When the target result data is image recognition data, display the result area selected by the frame in the recognized target image.
步骤542,当目标结果数据是语音识别数据时,播放合成后的人工智能语音或显示识别出的文本。Step 542: When the target result data is speech recognition data, play the synthesized artificial intelligence speech or display the recognized text.
可选的,在一种可能的应用场景中,电子设备能够通过执行步骤(c1)、步骤(c2)、步骤(c3)和步骤(c4)来实现本申请实施例介绍的执行操作的方法,介绍如下:Optionally, in a possible application scenario, the electronic device can implement the method for performing operations introduced in the embodiment of the present application by executing step (c1), step (c2), step (c3), and step (c4). The introduction is as follows:
步骤(c1),电子设备能够在CPU侧解析第一神经网络。第一神经网络输入到电子设备的深度学习计算框架后,先在CPU侧进行模型的解析,解析的内容包括模型的图形结构和模型的权值数据。请参见图6,图6是基于图5所示实施例提供的一种第一神经网络的图形结构。在图6中,第一神经网络600包括算子610、算子620和算子630。其中,算子610包括输入张量611和输出张量612。算子620包括输入张量621和输出张量622。算子630包括输入张量631和输出张量632。其中,第一神经网络600由若干个算子串接而成,每个算子有若干个输入和一个输出。需要说明的是,除了最终输出结果的算 子外,其余每一个算子的输出一定是其它指定的算子的输入。第二神经网络的权值数据是第一神经网络完成训练时保存的数据。在一种可能的方式中,该权值数据可以是卷积核。示意性的,权值数据可以作为算子的一个输入。In step (c1), the electronic device can analyze the first neural network on the CPU side. After the first neural network is input to the deep learning calculation framework of the electronic device, the model is analyzed on the CPU side first, and the content of the analysis includes the graphic structure of the model and the weight data of the model. Please refer to FIG. 6. FIG. 6 is a graph structure of a first neural network provided based on the embodiment shown in FIG. 5. In FIG. 6, the first neural network 600 includes an operator 610, an operator 620, and an operator 630. Among them, the operator 610 includes an input tensor 611 and an output tensor 612. The operator 620 includes an input tensor 621 and an output tensor 622. The operator 630 includes an input tensor 631 and an output tensor 632. Among them, the first neural network 600 is formed by concatenating several operators, and each operator has several inputs and one output. It should be noted that, except for the final output operator, the output of each operator must be the input of other specified operators. The weight data of the second neural network is the data saved when the first neural network completes the training. In a possible manner, the weight data may be a convolution kernel. Illustratively, the weight data can be used as an input of the operator.
步骤(c2),CPU侧向专用处理芯片传递网络信息。其中,CPU将已经解析好的第一神经网络的图形结构和权值数据一次性传递到专用处理芯片侧。由于专用处理芯片侧表达第一神经网络的方式不同于CPU的表达方式。在本申请实施例中,专用处理芯片在构建第二神经网络时,每构建一个算子,就需要完成一个算子的融合。换言之,本申请实施例能够按照专用处理芯片的计算框架能够理解的方式,完成算子之间的串接,直至将所有算子完成融合,从而构建出第二神经网络。Step (c2), the CPU side transfers network information to the dedicated processing chip. Among them, the CPU transfers the analyzed graph structure and weight data of the first neural network to the dedicated processing chip at one time. Because the way of expressing the first neural network on the side of the dedicated processing chip is different from that of the CPU. In the embodiment of the present application, when the dedicated processing chip constructs the second neural network, each time an operator is constructed, the fusion of an operator needs to be completed. In other words, the embodiment of the present application can complete the concatenation between operators in a manner that can be understood by the calculation framework of the dedicated processing chip, until all operators are integrated, thereby constructing a second neural network.
步骤(c3),CPU侧向专用处理芯片发送运行指令,令专用处理芯片侧完成网络推理。电子设备在专用处理芯片完成网络构建之后,令CPU向专用处理芯片发送一次运行指令,GPU直接通过第二神经网络计算出目标结果数据。In step (c3), the CPU side sends a running instruction to the dedicated processing chip, so that the dedicated processing chip side completes network inference. After the dedicated processing chip completes the network construction, the electronic device causes the CPU to send a running instruction to the dedicated processing chip, and the GPU directly calculates the target result data through the second neural network.
步骤(c4),专用处理芯片侧将第二神经网络的目标结果数据返回到CPU侧。在本步骤中,专用处理芯片获得目标结果数据后,仅需要传递一次计算结果到CPU侧。Step (c4), the dedicated processing chip side returns the target result data of the second neural network to the CPU side. In this step, after the dedicated processing chip obtains the target result data, it only needs to pass the calculation result to the CPU side once.
综上所述,本实施例根据在中央处理器解析出第一神经网络的网络信息后,在专用处理芯片侧根据该网络信息构建第二神经网络,构建后的第二神经网络能够被专用处理芯片识别,在构建的过程中,专用处理芯片能够将网络信息放置在预定存储空间的全局内存中,使得本申请实施例能够有效地在专用处理芯片中构建该专用处理芯片能够识别的第二神经网络,提高了电子设备基于神经网络运行的稳定性。In summary, in this embodiment, after the central processing unit parses out the network information of the first neural network, a second neural network is constructed on the side of the dedicated processing chip based on the network information, and the constructed second neural network can be processed exclusively. Chip recognition. During the construction process, the dedicated processing chip can place the network information in the global memory of the predetermined storage space, so that the embodiment of the present application can effectively construct the second nerve that the dedicated processing chip can recognize in the dedicated processing chip. The network improves the stability of the operation of electronic equipment based on the neural network.
本实施例提供的执行操作的方法,还能够在神经网络层数较多的场景下,有效减少CPU与专用处理芯片之间的频繁调用以及内存搬迁操作。The method for performing operations provided in this embodiment can also effectively reduce frequent calls between the CPU and the dedicated processing chip and memory migration operations in a scenario with a large number of neural network layers.
下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。The following are device embodiments of this application, which can be used to implement the method embodiments of this application. For details that are not disclosed in the device embodiments of this application, please refer to the method embodiments of this application.
请参考图7,图7是本申请一个示例性实施例提供的一种执行操作的装置的结构框图。该执行操作的装置可以通过软件、硬件或者两者的结合实现成为电子设备的全部或一部分。该装置包括:Please refer to FIG. 7, which is a structural block diagram of a device for performing operations according to an exemplary embodiment of the present application. The device for performing operations can be implemented as all or a part of the electronic device through software, hardware, or a combination of the two. The device includes:
信息接收模块710,用于指示中央处理器接收目标信息,所述目标信息是第一神经网络待处理的信息;The information receiving module 710 is configured to instruct the central processing unit to receive target information, where the target information is information to be processed by the first neural network;
数据获得模块720,用于指示所述专用处理芯片根据预先建立的第二神经网络处理所述目标信息,获得目标结果数据,所述第二神经网络是根据网络信息建立的神经网络,所述网络信息是指示所述第一神经网络的网络结构;The data obtaining module 720 is used to instruct the dedicated processing chip to process the target information according to a second neural network established in advance to obtain target result data. The second neural network is a neural network established according to network information. Information indicates the network structure of the first neural network;
数据传回模块730,用于将所述目标结果数据传回所述中央处理器;A data transmission module 730, configured to transmit the target result data back to the central processing unit;
操作执行模块740,用于根据所述目标结果数据,执行对应的操作。The operation execution module 740 is configured to execute corresponding operations according to the target result data.
在一个可选的实施例中,所述装置还包括网络解析模块和建网指示模块。所述网络解析模块,用于当接收到网络构建指令时,解析所述第一神经网络, 获得所述网络信息,所述网络信息包括所述第一神经网络的图形结构信息和权值信息;所述建网指示模块,用于指示所述专用处理芯片根据所述网络信息建立所述第二神经网络。In an optional embodiment, the device further includes a network analysis module and a network construction instruction module. The network analysis module is configured to analyze the first neural network to obtain the network information when a network construction instruction is received, and the network information includes graph structure information and weight information of the first neural network; The network construction instruction module is used to instruct the dedicated processing chip to establish the second neural network according to the network information.
在一个可选的实施例中,所述建网指示模块,用于在所述专用处理芯片中获取预定存储空间的全局内存;按照所述专用处理芯片的数据规范,将所述网络信息存储在所述全局内存中;指示所述专用处理芯片按照所述网络信息建立所述第二神经网络。In an optional embodiment, the network construction instruction module is configured to obtain a global memory of a predetermined storage space in the dedicated processing chip; according to the data specification of the dedicated processing chip, store the network information in In the global memory; instruct the dedicated processing chip to establish the second neural network according to the network information.
在一个可选的实施例中,所述建网指示模块,用于获取所述网络信息中的图形结构信息和权值信息;根据所述图形结构信息,确定各个算子的输入张量和输出张量;根据各个算子的所述输入张量的标识和所述输出张量的标识,将所述第二神经网络中的算子完成串接;根据所述权值信息,确定对应的卷积核,所述卷积核是对应的算子的输入张量。In an optional embodiment, the network construction instruction module is used to obtain graph structure information and weight information in the network information; and determine the input tensor and output of each operator according to the graph structure information Tensor; according to the identification of the input tensor and the identification of the output tensor of each operator, complete the concatenation of the operators in the second neural network; determine the corresponding volume according to the weight information The product kernel, the convolution kernel is the input tensor of the corresponding operator.
在一个可选的实施例中,所述建网指示模块,用于当所述专用处理芯片构建完成第一算子时,检测所述第一算子是否具备与第二算子融合的条件,所述第二算子是所述第二神经网络中已经完成构建的算子;当所述第一算子具备与第二算子融合的条件时,将所述第一算子和所述第二算子融合;根据融合后的算子,更新所述全局内存中的网络信息。In an optional embodiment, the network construction instruction module is configured to detect whether the first operator meets the conditions for fusion with the second operator when the first operator is constructed by the dedicated processing chip, The second operator is an operator that has been constructed in the second neural network; when the first operator meets the conditions for fusion with the second operator, the first operator and the second operator are combined. Two operators are merged; according to the merged operator, the network information in the global memory is updated.
在一个可选的实施例中,所述装置还包括层数确定模块。所述层数确定模块,用于根据所述图形结构信息,确定所述第一神经网络的算子层数;所述数据获得模块720,用于当所述算子层数大于等于层数阈值时,指示所述专用处理芯片根据预先建立的所述第二神经网络处理所述目标信息,获得目标结果数据。In an optional embodiment, the device further includes a layer number determining module. The layer number determining module is configured to determine the number of operator layers of the first neural network according to the graphic structure information; the data obtaining module 720 is configured to determine when the number of operator layers is greater than or equal to a threshold value of the number of layers. When, instruct the dedicated processing chip to process the target information according to the pre-established second neural network to obtain target result data.
在一个可选的实施例中,所述装置还包括第一删除模块,用于响应于调用所述第一神经网络的进程注销,将所述专用处理芯片中的所述第二神经网络的信息删除。In an optional embodiment, the device further includes a first deletion module, configured to log off the information of the second neural network in the dedicated processing chip in response to the process of invoking the first neural network. delete.
在一个可选的实施例中,所述装置还包括第二删除模块,用于响应于调用所述第一神经网络的进程注销,将所述专用处理芯片中的所述第二神经网络的信息存储在本地,并删除所述专用处理芯片中的所述第二神经网络的信息。In an optional embodiment, the device further includes a second deletion module, configured to log off the information of the second neural network in the dedicated processing chip in response to the process of invoking the first neural network. Stored locally, and delete the information of the second neural network in the dedicated processing chip.
在一个可选的实施例中,所述数据传回模块730,用于当所述目标结果数据是图像识别数据时,在被识别的目标图像中显示被框选的结果区域;或,所述数据传回模块730,用于当所述目标结果数据是语音识别数据时,播放合成后的人工智能语音或显示识别出的文本。In an optional embodiment, the data return module 730 is configured to display the frame-selected result area in the recognized target image when the target result data is image recognition data; or, the The data return module 730 is used for playing the synthesized artificial intelligence voice or displaying the recognized text when the target result data is voice recognition data.
在一个可选的实施例中,所述装置涉及的所述专用处理芯片包括以下至少一项:图像处理器、数字信号处理器、神经网络处理器、张量处理器、深度学习处理器或大脑处理器。In an optional embodiment, the dedicated processing chip involved in the device includes at least one of the following: an image processor, a digital signal processor, a neural network processor, a tensor processor, a deep learning processor, or a brain processor.
综上所述,本实施例根据在中央处理器解析出第一神经网络的网络信息后,在专用处理芯片侧根据该网络信息构建第二神经网络,构建后的第二神经网络能够被专用处理芯片识别,在构建的过程中,专用处理芯片能够将网 络信息放置在预定存储空间的全局内存中,使得本申请实施例能够有效地在专用处理芯片中构建该专用处理芯片能够识别的第二神经网络,提高了电子设备基于神经网络运行的稳定性。In summary, in this embodiment, after the central processing unit parses out the network information of the first neural network, a second neural network is constructed on the side of the dedicated processing chip based on the network information, and the constructed second neural network can be processed exclusively. Chip recognition. During the construction process, the dedicated processing chip can place the network information in the global memory of the predetermined storage space, so that the embodiment of the present application can effectively construct the second nerve that the dedicated processing chip can recognize in the dedicated processing chip. The network improves the stability of the operation of electronic equipment based on the neural network.
本实施例提供的执行操作的装置,还能够在神经网络层数较多的场景下,有效减少CPU与专用处理芯片之间的频繁调用以及内存搬迁。The device for performing operations provided in this embodiment can also effectively reduce frequent calls and memory migration between the CPU and the dedicated processing chip in a scenario with a large number of neural network layers.
本申请实施例还提供了一种计算机可读介质,该计算机可读介质存储有至少一条指令,所述至少一条指令由所述处理器加载并执行以实现如上各个实施例所述的执行操作的方法。The embodiments of the present application also provide a computer-readable medium that stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the operations described in each of the above embodiments. method.
需要说明的是:上述实施例提供的执行操作的装置在执行本申请提供的执行操作的方法时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部构造划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的执行操作的装置与执行操作的方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that when the device for performing operations provided in the above embodiments executes the method for performing operations provided in this application, only the division of the above functional modules is used for illustration. In actual applications, the above functions can be allocated according to needs. It is completed by different functional modules, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus for performing operations provided in the above-mentioned embodiments belongs to the same concept as the embodiments of the methods for performing operations. For the specific implementation process, refer to the method embodiments, which will not be repeated here.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the foregoing embodiments of the present application are for description only, and do not represent the superiority or inferiority of the embodiments.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the above embodiments can be implemented by hardware, or by instructing related hardware through a program. The program can be stored in a computer-readable storage medium. The storage medium mentioned can be a read-only memory, a magnetic disk or an optical disk, etc.
以上所述仅为本申请的能够实现的示例性的实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The foregoing are only exemplary embodiments that can be implemented in this application, and are not intended to limit this application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included in Within the scope of protection of this application.

Claims (20)

  1. 一种执行操作的方法,其中,应用于电子设备中,所述电子设备包括专用处理芯片,所述方法包括:A method for performing operations, wherein, applied to an electronic device, the electronic device includes a dedicated processing chip, and the method includes:
    指示中央处理器接收目标信息,所述目标信息是第一神经网络待处理的信息;Instruct the central processing unit to receive target information, where the target information is information to be processed by the first neural network;
    指示所述专用处理芯片根据预先建立的第二神经网络处理所述目标信息,获取目标结果数据,所述第二神经网络是根据网络信息建立的神经网络,所述网络信息包括所述第一神经网络的网络结构和权值信息;Instruct the dedicated processing chip to process the target information according to a pre-established second neural network to obtain target result data. The second neural network is a neural network established according to network information, and the network information includes the first neural network. Network structure and weight information of the network;
    将所述目标结果数据传回所述中央处理器;Transmitting the target result data back to the central processing unit;
    根据所述目标结果数据,执行对应的操作。Perform corresponding operations according to the target result data.
  2. 根据权利要求1所述的方法,在所述指示所述专用处理芯片根据所述预先建立的所述第二神经网络处理所述目标信息,获得目标结果数据之前,所述方法还包括:The method according to claim 1, before the instructing the dedicated processing chip to process the target information according to the pre-established second neural network to obtain target result data, the method further comprises:
    当接收到网络构建指令时,解析所述第一神经网络,获得所述网络信息,所述网络信息包括所述第一神经网络的图形结构信息和权值信息;When receiving a network construction instruction, parse the first neural network to obtain the network information, the network information including the graph structure information and weight information of the first neural network;
    指示所述专用处理芯片根据所述网络信息建立所述第二神经网络。Instruct the dedicated processing chip to establish the second neural network according to the network information.
  3. 根据权利要求2所述的方法,所述指示所述专用处理芯片根据所述网络信息建立所述第二神经网络,包括:The method according to claim 2, wherein the instructing the dedicated processing chip to establish the second neural network according to the network information comprises:
    在所述专用处理芯片中获取预定存储空间的全局内存;Acquiring a global memory of a predetermined storage space in the dedicated processing chip;
    按照所述专用处理芯片的数据规范,将所述网络信息存储在所述全局内存中;Storing the network information in the global memory according to the data specification of the dedicated processing chip;
    指示所述专用处理芯片按照所述网络信息建立所述第二神经网络。Instruct the dedicated processing chip to establish the second neural network according to the network information.
  4. 根据权利要求3所述的方法,所述指示所述专用处理芯片按照所述网络信息建立所述第二神经网络,包括:The method according to claim 3, wherein the instructing the dedicated processing chip to establish the second neural network according to the network information includes:
    获取所述网络信息中的图形结构信息和权值信息;Acquiring graphic structure information and weight information in the network information;
    根据所述图形结构信息,确定各个算子的输入张量和输出张量;Determine the input tensor and output tensor of each operator according to the graphic structure information;
    根据各个算子的所述输入张量的标识和所述输出张量的标识,将所述第二神经网络中的算子完成串接;Complete the concatenation of the operators in the second neural network according to the identifiers of the input tensor and the output tensor of each operator;
    根据所述权值信息,确定对应的卷积核,所述卷积核是对应的算子的输入张量。According to the weight information, the corresponding convolution kernel is determined, and the convolution kernel is the input tensor of the corresponding operator.
  5. 根据权利要求4所述的方法,所述根据各个算子的所述输入张量的标识和所述输出张量的标识,将所述第二神经网络中的算子完成串接,包括:The method according to claim 4, wherein said concatenating the operators in the second neural network according to the identification of the input tensor and the identification of the output tensor of each operator comprises:
    当所述专用处理芯片构建完成第一算子时,检测所述第一算子是否具备与第二算子融合的条件,所述第二算子是所述第二神经网络中已经完成构建 的算子;When the first operator is constructed by the dedicated processing chip, it is detected whether the first operator has the conditions for fusion with the second operator, and the second operator has been constructed in the second neural network operator;
    当所述第一算子具备与第二算子融合的条件时,将所述第一算子和所述第二算子融合;When the first operator meets the conditions for fusion with the second operator, fusing the first operator and the second operator;
    根据融合后的算子,更新所述全局内存中的网络信息。According to the merged operator, the network information in the global memory is updated.
  6. 根据权利要求4所述的方法,所述方法还包括:The method according to claim 4, further comprising:
    根据所述图形结构信息,确定所述第一神经网络的算子层数;Determining the number of operator layers of the first neural network according to the graphic structure information;
    当所述算子层数大于等于层数阈值时,执行所述指示所述专用处理芯片根据所述预先建立的所述第二神经网络处理所述目标信息,获得目标结果数据的步骤。When the number of operator layers is greater than or equal to the layer number threshold, the step of instructing the dedicated processing chip to process the target information according to the pre-established second neural network to obtain target result data is performed.
  7. 根据权利要求4所述的方法,所述方法还包括:The method according to claim 4, further comprising:
    响应于调用所述第一神经网络的进程注销,将所述专用处理芯片中的所述第二神经网络的信息删除。In response to the logout of the process calling the first neural network, the information of the second neural network in the dedicated processing chip is deleted.
  8. 根据权利要求4所述的方法,所述方法还包括:The method according to claim 4, further comprising:
    响应于调用所述第一神经网络的进程注销,将所述专用处理芯片中的所述第二神经网络的信息存储在本地,并删除所述专用处理芯片中的所述第二神经网络的信息。In response to the logout of the process calling the first neural network, the information of the second neural network in the dedicated processing chip is stored locally, and the information of the second neural network in the dedicated processing chip is deleted .
  9. 根据权利要求1至6任一所述的方法,所述方法还包括:The method according to any one of claims 1 to 6, the method further comprising:
    当所述目标结果数据是图像识别数据时,在被识别的目标图像中显示被框选的结果区域;When the target result data is image recognition data, display the result area selected by the frame in the recognized target image;
    或,or,
    当所述目标结果数据是语音识别数据时,播放合成后的人工智能语音或显示识别出的文本。When the target result data is speech recognition data, the synthesized artificial intelligence speech is played or the recognized text is displayed.
  10. 根据权利要求1至6任一所述的方法,所述专用处理芯片包括以下至少一项:The method according to any one of claims 1 to 6, wherein the dedicated processing chip comprises at least one of the following:
    图像处理器、数字信号处理器、神经网络处理器、张量处理器、深度学习处理器或大脑处理器。Image processor, digital signal processor, neural network processor, tensor processor, deep learning processor or brain processor.
  11. 一种执行操作的装置,其中,应用于电子设备中,所述电子设备包括专用处理芯片,所述装置包括:A device for performing operations, which is applied to an electronic device, the electronic device includes a dedicated processing chip, and the device includes:
    信息接收模块,用于指示中央处理器接收目标信息,所述目标信息是第一神经网络待处理的信息;The information receiving module is used to instruct the central processing unit to receive target information, where the target information is information to be processed by the first neural network;
    数据获得模块,用于指示所述专用处理芯片根据预先建立的第二神经网络处理所述目标信息,获得目标结果数据,所述第二神经网络是根据网络信息建立的神经网络,所述网络信息是指示所述第一神经网络的网络结构;The data acquisition module is used to instruct the dedicated processing chip to process the target information according to a pre-established second neural network to obtain target result data. The second neural network is a neural network established according to network information, and the network information Indicates the network structure of the first neural network;
    数据传回模块,用于将所述目标结果数据传回所述中央处理器;A data transmission module for transmitting the target result data back to the central processing unit;
    操作执行模块,用于根据所述目标结果数据,执行对应的操作。The operation execution module is used to execute the corresponding operation according to the target result data.
  12. 根据权利要求11所述的装置,所述装置还包括:网络解析模块和建网指示模块;The device according to claim 11, further comprising: a network analysis module and a network construction instruction module;
    所述网络解析模块,用于当接收到网络构建指令时,解析所述第一神经网络,获得所述网络信息,所述网络信息包括所述第一神经网络的图形结构信息和权值信息;The network analysis module is configured to analyze the first neural network to obtain the network information when a network construction instruction is received, and the network information includes graph structure information and weight information of the first neural network;
    所述建网指示模块,用于指示所述专用处理芯片根据所述网络信息建立所述第二神经网络。The network construction instruction module is used to instruct the dedicated processing chip to establish the second neural network according to the network information.
  13. 根据权利要求12所述的装置,所述建网指示模块,用于:The device according to claim 12, wherein the network construction instruction module is configured to:
    在所述专用处理芯片中获取预定存储空间的全局内存;Acquiring a global memory of a predetermined storage space in the dedicated processing chip;
    按照所述专用处理芯片的数据规范,将所述网络信息存储在所述全局内存中;Storing the network information in the global memory according to the data specification of the dedicated processing chip;
    指示所述专用处理芯片按照所述网络信息建立所述第二神经网络。Instruct the dedicated processing chip to establish the second neural network according to the network information.
  14. 根据权利要求13所述的装置,所述建网指示模块,用于:The device according to claim 13, wherein the network construction instruction module is configured to:
    获取所述网络信息中的图形结构信息和权值信息;Acquiring graphic structure information and weight information in the network information;
    根据所述图形结构信息,确定各个算子的输入张量和输出张量;Determine the input tensor and output tensor of each operator according to the graphic structure information;
    根据各个算子的所述输入张量的标识和所述输出张量的标识,将所述第二神经网络中的算子完成串接;Complete the concatenation of the operators in the second neural network according to the identifiers of the input tensor and the output tensor of each operator;
    根据所述权值信息,确定对应的卷积核,所述卷积核是对应的算子的输入张量。According to the weight information, the corresponding convolution kernel is determined, and the convolution kernel is the input tensor of the corresponding operator.
  15. 根据权利要求14所述的装置,所述建网指示模块,用于:The device according to claim 14, wherein the network construction instruction module is configured to:
    当所述专用处理芯片构建完成第一算子时,检测所述第一算子是否具备与第二算子融合的条件,所述第二算子是所述第二神经网络中已经完成构建的算子;当所述第一算子具备与第二算子融合的条件时,将所述第一算子和所述第二算子融合;根据融合后的算子,更新所述全局内存中的网络信息。When the first operator is constructed by the dedicated processing chip, it is detected whether the first operator has the conditions for fusion with the second operator, and the second operator has been constructed in the second neural network Operator; when the first operator meets the conditions for fusion with the second operator, the first operator and the second operator are fused; according to the fused operator, the global memory is updated Network information.
  16. 根据权利要求14所述的装置,所述装置还包括层数确定模块;The device according to claim 14, further comprising a layer number determining module;
    所述层数确定模块,用于根据所述图形结构信息,确定所述第一神经网络的算子层数;The layer number determining module is configured to determine the number of operator layers of the first neural network according to the graphic structure information;
    所述数据获得模块,用于当所述算子层数大于等于层数阈值时,指示所述专用处理芯片根据预先建立的所述第二神经网络处理所述目标信息,获得目标结果数据。The data obtaining module is configured to instruct the dedicated processing chip to process the target information according to the pre-established second neural network to obtain target result data when the number of operator layers is greater than or equal to the threshold value of the number of layers.
  17. 根据权利要求14所述的装置,所述装置还包括第一删除模块,用于:The device according to claim 14, the device further comprising a first deleting module, configured to:
    响应于调用所述第一神经网络的进程注销,将所述专用处理芯片中的所述第二神经网络的信息删除。In response to the logout of the process calling the first neural network, the information of the second neural network in the dedicated processing chip is deleted.
  18. 根据权利要求14所述的装置,所述装置还包括第二删除模块,用于:The device according to claim 14, the device further comprising a second deletion module, configured to:
    响应于调用所述第一神经网络的进程注销,将所述专用处理芯片中的所述第二神经网络的信息存储在本地,并删除所述专用处理芯片中的所述第二神经网络的信息。In response to the logout of the process calling the first neural network, the information of the second neural network in the dedicated processing chip is stored locally, and the information of the second neural network in the dedicated processing chip is deleted .
  19. 一种电子设备,其中,所述电子设备包括处理器、和与所述处理器相连的存储器,以及存储在所述存储器上的程序指令,所述处理器执行所述程序指令时实现如权利要求1至10任一所述的执行操作的方法。An electronic device, wherein the electronic device includes a processor, a memory connected to the processor, and program instructions stored on the memory, and the processor executes the program instructions as claimed in the claims The method of performing operations described in any one of 1 to 10.
  20. 一种计算机可读存储介质,所述存储介质中存储有程序指令,其中,所述程序指令被处理器执行时实现如权利要求1至10任一所述的执行操作的方法。A computer-readable storage medium, wherein program instructions are stored in the storage medium, wherein, when the program instructions are executed by a processor, the method for performing operations according to any one of claims 1 to 10 is realized.
PCT/CN2021/085028 2020-05-18 2021-04-01 Method and apparatus for executing operation, electronic device, and storage medium WO2021232958A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010419847.9 2020-05-18
CN202010419847.9A CN111582459B (en) 2020-05-18 2020-05-18 Method for executing operation, electronic equipment, device and storage medium

Publications (1)

Publication Number Publication Date
WO2021232958A1 true WO2021232958A1 (en) 2021-11-25

Family

ID=72126875

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/085028 WO2021232958A1 (en) 2020-05-18 2021-04-01 Method and apparatus for executing operation, electronic device, and storage medium

Country Status (3)

Country Link
CN (1) CN111582459B (en)
TW (1) TW202145079A (en)
WO (1) WO2021232958A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114819084A (en) * 2022-04-26 2022-07-29 北京百度网讯科技有限公司 Model reasoning method, device, equipment and storage medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111582459B (en) * 2020-05-18 2023-10-20 Oppo广东移动通信有限公司 Method for executing operation, electronic equipment, device and storage medium
CN112465116B (en) * 2020-11-25 2022-12-09 安徽寒武纪信息科技有限公司 Compiling method, operation method, electronic device, and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107766939A (en) * 2017-11-07 2018-03-06 维沃移动通信有限公司 A kind of data processing method, device and mobile terminal
CN108122031A (en) * 2017-12-20 2018-06-05 杭州国芯科技股份有限公司 A kind of neutral net accelerator architecture of low-power consumption
WO2018124707A1 (en) * 2016-12-27 2018-07-05 삼성전자 주식회사 Input processing method using neural network computation, and apparatus therefor
CN108734288A (en) * 2017-04-21 2018-11-02 上海寒武纪信息科技有限公司 A kind of operation method and device
US20190180183A1 (en) * 2017-12-12 2019-06-13 Amazon Technologies, Inc. On-chip computational network
CN111582459A (en) * 2020-05-18 2020-08-25 Oppo广东移动通信有限公司 Method, electronic device, apparatus and storage medium for executing operation

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11494582B2 (en) * 2018-02-08 2022-11-08 Western Digital Technologies, Inc. Configurable neural network engine of tensor arrays and memory cells
CN109446996B (en) * 2018-10-31 2021-01-22 智慧眼科技股份有限公司 Face recognition data processing device and method based on FPGA
CN110489344A (en) * 2019-08-02 2019-11-22 Oppo广东移动通信有限公司 Engine test method and Related product
CN110782029B (en) * 2019-10-25 2022-11-22 阿波罗智能技术(北京)有限公司 Neural network prediction method and device, electronic equipment and automatic driving system
CN110942138B (en) * 2019-11-13 2022-02-15 华中科技大学 Deep neural network training method and system in hybrid memory environment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018124707A1 (en) * 2016-12-27 2018-07-05 삼성전자 주식회사 Input processing method using neural network computation, and apparatus therefor
CN108734288A (en) * 2017-04-21 2018-11-02 上海寒武纪信息科技有限公司 A kind of operation method and device
CN107766939A (en) * 2017-11-07 2018-03-06 维沃移动通信有限公司 A kind of data processing method, device and mobile terminal
US20190180183A1 (en) * 2017-12-12 2019-06-13 Amazon Technologies, Inc. On-chip computational network
CN108122031A (en) * 2017-12-20 2018-06-05 杭州国芯科技股份有限公司 A kind of neutral net accelerator architecture of low-power consumption
CN111582459A (en) * 2020-05-18 2020-08-25 Oppo广东移动通信有限公司 Method, electronic device, apparatus and storage medium for executing operation

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114819084A (en) * 2022-04-26 2022-07-29 北京百度网讯科技有限公司 Model reasoning method, device, equipment and storage medium
CN114819084B (en) * 2022-04-26 2024-03-01 北京百度网讯科技有限公司 Model reasoning method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN111582459A (en) 2020-08-25
CN111582459B (en) 2023-10-20
TW202145079A (en) 2021-12-01

Similar Documents

Publication Publication Date Title
WO2021232958A1 (en) Method and apparatus for executing operation, electronic device, and storage medium
CN111368893B (en) Image recognition method, device, electronic equipment and storage medium
CN106951926B (en) Deep learning method and device of hybrid architecture
JP7389840B2 (en) Image quality enhancement methods, devices, equipment and media
CN111273953B (en) Model processing method, device, terminal and storage medium
CN111210005A (en) Equipment operation method and device, storage medium and electronic equipment
US10733481B2 (en) Cloud device, terminal device, and method for classifying images
CN113050860B (en) Control identification method and related device
CN112163577A (en) Character recognition method and device in game picture, electronic equipment and storage medium
CN113673613A (en) Multi-modal data feature expression method, device and medium based on contrast learning
CN115358404A (en) Data processing method, device and equipment based on machine learning model reasoning
CN117540205A (en) Model training method, related device and storage medium
CN111598923B (en) Target tracking method and device, computer equipment and storage medium
CN111598924B (en) Target tracking method and device, computer equipment and storage medium
US20230260245A1 (en) Image segmentation model quantization method and apparatus, computer device, and storage medium
CN116975336A (en) Image processing method, device, equipment and storage medium based on artificial intelligence
CN111813529A (en) Data processing method and device, electronic equipment and storage medium
US20230083565A1 (en) Image data processing method and apparatus, storage medium, and electronic device
US20200285955A1 (en) Method for accelerating deep learning and user terminal
CN115858556A (en) Data processing method and device, storage medium and electronic equipment
DE102022126287A1 (en) STORAGE AND RETRIEVAL OF UNSTRUCTURED DATA IN CONVERSATIONAL ARTIFICIAL INTELLIGENCE APPLICATIONS
CN112749364B (en) Webpage generation method, device, equipment and storage medium based on artificial intelligence
CN113989559A (en) Method, device and equipment for determining probability threshold of classification model and storage medium
CN112053013A (en) Information prediction method, device, equipment and computer readable storage medium
CN118051652A (en) Data processing method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21809051

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21809051

Country of ref document: EP

Kind code of ref document: A1