WO2020037475A1 - 一种调试应用程序的方法及设备 - Google Patents

一种调试应用程序的方法及设备 Download PDF

Info

Publication number
WO2020037475A1
WO2020037475A1 PCT/CN2018/101399 CN2018101399W WO2020037475A1 WO 2020037475 A1 WO2020037475 A1 WO 2020037475A1 CN 2018101399 W CN2018101399 W CN 2018101399W WO 2020037475 A1 WO2020037475 A1 WO 2020037475A1
Authority
WO
WIPO (PCT)
Prior art keywords
neural network
model
operator
terminal device
application
Prior art date
Application number
PCT/CN2018/101399
Other languages
English (en)
French (fr)
Inventor
朱伟
雷亮
谢淼
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2018/101399 priority Critical patent/WO2020037475A1/zh
Priority to CN201880072115.8A priority patent/CN111316227B/zh
Publication of WO2020037475A1 publication Critical patent/WO2020037475A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs

Definitions

  • the present application relates to the field of communication technologies, and in particular, to a method and device for debugging an application program.
  • IDE Integrated Development Environment
  • PC personal computer
  • Method 1 Import the program package from the PC to the terminal device during debugging, and then use the development tools on the PC to establish a connection with the terminal device, and track and debug through the development tools on the PC;
  • Method 2 Use the IDE belt on the PC. Emulator to run and debug programs directly on your PC.
  • the second method is to directly debug on the PC, all operations are completed on the PC, and the debugging efficiency is relatively high. In addition, this method does not require the use of a terminal device, so the hardware overhead is relatively small.
  • developers will first use the second method for preliminary debugging, and then import the program package generated during final debugging from the PC to the terminal device, and use the terminal device for real machine testing, which can improve development efficiency.
  • Android Android terminal program development
  • developers generally use Android Studio on a PC as an IDE to develop programs and complete preliminary debugging before finally importing the package to an Android phone for real machine testing.
  • a terminal device uses a hardware acceleration device such as a GPU or an NPU to perform operations on a neural network model. Because hardware-accelerated AI-capable applications cannot run in the simulator of the IDE on the PC, when developers develop AI-capable applications, they have to use the first method to debug, resulting in very low development efficiency.
  • the application provides a method and a device for debugging an application program, so as to improve the development efficiency of the application program.
  • an embodiment of the present application provides a method for debugging an application program.
  • the method is applied to a PC, and the method includes: the PC determines that an artificial intelligence engine framework of the PC and an artificial intelligence engine framework on a terminal device are online.
  • the online model is a mathematical model corresponding to the artificial intelligence capabilities of the application;
  • the PC splits the online model into a neural network according to the support status Part and neural network operator part, the neural network part includes a neural network operator supported by both the PC and the terminal device, the neural network operator part is a neural network operator and The neural network operator not supported by the terminal device;
  • the PC converts the neural network part into an offline model;
  • the PC packages the binary program operator information corresponding to the offline model and the neural network operator part to In the application program package, an application package with artificial intelligence capability is generated, so that the Android simulator of the PC runs the When using the package, artificial intelligence engine invoking the PC hardware acceleration apparatus frame and the offline model acceleration operation, and executes the program binary operator information corresponding to the binary operator.
  • the neural network operator part includes a neural network operator supported by both the PC and the terminal device
  • the neural network operator part is a neural network operator not supported by the PC and a neural network operator not supported by the terminal device Therefore, in the embodiment of the present application, the neural network operators in the offline model can be supported by the terminal device, so the operation acceleration effect obtained in this way can achieve the same effect as the operation acceleration effect on the terminal device, so it can be achieved.
  • the Android simulator queries the binary software operator corresponding to the binary program operator information from the CPU software operator library of the Android simulator, and then the Android simulator executes the binary Program operator.
  • the PC accelerates the converted offline model through a local hardware acceleration device. Since the neural network operators in the offline model can be supported by the terminal device, the operation acceleration effect obtained in this way can be achieved with The computing acceleration effect on the terminal device is the same.
  • the PC uses the offline model The calculation accuracy of is adjusted to be consistent with the calculation accuracy supported by the artificial intelligence engine framework on the terminal device.
  • the operation acceleration effect obtained in this way can be achieved the same as the operation acceleration effect on the terminal device.
  • an embodiment of the present application provides a method for debugging an application program.
  • the method is applied to a PC.
  • the method includes: the PC determines an artificial intelligence engine framework on a terminal device for each neural network operator in an online model. Support state, and then the PC splits the online model into a neural network part and a neural network operator part according to the support state; the PC converts the neural network part into an offline model; the PC separates the offline model and the offline model
  • the binary program operator information corresponding to the neural network operator part is packaged into a program package of the application program, and the program package is sent to the terminal device.
  • the PC can generate and use packages corresponding to different terminal device information, which can reduce the workload of developers manually splitting off-line models in order to adapt to different terminal devices, and improve the efficiency of debugging.
  • an embodiment of the present application further provides a PC, including a module / unit that executes the first aspect or a method of any possible design of the first aspect.
  • modules / units can be implemented by hardware, and can also be implemented by hardware executing corresponding software.
  • an embodiment of the present application further provides a PC, including a module / unit that executes the second aspect or a method of any possible design of the second aspect.
  • modules / units can be implemented by hardware, and can also be implemented by hardware executing corresponding software.
  • an embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium includes a computer program, and when the computer program runs on a PC, the PC executes the first aspect or the foregoing first Any one of the possible design methods.
  • an embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium includes a computer program, and when the computer program runs on a PC, the PC executes the second aspect or the foregoing first Any of the two possible design methods.
  • an embodiment of the present application further provides a computer program product.
  • the computer program product runs on a PC
  • the PC executes the first aspect or any one of the foregoing possible design methods of the first aspect. .
  • an embodiment of the present application further provides a computer program product.
  • the computer program product runs on a PC
  • the PC executes the second aspect or any one of the foregoing possible design methods of the second aspect. .
  • FIG. 1 is a schematic diagram of an offline model generation manner according to an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a method for debugging an application program according to an embodiment of the present application
  • FIG. 3 is a schematic diagram of an online model conversion provided by an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of a system of a PC according to an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a device for debugging an application program according to an embodiment of the present application
  • FIG. 6 is a schematic flowchart of a method for debugging an application program according to an embodiment of the present application
  • FIG. 7 is a schematic diagram of an application scenario of a debugging application program according to an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a system structure of another PC according to an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a PC according to an embodiment of the present application.
  • the IDE is an application program used to provide a program development environment, and generally includes tools such as a code editor, a compiler, a debugger, and a graphical user interface.
  • the IDE integrates code development functions, analysis functions, compilation functions, debugging functions and other integrated development software service suites.
  • the IDE can be Microsoft's Visual Studio series.
  • AI is a branch of computer science that is used to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Research in this area includes robotics, language recognition, and image recognition. , Natural language processing, and expert systems.
  • HiAI is an AI computing platform for mobile terminals.
  • the artificial intelligence engine framework (HiAI Foundation) is an open layer of chip capabilities in HiAI.
  • HiAI Foundation supports a dedicated AI instruction set for neural network model operations, which can be efficient with the least clock cycles. Execute more neural network operators in parallel.
  • the online model is a standard neural network model (such as Caffe, etc.).
  • the online model is independent of the terminal device information.
  • the offline model is a dedicated AI instruction set generated by compiling the online model.
  • the offline model is related to the terminal device information.
  • the PC compiles the online model through a compilation tool to generate an offline model that can be efficiently executed on HiAI Foundation, where the offline model can be saved as a binary file (for example, Offline Model).
  • the offline model can be saved as a binary file (for example, Offline Model).
  • the reason why the online model is compiled and converted to the offline model is to be able to run on the NPU and improve the calculation speed.
  • first and second are used for descriptive purposes only and should not be interpreted as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as “first” and “second” may explicitly or implicitly include one or more of the features.
  • an embodiment of the present application provides a method for debugging an application, and the method may be executed by a PC.
  • the present application combines the method flowchart shown in FIG. 2 to specifically describe the method for debugging an application provided by the embodiment of the present application. The process is explained in detail, and the specific process is as follows.
  • Step 201 The PC determines the support status of the artificial intelligence engine framework of the PC and the artificial intelligence engine framework on the terminal device for each neural network operator in the online model.
  • the online model is a mathematical model corresponding to the artificial intelligence capabilities of the application.
  • the application can be an Android application that can be run on a terminal device that supports the Android system, or it can be run on a terminal device that supports the IOS system. IOS application.
  • the following uses Android application as an example.
  • the online models corresponding to the artificial intelligence capabilities of different applications may be different.
  • the neural network operators in different online models are different.
  • the neural network operators supported by different versions of HiAI Foundation Sons may also be different.
  • the online model 1 corresponding to the image classification capability possessed by the photo album application and the online model 2 corresponding to the face recognition capability possessed by the camera application may be different online models.
  • the nerves in the online model 1 and the online model 2 Network operators are different.
  • the PC may store in advance different versions of HiAI Foundation support for each online model.
  • HiAI Foundation 100 version does not support the MobileNet model.
  • HiAI Foundation 150 supports all neural network operators in this MobileNet model.
  • a PC can obtain its own HiAI Foundation version information and the HiAI Foundation version information on the terminal device. First, according to the HiAI Foundation version information of the terminal device, determine the version of HiAI Foundation's ability to support the online model. If the PC finds that the HiAI Foundation version of the terminal device does not support the first neural network operator in the online model, the PC determines whether the support state of the first neural network operator is NO. Further, the PC determines, according to its HiAI Foundation version information, the support capability of the HiAI Foundation of this version for the online model. If the PC finds that the HiAI Foundation version of the PC does not support the second neural network operator in the online model, the PC determines whether the support state of the second neural network operator is no. Understandably, when the PC determines its version of HiAI Foundation's support for the online model according to its HiAI Foundation version information, it can be based on the PC's HiAI Foundation's online model except for the first neural network operator. Determine if it is supported.
  • Step 202 The PC divides the online model into a neural network part and a neural network operator part according to the support status.
  • the PC determines that there is a neural network operator with a support status of NO
  • the PC queries from the software operator library of the CPU of the Android simulator whether there is a binary corresponding to the neural network operator with a support status of NO.
  • the program operator If it exists, the PC splits the online model conversion into two parts, namely the neural network operator part and the neural network part.
  • the neural network operator part includes neural network operators and terminal devices that are not supported by the PC. Unsupported neural network operator; the neural network part is a neural network part other than the neural network operator part in the online model, and includes a neural network operator supported by both the PC and the terminal device.
  • the online model is a MobileNet model with image classification capabilities.
  • the HiAI Foundation version information supported by the terminal device and the PC is HiAI V100. Because the Channelwise convolution operator and the pointwise convolution operator are used in the MobileNet model, the HiAI Foundation supported by the terminal device and the PC do not support these two convolution operators. Therefore, the PC splits the MobileNet model into five parts as shown in Figure 3: 1) the neural network part before the channelwise convolution operator; 2) the channelwise convolution operator; 3) the channelwise convolution operator and pointwise The second part of the neural network between the convolution operators; 4) the pointwise convolution operator; 5) the third part of the neural network after the pointwise convolution operator.
  • Step 203 The PC converts the neural network part into an offline model.
  • the PC compiles three neural networks into offline models, and the PC finds the channelwis convolution operator corresponding to the pointwise convolution operator from the CPU operator library of the Android simulator. Two binary program operator information. In this way, all the neural network operators in the offline model can be executed by the hardware acceleration device of the PC and the terminal device.
  • the CPU software operator library of the Android emulator is equivalent to the software operator library of the hardware CPU of the terminal device simulated by the Android emulator.
  • the terminal device refers to a device for running an application package generated by a PC.
  • Step 204 The PC packages the offline model and the binary program operator information corresponding to the neural network operator part into a package of the application program, and generates an application package with artificial intelligence capability.
  • Step 205 When the Android emulator of the PC runs the application package, the Android emulator calls the artificial intelligence engine framework and hardware acceleration device of the PC to accelerate the offline model and executes the offline model.
  • the binary program operator corresponding to the binary program operator information.
  • the Android emulator can simulate the Android phone operating environment on the computer. Understandably, the Android emulator can simulate the hardware and software environment of the Android phone.
  • the software that can install, use, and uninstall Android applications on the Android emulator allows users to experience the operation of the Android system on the computer.
  • the CPU in the operating environment is a software-simulated CPU
  • the software-simulated CPU is a hardware CPU running on a PC.
  • the Android simulator can simulate the mobile operating environment of Huawei P20, or the mobile operating environment of Huawei Mate 10.
  • Existing Android simulators cannot simulate the hardware acceleration capabilities of Android phones, and cannot run applications with AI capabilities that require hardware acceleration.
  • the Android simulator of the PC runs an application package
  • the neural network part of the offline model executed by HiAI Foundation and NPU generates an operation result
  • the operation result is passed to the Android simulation as an input parameter.
  • the Android simulator executes the operation of the binary program operator corresponding to the channelwise convolution operator, and then the Android simulator passes the operation result generated by the operation of the binary program operator corresponding to the channelwise convolution operator as an input parameter to HiAI Foundation and
  • the NPU, HiAI Foundation, and NPU continue to execute the operation results of the second part of the neural network according to the input parameters passed by the Android simulator, and then pass the operation results as input parameters to the Android simulator.
  • the operation of the binary program operator, and then the Android simulator passes the operation result generated by the binary program operator operation corresponding to the pointwise convolution operator to HiAI Foundation and NPU as input parameters.
  • HiAI Foundation and NPU execute the neural network part according to the input parameters.
  • Three operations to generate operation knots The calculation result is returned to the emulator Andrews.
  • the PC adjusts the accuracy of the online model downward to the accuracy supported by the terminal device; otherwise, no adjustment is performed, such as the terminal
  • the HiAI Foundation version information of the device is HiAI V100.
  • the precision supported by this version is 16-bit float, while the precision supported by the online model is float32-bit. Adjust the float32-bit down to float16-bit.
  • an embodiment of the present application provides a PC having a system architecture as shown in FIG. 4.
  • the system architecture includes: an IDE 101, an artificial intelligence engine framework (HiAI Foundation) 102, and a hardware acceleration device 103.
  • HiAI Foundation artificial intelligence engine framework
  • the IDE 101 includes an application 1010, an online model 1011, an Android simulator 1012, and a device 1013 for debugging an application.
  • the device 1013 includes a status determination unit 1013a, a model conversion unit 1013b, and an application package generation unit. 1013c, processing unit 1013d.
  • the application program 1010 may be an application program such as a photo album
  • the online model 1011 may be MobileNet with an image classification function.
  • the state determining unit 1013a is configured to determine the support state of the artificial intelligence engine framework of the PC itself and the artificial intelligence engine framework on the terminal device for each neural network operator in the online model.
  • the online model is a mathematical model corresponding to the artificial intelligence capabilities of the application.
  • a model conversion unit 1013b is configured to split an online model into a neural network part and a neural network operator part according to the support state, and convert the neural network part into an offline model.
  • the neural network operator part is a neural network operator that supports a status of no, that is, a neural network operator not supported by HiAI Foundation on a PC and a neural network operator not supported by HiAI Foundation of a terminal device; the neural network part is online The neural network part of the model except the neural network operator part.
  • the model conversion unit 1013b splits the online model 1011 into a neural network part and a neural network operator. Two parts.
  • the model conversion unit 1013b then converts the neural network part into an offline model.
  • the model conversion unit 1013b queries the binary program operator information corresponding to the neural network operator part from the software operator library of the CPU of the Android simulator.
  • the CPU software operator library of the Android simulator refers to the operators supported by the CPU of the Android simulator. Understandably, the operators of the CPU of the terminal device simulated by the Android simulator can support the operators. .
  • the operators in the software operator library are in the form of binary programs, so the operators in the CPU's software operator library are also called binary program operators.
  • An application package generation unit 1013c is configured to package the offline model and binary program operator information into the application package to generate an application package with artificial intelligence capabilities.
  • the Android simulator 1012 obtains the application package from the application package generation unit 1013c.
  • a processing unit 1013d is configured to call the artificial intelligence engine framework and the hardware acceleration device when the Android simulator runs the application package, and perform accelerated operations on the offline model in the application package to generate a first operation.
  • the Android simulator obtains a target operation result by performing operations according to a first operation result and a binary program operator corresponding to the binary program operator information.
  • the IDE on the PC can convert the online model into an offline model and binary program operator corresponding to the terminal device information , And then use a local hardware acceleration device to accelerate the operation of the converted offline model. Since the neural network operators in the offline model can be supported by the terminal device, the operation acceleration effect obtained in this way can be achieved with the operation on the terminal device. The acceleration effect is the same, so the purpose of development and debugging through the IDE on the PC can be achieved.
  • the processing unit 1013d of the device 1013 for debugging an application program includes a simulation container unit 1013e and a data cache unit 1013f, as shown in FIG. 5.
  • the Android simulator 1012 establishes a Transmission Control Protocol (TCP) connection with the simulation container unit 1013e.
  • TCP Transmission Control Protocol
  • the Android simulator 1012 sends a call request of the computing offline model to the HiAI Foundation of the PC through the simulation container unit 1013e.
  • the call request includes Information about offline models and file information to be processed.
  • the information of the offline model may be a binary file corresponding to the offline model, or the saved path information of the offline model.
  • the file information to be processed may refer to original data similar to an image file or a sound file that needs artificial intelligence processing.
  • the simulation container unit 1013e After receiving the invocation request of the Android emulator, the simulation container unit 1013e converts the data structure of the file information to be processed in the invocation request into the raw data in the Windows format, and sends the raw data in the Windows format to the HiAI Foundation 102.
  • simulation container unit 1013e also saves the offline model in the application package in the call request to the data cache unit 1013f, and sends the offline model save path information in the data cache unit 1013f to the HiAI Foundation 102.
  • HiAI Foundation 102 receives raw data in Windows format and the save path information from the simulation container unit 1013e, and obtains the offline model from the save path information. Then HiAI Foundation 102 calls the NPU, and uses the offline model to accelerate the original data in the Windows format to generate a first operation result.
  • the simulation container unit 1013e obtains the first operation result from the HiAI Foundation 102, and sends the first operation result to the Android simulator 1012.
  • the Android simulator 1012 executes a binary operator corresponding to the binary operator information to perform an operation on the first operation result, and finally generates a target operation result of the original data. Understandably, in the process of running the application package for the Android emulator 1012, the following process may be performed multiple times:
  • the Android emulator 1012 calls HiAI Foundation 102 and NPU through the simulation container unit 1013e in order to obtain the next operation result, and simulates the container unit. 1013e sends the next operation result to the Android emulator, and the Android emulator executes a binary program operator to perform an operation on the next operation result.
  • the simulation container unit 1013e first converts the first operation result into the first operation result of the Android data format, and then sends the Android simulator 1012.
  • the simulation container unit 1013e may call HiAI Foundation 102 multiple times when performing calculations of the offline model, and send the calculation results generated each time to the Android simulator 1012.
  • the Android emulator in the PC can use the PC's local hardware acceleration device to perform calculation acceleration.
  • the calculation effect can be the same as the calculation effect on the terminal device.
  • the developer can also localize the PC. Track and debug the application, or view the related logs generated during the running process on the PC to quickly locate the problem.
  • the terminal device may be a mobile terminal device such as a smart phone or a tablet computer capable of hardware acceleration and an Android operating system.
  • the terminal device information may be HiAI Foundation version information of the terminal device, a model of the terminal device, and the like.
  • the embodiment of the present application also provides a method for debugging an application program.
  • the main application scenario of the method is: When a developer develops and debugs an application program on a PC's IDE, the IDE on the PC can modify the online model according to the terminal device information. Perform the conversion and then generate an offline model that can be run on the terminal device.
  • FIG. 6 the specific process of the method for debugging an application provided by the embodiment of the present application is described in detail, and the specific process is as follows.
  • Step 601 The PC determines the support status of the artificial intelligence engine framework on the terminal device for each neural network operator in the online model.
  • the online model is a mathematical model corresponding to the artificial intelligence capabilities of the application.
  • the PC can store different versions of HiAI Foundation support for each online model in advance.
  • the PC can obtain the HiAI Foundation version information on the terminal device. Based on the HiAI Foundation version information of the terminal device, find and determine the version of HiAI Foundation. Support for online models. If the PC finds that the HiAI Foundation version of the terminal device does not support the first neural network operator in the line model, the PC determines whether the support state of the first neural network operator is NO.
  • Step 602 The PC splits the online model into a neural network part and a neural network operator part according to the support status.
  • the neural network operator part is a neural network operator not supported by HiAI Foundation on the terminal device.
  • the first neural network operator is a part of the online model other than the neural network operator part.
  • the PC determines that there is a neural network operator with a support status of NO
  • the PC obtains information of the terminal device, and determines the CPU ID of the terminal according to the information of the terminal device.
  • the PC inquires from the software operator library corresponding to the CPU identifier whether there is a binary program operator corresponding to the neural network operator whose support status is no, and if it exists, the PC splits the online model conversion into two parts; Among them, the neural network operator part is a neural network operator whose support status is no; the neural network part is a neural network part other than the neural network operator part in the online model.
  • step 603 the PC converts the neural network part into an offline model.
  • Step 604 The PC packages the binary program operator information corresponding to the offline model and the neural network operator part into a program package of an application program, and sends the program package to the terminal device.
  • the PC can output a program package corresponding to the terminal device information. After the terminal has installed this program package, it can run the AI-capable application program.
  • the present application exemplifies a specific process of the method for debugging an application provided by the embodiment of the present application with reference to the scenario shown in FIG. 7, and the specific process is as follows.
  • step a the PC obtains the first version information of the HiAI Foundation of the terminal device I is HiAI V100 and the second version information of the HiAI Foundation of the terminal device II is HiAI V150.
  • Step b According to the HiAI V100, the PC determines that the HiAI Foundation corresponding to the HiAI V100 does not support the channelwise convolution operator and the pointwise convolution operator in the MobileNet model.
  • the PC converts parts of the MobileNet model other than the two convolution operators into a first offline model, where the neural network operator in the first offline model can be run by the hardware acceleration device of the terminal device one.
  • the PC determines the software operator library of the CPU of the terminal device based on the information of the terminal device, and queries the binary program operator information corresponding to the channelwise convolution operator and the pointwise convolution operator from the CPU software operator library.
  • the PC determines that the HiAI Foundation corresponding to the HiAI V150 supports all neural network operators in the MobileNet model. Therefore, the PC directly compiles and translates the MobileNet model into a second offline model.
  • the neural network operator in the second offline model can be run by the hardware acceleration device of the second terminal device.
  • step c the PC packages the first offline model and binary program operator information into package one of an application (such as a photo album application), and sends the package one to the terminal device one.
  • the PC packages the second offline model. Go to package two of an application (such as a photo album application), and send the package two to the terminal device two.
  • Step d the terminal device 1 installs and runs the program package 1, calls the NPU to execute the offline model 1, and the terminal device 1 searches the binary program operator library of the terminal device's CPU for the corresponding binary program operator information according to the binary program operator information.
  • the binary program operators are executed by the CPU.
  • Terminal device two installs and runs program package two, and calls the NPU to execute the offline model two.
  • the PC can generate and use packages corresponding to different terminal device information, which can reduce the workload of developers manually splitting off-line models in order to adapt to different terminal devices, and improve the efficiency of debugging.
  • the above-mentioned terminal device may be a mobile terminal device such as a smart phone or a tablet computer with a hardware acceleration device and an Android operating system.
  • the method can be applied to a PC having a system architecture shown in FIG. 8, and the system architecture in FIG. 8 includes an IDE 101.
  • the IDE 101 includes only an application program 1010 and an online model 1011, and also includes a device 1013 for debugging an application program.
  • the device 1013 includes a status determination unit 1013a, a model conversion unit 1013b, an application package generation unit 1013c, and a sending unit 1013g. .
  • the state determination unit 1013a is configured to determine a support state of the artificial intelligence engine framework on the terminal device for each neural network operator in the online model.
  • a model conversion unit 1013b is configured to split the online model into a neural network part and a neural network operator part according to the support state, and convert the neural network part into an offline model.
  • An application program package generating unit 1013c is configured to package an offline model and binary program operator information corresponding to the neural network operator part into a program package of an application program to generate an application program package with artificial intelligence capability.
  • a sending unit 1013g is configured to send the application program package to the terminal device.
  • an embodiment of the present application further provides a PC, where the PC has a hardware acceleration device (such as a GPU and an NPU) and a CPU, and has a Windows operating system.
  • the PC is used to implement the method described in the embodiment described in FIG. 2 or 6, as shown in FIG. 9, the PC includes a processor 901, a memory 902, and a transceiver 903.
  • the one or more computer programs are stored in the memory 902 and configured to be executed by the one or more processors 901.
  • the processor 901 may be a central processing unit (CPU), or a digital processing unit, GPU, NPU, etc.
  • the processor 901 is a control center of the PC900, and uses various interfaces and lines to connect various parts of the entire PC. By executing or executing a computer program stored in the memory 902, and calling data stored in the memory 902, various functions and data processing of the PC 900 are performed.
  • the memory 902 is configured to store a computer program to be run, an application program code, an online model, an offline model, and the like.
  • the transceiver 903 is configured to send an application program package generated by the processor 901 to the terminal side.
  • a specific connection medium between the processor 901 and the memory 902 is not limited in the embodiment of the present application.
  • the memory 902, the processor 901, and the transceiver 903 are connected by a bus 904 in FIG. 9.
  • the bus is indicated by a thick line in FIG. 9.
  • the connection modes of other components are only schematically illustrated. It is not limited.
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only a thick line is used in FIG. 9, but it does not mean that there is only one bus or one type of bus.
  • the memory 902 may be a volatile memory, such as a random-access memory (RAM); the memory 902 may also be a non-volatile memory, such as a read-only memory, A flash memory (hard memory, hard disk drive (HDD) or solid-state drive (SSD), or memory 902) can be used to carry or store program code in the form of instructions or data structures and can be used by Any other media that the computer accesses, but is not limited to.
  • the memory 902 may be a combination of the above-mentioned memories.
  • the PC 900 is caused to execute each step in the corresponding embodiment shown in FIG. 2 or FIG. 6, and the specific process may participate in the above embodiment, which is not repeated here. .
  • an embodiment of the present application further provides a PC, where the PC has a hardware acceleration device (such as a GPU and an NPU) and a CPU, and has a Windows operating system.
  • the PC includes a processor 901, a memory 902, and a transceiver 903.
  • the one or more computer programs are stored in the memory 902 described above and configured to be executed by the one or more processors 901 to implement the functions of the apparatus for debugging an application program in FIG. 4 or FIG. 8.
  • An embodiment of the present application further provides a computer-readable storage medium that stores computer software instructions that need to be executed to execute the processor, and includes a program that is required to execute the processor.
  • An embodiment of the present application further provides a computer program product, and when the computer program product is executed by a computer, the computer executes the method for debugging an application program as described above.
  • An embodiment of the present application further provides a computer-readable storage medium that stores computer software instructions that need to be executed in order to execute the processor, and includes a program for implementing a function of a device for debugging an application program.
  • An embodiment of the present application further provides a computer program product, and when the computer program product is executed by a computer, the computer is enabled to implement a function of a device for debugging an application program.
  • the IDE when a developer develops and debugs an application program on a PC's IDE, the IDE can be used to convert the online model to obtain the converted offline model. Then the local offline hardware acceleration device is used to accelerate the converted offline model. Since the neural network operators in the offline model can be supported by the terminal device, the operation acceleration effect obtained in this way can be achieved with the operation acceleration effect on the terminal device. The same, so you can achieve the purpose of development and debugging through the IDE on the PC.
  • the PC can generate a program package corresponding to different terminal device information, which can reduce the workload of a developer manually splitting the offline model in order to adapt to different terminal devices, and improve the efficiency of debugging.
  • Various illustrative logic blocks, modules, and circuits described in the embodiments of the present application may be implemented by a general-purpose processing unit, a digital signal processing unit, an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic. Devices, discrete gate or transistor logic, discrete hardware components, or any combination of the above are designed to implement or operate the described functions.
  • the general-purpose processing unit may be a micro-processing unit. Alternatively, the general-purpose processing unit may also be any conventional processing unit, controller, microcontroller, or state machine.
  • the processing unit may also be implemented by a combination of computing devices, such as a digital signal processing unit and a micro processing unit, multiple micro processing units, one or more micro processing units combined with a digital signal processing unit core, or any other similar configuration. achieve.
  • a software module may be stored in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium in the art.
  • the storage medium may be connected to the processing unit, so that the processing unit can read information from the storage medium and can write information to the storage medium.
  • the storage medium may also be integrated into the processing unit.
  • the processing unit and the storage medium may be configured in an ASIC, and the ASIC may be configured in a user terminal.
  • the processing unit and the storage medium may also be configured in different components in the user terminal.
  • the above functions described in the embodiments of the present application may be implemented in hardware, software, firmware, or any combination of the three. If implemented in software, these functions can be stored on a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium.
  • Computer-readable media includes computer storage media and communication media that facilitates transfer of computer programs from one place to another. Storage media can be any available media that can be accessed by a general purpose or special computer.
  • Such computer-readable media may include, but is not limited to, RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage, or other magnetic storage devices, or any other device or instructions that can be used to carry or store instructions or data structures and Other media that can be read by a general or special computer or a general or special processing unit.
  • any connection can be appropriately defined as a computer-readable medium, for example, if the software is from a web site, server, or other remote resource via a coaxial cable, fiber optic computer, twisted pair, digital subscriber line (DSL) Or transmitted wirelessly such as infrared, wireless, and microwave are also included in the defined computer-readable media.
  • DSL digital subscriber line
  • the disks and discs include compact disks, laser disks, optical disks, DVDs, floppy disks and Blu-ray disks. Disks usually copy data magnetically, and disks usually copy data optically with lasers. A combination of the above may also be contained in a computer-readable medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

一种调试应用程序的方法及设备,包括:PC确定对在线模型中的各个神经网络算子的支持状态;所述PC根据所述支持状态,将所述在线模型拆分为神经网络部分和神经网络算子部分;所述PC将所述神经网络部分转换为离线模型;所述PC将所述离线模型、所述神经网络算子部分对应的二进制程序算子信息打包到应用程序的程序包中,生成具有人工智能能力的应用程序包,以使得所述PC的安卓模拟器运行所述应用程序包时,调用所述PC的人工智能引擎框架和硬件加速设备对所述离线模型进行加速运算,并执行所述二进制程序算子信息对应的二进制程序算子。该方法用以提高对具有人工智能能力的应用程序的开发效率。

Description

一种调试应用程序的方法及设备 技术领域
本申请涉及通信技术领域,尤其涉及一种调试应用程序的方法及设备。
背景技术
随着智能终端的发展,越来越多的公司和个人投入到终端设备的程序开发上来,目前一般利用个人计算机(Personal Computer,PC)的集成开发环境(Integrated Development Environment,IDE)进行开发,当开发完成后再将开发生成的程序包下载到终端设备(例如手机)上运行。
由于软件开发的复杂性,开发人员在程序开发过程中往往需要反复对程序进行调试来修复程序问题和验证运行效果。在对终端设备进行软件开发时,由于IDE所在PC的操作系统和终端设备的操作系统不同,目前一般采用两种方式来进行调试。方式一:调试时将程序包从PC导入到终端设备中,然后使用PC上的开发工具与终端设备建立连接,并通过PC上的开发工具进行跟踪调试;方式二:使用PC上的IDE带的模拟器,直接在PC上运行和调试程序。
由于方式二直接在PC上进行调试,所有操作都在PC上完成,调试效率比较高,另外该方式不需要利用终端设备,所以硬件开销比较小。一般而言,开发人员会首先使用方式二进行前期调试,再将最终调试时生成的程序包从PC导入到终端设备中,使用终端设备进行真机测试,这样可以提高开发效率。以Android(安卓)终端程序开发为例,开发人员一般用PC上的Android Studio作为IDE来开发程序,并完成前期调试,最终才将程序包导入到安卓手机上进行真机测试。
但是,随着人工智能(Artificial Intelligence,AI)技术的发展,越来越多的Android应用程序具有AI能力,终端设备需要具有较强的运算能力才能对具有AI能力的应用程序进行神经网络模型运算,一般地,终端设备利用GPU或NPU等硬件加速设备对神经网络模型进行运算。由于具有硬件加速的AI能力的应用程序无法在PC上的IDE的模拟器中运行,所以当开发人员开发具有AI功能的应用程序时,不得不采用方式一进行调试,导致开发效率很低。
发明内容
本申请提供一种调试应用程序的方法及设备,用以提高对应用程序的开发效率。
第一方面,本申请实施例提供了一种调试应用程序的方法,该方法应用于PC上,该方法包括:所述PC确定自身的人工智能引擎框架和终端设备上的人工智能引擎框架对在线模型中的各个神经网络算子的支持状态,所述在线模型是所述应用程序具有的人工智能能力对应的数学模型;所述PC根据所述支持状态,将所述在线模型拆分为神经网络部分和神经网络算子部分,所述神经网络部分包括所述PC和所述终端设备都支持的神经网络算子,所述神经网络算子部分是所述PC不支持的神经网络算子和所述终端设备不支持的神经网络算子;所述PC将所述神经网络部分转换为离线模型;所述PC将所述离线模型、所述神经网络算子部分对应的二进制程序算子信息打包到所述应用程序的程序包中,生成 具有人工智能能力的应用程序包,以使得所述PC的安卓模拟器运行所述应用程序包时,调用所述PC的人工智能引擎框架和硬件加速设备对所述离线模型进行加速运算,并执行所述二进制程序算子信息对应的二进制程序算子。
因神经网络部分包括所述PC和所述终端设备都支持的神经网络算子,所述神经网络算子部分是所述PC不支持的神经网络算子和所述终端设备不支持的神经网络算子,所以在本申请实施例中,该离线模型中的神经网络算子均能够被终端设备支持,所以这样得到的运算加速效果能够实现与在终端设备上的运算加速效果相同,因此可以达到了通过PC上的IDE进行开发调试的目的。
在一种可能的设计中,所述安卓模拟器从所述安卓模拟器的CPU软件算子库中查询到所述二进制程序算子信息对应的二进制程序算子,然后安卓模拟器执行所述二进制程序算子。
在本申请实施例中,PC通过本地硬件加速设备对转换后的离线模型进行运算加速,因该离线模型中的神经网络算子均能够被终端设备支持,所以这样得到的运算加速效果能够实现与在终端设备上的运算加速效果相同。
在一种可能的设计中,若所述终端设备上的人工智能引擎框架所支持的计算精度低于所述PC上的人工智能引擎框架所支持的计算精度,则所述PC将所述离线模型的计算精度调整至与所述终端设备上的人工智能引擎框架所支持的计算精度一致。
在本申请实施例中,因该离线模型中的计算精度与终端设备一致,所以这样得到的运算加速效果能够实现与在终端设备上的运算加速效果相同。
第二方面,本申请实施例提供了一种调试应用程序的方法,该方法应用在PC上,该方法包括:PC确定终端设备上的人工智能引擎框架对在线模型中的各个神经网络算子的支持状态,然后PC根据所述支持状态,将所述在线模型拆分为神经网络部分和神经网络算子部分;PC将所述神经网络部分转换为离线模型;PC将所述离线模型和所述神经网络算子部分对应的二进制程序算子信息打包到所述应用程序的程序包中,并将所述程序包发送到所述终端设备。
在本申请实施例中,PC可以生成使用与不同终端设备信息对应的程序包,可以减少开发者为了适配不同终端设备手动拆分离线模型的工作量,同时提高了调试的效率。
第三方面,本申请实施例还提供了一种PC,包括执行第一方面或者第一方面的任意一种可能的设计的方法的模块/单元。这些模块/单元可以通过硬件实现,也可以通过硬件执行相应的软件实现。
第四方面,本申请实施例还提供了一种PC,包括执行第二方面或者第二方面的任意一种可能的设计的方法的模块/单元。这些模块/单元可以通过硬件实现,也可以通过硬件执行相应的软件实现。
第五方面,本申请实施例中还提供一种计算机可读存储介质,所述计算机可读存储介质包括计算机程序,当计算机程序在PC上运行时,使得所述PC执行第一方面或上述第一方面的任意一种可能的设计的方法。
第六方面,本申请实施例中还提供一种计算机可读存储介质,所述计算机可读存储介质包括计算机程序,当计算机程序在PC上运行时,使得所述PC执行第二方面或上述第二方面的任意一种可能的设计的方法。
第七方面,本申请实施例还提供一种计算机程序产品,当所述计算机程序产品在PC 上运行时,使得所述PC执行第一方面或上述第一方面的任意一种可能的设计的方法。
第八方面,本申请实施例还提供一种计算机程序产品,当所述计算机程序产品在PC上运行时,使得所述PC执行第二方面或上述第二方面的任意一种可能的设计的方法。
本申请的这些方面或其他方面在以下实施例的描述中会更加简明易懂。
附图说明
图1为本申请实施例提供的一种离线模型生成方式示意图;
图2为本申请实施例提供的一种调试应用程序的方法流程示意图;
图3为本申请实施例提供的一种在线模型转换示意图;
图4为本申请实施例提供的一种PC的系统结构示意图;
图5为本申请实施例提供的一种调试应用程序的装置结构示意图;
图6为本申请实施例提供的调试应用程序的方法流程示意图;
图7为本申请实施例提供的一种调试应用程序的应用场景示意图;
图8为本申请实施例提供的另一种PC的系统结构示意图;
图9为本申请实施例提供的一种PC结构示意图。
具体实施方式
为了便于理解,示例的给出了部分与本申请实施例相关概念的说明以供参考。如下所示:
1、IDE是用于提供程序开发环境的应用程序,一般包括代码编辑器、编译器、调试器和图形用户界面等工具。IDE集成了代码编写功能、分析功能、编译功能、调试功能等一体化的开发软件服务套。例如,IDE可以是微软的Visual Studio系列。
2、AI是计算机科学的一个分支,用于了解智能的实质,并生产出一种新的能以人类智能相似的方式做出反应的智能机器,该领域的研究包括机器人、语言识别、图像识别、自然语言处理和专家系统等。
3、HiAI是面向移动终端的AI计算平台,人工智能引擎框架(HiAI Foundation)是HiAI中的芯片能力开放层,HiAI Foundation支持针对神经网络模型运算的专用AI指令集,可以用最少的时钟周期高效并行执行更多的神经网络算子。
4、在线模型是标准的神经网络模型(如Caffe等),在线模型和终端设备信息是无关的。
5、离线模型是将在线模型编译生成的专用AI指令集,离线模型是和终端设备信息是相关的。
举例来说,如图1所示,PC通过编译工具将在线模型编译生成可以在HiAI Foundation上高效执行的离线模型,其中,该离线模型可以保存为二进制文件(例如Offline Model)。之所以将在线模型编译转换为离线模型,是为了能够在NPU上运行,提高运算速度。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请实施例的描述中,除非另有说明,在本申请实施例的描述中,“多个”是指两个或多于两个。
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性 或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。
目前,PC上IDE中的模拟器无法运行具有硬件加速的AI功能的应用程序,IDE也无法支持调试具有硬件加速的AI功能的应用程序。也就是说现有技术不支持开发人员通过IDE对具有硬件加速的AI功能的应用程序进行调试,所以开发人员不得不将程序包导入到终端设备后,通过终端设备进行调试,导致开发效率很低。为了解决这一问题,本申请实施例提供一种调试应用程序的方法,该方法可以由PC执行,本申请结合图2所示的方法流程图对本申请实施例提供的调试应用程序的方法的具体过程进行详细阐述,具体流程如下。
步骤201,PC确定自身的人工智能引擎框架和终端设备上的人工智能引擎框架对在线模型中的各个神经网络算子的支持状态。
其中,该在线模型是应用程序具有的人工智能能力对应的数学模型,该应用程序是可以在支持Android系统的终端设备运行的Android应用程序,也可以是能够在支持IOS系统的终端设备上运行的IOS应用程序。以下以Android应用程序为例进行说明。
具体地,不同的应用程序具有的人工智能能力所对应的在线模型可能不同,不同的在线模型中的神经网络算子是不同的,针对同一个在线模型,不同版本HiAI Foundation所支持的神经网络算子也可能不同。例如说,相册应用具有的图像分类能力所对应的在线模型一与相机应用具有的人脸识别能力所对应的在线模型二两者可能是不同的在线模型,在线模型一和在线模型二中的神经网络算子是不同的。
本申请实施例中,在执行步骤201之前,PC可以预先存储有不同版本的HiAI Foundation对各个在线模型的支持能力,例如针对具有图像分类功能的MobileNet模型,HiAI Foundation100版本不支持该MobileNet模型中的channelwise卷积算子和pointwise卷积算子,HiAI Foundation150版本支持该MobileNet模型中的所有神经网络算子。
一般地,PC可以获取自身的HiAI Foundation版本信息和终端设备上的HiAI Foundation版本信息,先根据终端设备的HiAI Foundation版本信息,确定出该版本的HiAI Foundation对在线模型的支持能力。若PC发现终端设备的HiAI Foundation版本不支持在线模型中的第一神经网络算子,则PC确定第一神经网络算子的支持状态为否。进一步地,PC根据自身的HiAI Foundation版本信息,确定出该版本的HiAI Foundation对在线模型的支持能力。若PC发现PC的HiAI Foundation版本不支持在线模型中的第二神经网络算子,则PC确定第二神经网络算子的支持状态为否。可以理解地,PC根据自身的HiAI Foundation版本信息,确定出该版本的HiAI Foundation对在线模型的支持能力时,可以是根据PC自身的HiAI Foundation对在线模型中除去第一神经网络算子以外的部分确定是否支持。
步骤202,PC根据所述支持状态,将所述在线模型拆分为神经网络部分和神经网络算子部分。
具体地,当PC确定出存在支持状态为否的神经网络算子时,PC从安卓模拟器的CPU的软件算子库中查询是否存在与所述支持状态为否的神经网络算子对应的二进制程序算子,若存在,则PC将在线模型转换拆分为两个部分,即神经网络算子部分和神经网络部分;其中,神经网络算子部分包括PC不支持的神经网络算子和终端设备不支持的神经网络算子;神经网络部分为在线模型中除了神经网络算子部分之外的神经网络部分,包括PC和所述终端设备都支持的神经网络算子。
举例来说,在线模型是具有图像分类功能的MobileNet模型,终端设备和PC所支持的HiAI Foundation版本信息均是HiAI V100。因MobileNet模型中使用了channelwise卷积算子和pointwise卷积算子,终端设备和PC所支持的HiAI Foundation并不支持这两个卷积算子。因此,PC将MobileNet模型拆分成如图3所示的五个部分:1)channelwise卷积算子之前的神经网络部分一;2)channelwise卷积算子;3)channelwise卷积算子与pointwise卷积算子之间的神经网络部分二;4)pointwise卷积算子;5)pointwise卷积算子之后的神经网络部分三。
步骤203,PC将所述神经网络部分转换为离线模型。
接续图3所示的示例,也就是说,PC将三个神经网络部分编译成离线模型,同时PC从安卓模拟器的CPU算子库中查找出channelwis卷积算子与pointwise卷积算子对应的两个二进制程序算子信息。这样,离线模型中的所有神经网络算子均能够被PC和终端设备的硬件加速设备所执行。
需要说明的是,如果安卓模拟器的CPU软件算子库中不存在与支持状态为否的神经网络算子对应的二进制程序算子信息,则PC停止执行下述步骤204,并向用户发送缺失算子信息的报告。安卓模拟器的CPU软件算子库与安卓模拟器模拟的终端设备的硬件CPU的软件算子库是等同的,该终端设备指的是用于运行PC所生成的应用程序包的设备。
步骤204,PC将所述离线模型、所述神经网络算子部分对应的二进制程序算子信息打包到所述应用程序的程序包中,生成具有人工智能能力的应用程序包。
步骤205,当所述PC的安卓模拟器运行所述应用程序包时,所述安卓模拟器调用所述PC的人工智能引擎框架和硬件加速设备对所述离线模型进行加速运算,并执行所述二进制程序算子信息对应的二进制程序算子。
其中,安卓模拟器能在电脑上模拟出安卓手机运行环境,可以理解地安卓模拟器可以模拟出安卓手机的硬件以及软件环境。安卓模拟器上能安装、使用、卸载安卓应用的软件,可以让用户在电脑上体验操作安卓系统。该运行环境中的CPU是一种软件模拟的CPU,该软件模拟的CPU是运行在PC上的硬件CPU上。例如,安卓模拟器可以模拟出华为P20的手机运行环境,或者华为Mate 10的手机运行环境。现有的安卓模拟器无法模拟出安卓手机的硬件加速能力,无法运行需要进行硬件加速的具有AI能力的应用程序。
例如,当所述PC的安卓模拟器运行应用程序包时,在图3中,当HiAI Foundation和NPU执行离线模型的神经网络部分一生成运算结果后,将该运算结果作为输入参数传递给安卓模拟器,由安卓模拟器执行channelwise卷积算子对应的二进制程序算子的运算,然后安卓模拟器将channelwise卷积算子对应的二进制程序算子运算生成的运算结果作为输入参数传递给HiAI Foundation和NPU,HiAI Foundation和NPU根据安卓模拟器传递的输入参数继续执行神经网络部分二的运算结果,然后将该运算结果作为输入参数传递给安卓模拟器,由安卓模拟器执行pointwise卷积算子对应的二进制程序算子的运算,然后安卓模拟器将pointwise卷积算子对应的二进制程序算子运算生成的运算结果作为输入参数传递给HiAI Foundation和NPU,HiAI Foundation和NPU根据该输入参数执行神经网络部分三的运算,生成运算结果,该运算结果返回给安卓模拟器。
另外,若终端设备的HiAI Foundation版本信息所支持的精度低于在线模型的精度,则PC将该在线模型的精度向下调整至该终端设备所支持的精度,反之,则不进行调整,例如终端设备的HiAI Foundation版本信息为HiAI V100,该版本能够支持的精度为float 16位, 而在线模型所支持的精度为float32位,则将float32位向下调整至float16位。
进一步地,本申请实施例提供一种具有图4所示的系统架构的PC,该系统架构包括:IDE101、人工智能引擎框架(HiAI Foundation)102,及硬件加速设备103。
其中,IDE101中除了包括应用程序1010、在线模型1011、安卓模拟器1012,还包括一种调试应用程序的装置1013,该装置1013包括:状态确定单元1013a、模型转换单元1013b、应用程序包生成单元1013c、处理单元1013d。
具体地,例如应用程序1010可以是相册这一应用程序,在线模型1011可以是具有图像分类功能的MobileNet。
其中,状态确定单元1013a,用于确定PC自身的人工智能引擎框架和终端设备上的人工智能引擎框架对在线模型中的各个神经网络算子的支持状态。
其中,在线模型是所述应用程序具有的人工智能能力对应的数学模型。
模型转换单元1013b,用于根据所述支持状态,将在线模型拆分为神经网络部分和神经网络算子部分,并将所述神经网络部分转换为离线模型。其中,神经网络算子部分为支持状态为否的神经网络算子,即PC上的HiAI Foundation不支持的神经网络算子和终端设备的HiAI Foundation不支持的神经网络算子;神经网络部分为在线模型中除了神经网络算子部分之外的神经网络部分。
也就是说,如果在线模型1011中存在PC和终端设备上的人工智能引擎框架所不支持的神经网络算子时,模型转换单元1013b将在线模型1011拆分为神经网络部分和神经网络算子这两部分。然后模型转换单元1013b将神经网络部分转换为离线模型。另外,模型转换单元1013b从安卓模拟器的CPU的软件算子库中查询与神经网络算子部分对应的二进制程序算子信息。
需要说明的是,安卓模拟器的CPU软件算子库指的是安卓模拟器的CPU所能够支持的算子,可以理解地是,安卓模拟器所模拟的终端设备的CPU所能够支持的算子。一般该软件算子库中的算子是二进制程序形式,因此CPU的软件算子库中的算子亦称为二进制程序算子。
应用程序包生成单元1013c,用于将离线模型、二进制程序算子信息打包到应用程序的程序包中,生成具有人工智能能力的应用程序包。
另外,当应用程序包生成单元1013c生成了该应用程序包之后,安卓模拟器1012从应用程序包生成单元1013c中获取该应用程序包。
处理单元1013d,用于当所述安卓模拟器运行该应用程序包时,调用所述人工智能引擎框架和所述硬件加速设备,对所述应用程序包中的离线模型进行加速运算生成第一运算结果,以使所述安卓模拟器根据第一运算结果和所述二进制程序算子信息对应的二进制程序算子进行运算得到目标运算结果。
这样,当开发者在PC的IDE上对具有硬件加速的AI能力的应用程序进行开发和调试时,PC上的IDE可以将在线模型进行转换为与终端设备信息对应的离线模型和二进制程序算子,然后通过本地硬件加速设备对转换后的离线模型进行运算加速,因该离线模型中的神经网络算子均能够被终端设备支持,所以这样得到的运算加速效果能够实现与在终端设备上的运算加速效果相同,因此可以达到了通过PC上的IDE进行开发调试的目的。
在本申请实施例中,当应用程序包生成单元1013c生成了具有人工智能能力的应用程序包后,会将该应用程序包传递至安卓模拟器1012,当安卓模拟器1012运行该应用程序 包时,因安卓模拟器1012的运行环境是安卓操作系统,PC的操作系统是window系统,所以安卓模拟器1012无法直接调用PC中的硬件加速设备对程序包中的离线模型进行加速,为了实现这一功能,故本申请实施例中,调试应用程序的装置1013的处理单元1013d包括仿真容器单元1013e、数据缓存单元1013f,如图5所示。
其中,安卓模拟器1012与仿真容器单元1013e建立传输控制协议(Transmission Control Protocol,TCP)连接,安卓模拟器1012通过仿真容器单元1013e向PC的HiAI Foundation发送运算离线模型的调用请求,该调用请求包括离线模型的信息和待处理的文件信息。
其中,离线模型的信息可以是离线模型对应的二进制文件,也可以是离线模型的保存的路径信息,待处理的文件信息可以指类似于图像文件或者声音文件等需要进行人工智能处理的原始数据。
仿真容器单元1013e接收到安卓模拟器的调用请求后,将调用请求中的待处理的文件信息的数据结构转换成Windows的格式的原始数据,并把Windows的格式的原始数据发送至HiAI Foundation102。
另外,仿真容器单元1013e还将所述调用请求中的应用程序包中的离线模型保存到数据缓存单元1013f中,并将该离线模型在数据缓存单元1013f中保存路径信息发送至HiAI Foundation102。
HiAI Foundation102从所述仿真容器单元1013e接收Windows的格式的原始数据和所述保存路径信息后,从所述保存路径信息获取所述离线模型。然后HiAI Foundation102调用NPU,利用所述离线模型对所述Windows的格式的原始数据进行加速运算,生成第一运算结果。
然后,仿真容器单元1013e从HiAI Foundation102获取第一运算结果,并将该第一运算结果发送至安卓模拟器1012。安卓模拟器1012执行二进制算子信息对应的二进制算子对所述第一运算结果进行运算,最终生成该原始数据的目标运算结果。可以理解地,安卓模拟器1012在运行应用程序包的过程中,可能会多次执行以下过程:安卓模拟器1012通过仿真容器单元1013e调用HiAI Foundation102和NPU以便得到下一步运算结果,并且仿真容器单元1013e将下一步运算结果发给安卓模拟器,安卓模拟器执行二进制程序算子对该下一步运算结果进行运算。
需要说明的是,仿真容器单元1013e首先将第一运算结果转换为安卓数据格式的第一运算结果,然后发送安卓模拟器1012。另外,仿真容器单元1013e可能在执行离线模型的运算时多次调用HiAI Foundation102,并将每次生成的运算结果发送至安卓模拟器1012。
这样,PC中的安卓模拟器就能够使用PC本地的硬件加速设备进行运算加速,同时运算效果能够与在终端设备上运算效果相同,另外,当需要跟踪定位问题时,开发者也可以在PC本地对应用程序跟踪调试,或者在PC本地查看运行过程中生成的相关日志来快速定位问题。
另外,PC完成应用程序的开发和调试后,会输出与终端设备信息对应的程序包,当终端设备导入这一程序包后,可以实现相应的AI功能。示例性的,该终端设备可以为能够进行硬件加速,操作系统为安卓操作系统的智能手机、平板电脑等移动终端设备。终端设备信息可以为终端设备的HiAI Foundation版本信息,终端设备的型号等。
本申请实施例还提供一种调试应用程序的方法,该方法主要应用场景是:当开发者在PC的IDE上进行应用程序的开发和调试时,PC上的IDE可以根据终端设备信息对在线模 型进行转换,然后生成终端设备上可运行的离线模型。如图6所示,本申请实施例提供的调试应用程序的方法的具体过程进行详细阐述,具体流程如下。
步骤601,PC确定终端设备上的人工智能引擎框架对在线模型中的各个神经网络算子的支持状态。
其中,在线模型是所述应用程序具有的人工智能能力对应的数学模型。
同样的,PC可以预先存储有不同版本的HiAI Foundation对各个在线模型的支持能力,PC可以获取终端设备上的HiAI Foundation版本信息,根据终端设备的HiAI Foundation版本信息,查找确定出该版本的HiAI Foundation对在线模型的支持能力。若PC发现终端设备的HiAI Foundation版本不支持线模型中的第一神经网络算子,则PC确定第一神经网络算子的支持状态为否。
步骤602,PC根据所述支持状态,将所述在线模型拆分为神经网络部分和神经网络算子部分。神经网络算子部分为终端设备上的HiAI Foundation不支持的神经网络算子,如上所述第一神经网络算子,神经网络部分为在线模型中除神经网络算子部分以外的部分。
与上文类似,当PC确定出存在支持状态为否的神经网络算子时,PC获取终端设备的信息,根据终端设备的信息确定终端的CPU标识。PC从该CPU标识对应的软件算子库中查询是否存在与所述支持状态为否的神经网络算子对应的二进制程序算子,若存在,则PC将在线模型转换拆分为两个部分;其中,神经网络算子部分为该支持状态为否的神经网络算子;神经网络部分为在线模型中除了神经网络算子部分之外的神经网络部分。
步骤603,PC将所述神经网络部分转换为离线模型。
步骤604,PC将所述离线模型和所述神经网络算子部分对应的二进制程序算子信息打包到应用程序的程序包中,并将所述程序包发送到所述终端设备。
这样,PC就可以输出与终端设备信息对应的程序包,当终端安装了这一程序包后,可以运行该具有AI能力的应用程序。
进一步地,本申请结合图7所示场景,对本申请实施例提供的调试应用程序的方法的具体过程进行举例说明,具体流程如下。
步骤a,PC获取终端设备一的HiAI Foundation的第一版本信息是HiAI V100和终端设备二的HiAI Foundation的第二版本信息是HiAI V150。
步骤b,PC根据HiAI V100,确定HiAI V100对应的HiAI Foundation不支持MobileNet模型中的channelwise卷积算子和pointwise卷积算子。PC将MobileNet模型中除了这两个卷积算子以外的部分转换为第一离线模型,其中,该第一离线模型中的神经网络算子能够被该终端设备一的硬件加速设备运行。PC根据终端设备的信息,确定终端设备的CPU的软件算子库,从该CPU软件算子库中查询到与channelwise卷积算子和pointwise卷积算子对应的二进制程序算子信息。
另外,PC根据HiAI V150,确定HiAI V150对应的HiAI Foundation支持MobileNet模型中的所有神经网络算子。因此,PC将MobileNet模型直接编译转换为第二离线模型。其中,该第二离线模型中的神经网络算子能够被该终端设备二的硬件加速设备运行。
步骤c,PC将第一离线模型、二进制程序算子信息打包到应用程序(例如相册应用)的程序包一中,并将程序包一发送至终端设备一,另外,PC将第二离线模型打包到应用程序(例如相册应用)的程序包二中,并将程序包二发送至终端设备二。
步骤d,终端设备一安装运行程序包一,调用NPU执行该离线模型一,且终端设备一 根据二进制程序算子信息从终端设备的CPU的二进制程序算子库中查找与二进制程序算子信息对应的二进制程序算子,并由CPU来执行这两个二进制程序算子。终端设备二安装运行程序包二,调用NPU执行该离线模型二。
在本申请实施例中,PC可以生成使用与不同终端设备信息对应的程序包,可以减少开发者为了适配不同终端设备手动拆分离线模型的工作量,同时提高了调试的效率。
示例性的,上述终端设备可以为具有硬件加速设备,操作系统为安卓操作系统的智能手机、平板电脑等移动终端设备。
进一步地,该方法可以应用于具有图8所示的系统架构的PC,图8中的系统架构包括IDE101。
其中,IDE101中仅包括应用程序1010、在线模型1011,还包括一种调试应用程序的装置1013,该装置1013包括:状态确定单元1013a、模型转换单元1013b、应用程序包生成单元1013c、发送单元1013g。
具体地,状态确定单元1013a,用于确定终端设备上的人工智能引擎框架对在线模型中的各个神经网络算子的支持状态。
模型转换单元1013b,用于根据所述支持状态,将所述在线模型拆分为神经网络部分和神经网络算子部分,并将神经网络部分转换成离线模型。
应用程序包生成单元1013c,用于将离线模型、所述神经网络算子部分对应的二进制程序算子信息打包到应用程序的程序包中,生成具有人工智能能力的应用程序包。
发送单元1013g,用于将所述应用程序包发送至所述终端设备。
其中,部分单元的具体实现可以参加图4中的各个单元的具体实现,此处不再赘述。
基于以上实施例,本申请实施例还提供了一种PC,其中,该PC具有硬件加速设备(例如GPU和NPU)和CPU,且具有windows操作系统。该PC用于实现图2或6所述的实施例描述的方法,参阅如图9所示,该PC包括处理器901、存储器902以及收发器903。其中该一个或多个计算机程序被存储在上述存储器902中并被配置为被该一个或多个处理器901执行。
处理器901,可以是中央处理单元(central processing unit,CPU),或者为数字处理单元、GPU、NPU等等,处理器901是PC900的控制中心,利用各种接口和线路连接整个PC的各个部分,通过运行或执行存储在存储器902内的计算机程序,以及调用存储在存储器902内的数据,执行PC900的各种功能和数据处理。
存储器902,用于存储待运行的计算机程序,应用程序的代码、在线模型、离线模型等。
收发器903,用于将处理器901生成的应用程序包发送至终端侧。
本申请实施例中不限定上述处理器901以及存储器902之间的具体连接介质。本申请实施例在图9中以存储器902、处理器901以及收发器903之间通过总线904连接,总线在图9中以粗线表示,其它部件之间的连接方式,仅是进行示意性说明,并不引以为限。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图9中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
其中,存储器902可以是易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM);存储器902也可以是非易失性存储器(non-volatile  memory),例如只读存储器,快闪存储器(flash memory),硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD)、或者存储器902是能够用于携带或存储具有指令或数据结构形式的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器902可以是上述存储器的组合。
当存储器902存储的一个或多个计算机程序被所述处理器901执行时,使得PC900执行如图2或者图6相应实施例中的各个步骤,具体过程可以参加上述实施例,该处不再赘述。
基于以上实施例,本申请实施例还提供了一种PC,其中,该PC具有硬件加速设备(例如GPU和NPU)和CPU,且具有windows操作系统。参阅如图9所示,该PC包括处理器901、存储器902以及收发器903。其中该一个或多个计算机程序被存储在上述存储器902中并被配置为被该一个或多个处理器901执行以实现图4或图8中的调试应用程序的装置的功能。
本申请实施例还提供了一种计算机可读存储介质,存储为执行上述处理器所需执行的计算机软件指令,其包含用于执行上述处理器所需执行的程序。
本申请实施例还提供了一种计算机程序产品,当所述计算机程序产品被计算机执行时,使所述计算机执如上述调试应用程序的方法。
本申请实施例还提供了一种计算机可读存储介质,存储为执行上述处理器所需执行的计算机软件指令,其包含用于实现调试应用程序的装置的功能的程序。
本申请实施例还提供了一种计算机程序产品,当所述计算机程序产品被计算机执行时,使所述计算机实现调试应用程序的装置的功能。
综上所述,在本申请一个实施例中,当开发者在PC的IDE上进行应用程序的开发和调试时,主要是通过PC上的IDE可以对在线模型进行转换得到转换后的离线模型,然后通过本地硬件加速设备对转换后的离线模型进行运算加速,因离线模型中的神经网络算子均能够被终端设备支持,所以这样得到的运算加速效果能够实现与在终端设备上的运算加速效果相同,因此可以达到了通过PC上的IDE进行开发调试的目的。在本申请另一个实施例中,PC可以生成使用与不同终端设备信息对应的程序包,可以减少开发者为了适配不同终端设备手动拆分离线模型的工作量,同时提高了调试的效率。
本所属领域的技术人员可以清楚地了解到,本发明提供的各实施例的描述可以相互参照,为描述的方便和简洁,关于本申请实施例提供的各装置、设备的功能以及执行的步骤可以参照本发明方法实施例的相关描述,在此不做赘述。
本领域技术人员还可以了解到本申请实施例列出的各种说明性逻辑块(illustrative logical block)和步骤(step)可以通过电子硬件、电脑软件,或两者的结合进行实现。为清楚展示硬件和软件的可替换性(interchangeability),上述的各种说明性部件(illustrative components)和步骤已经通用地描述了它们的功能。这样的功能是通过硬件还是软件来实现取决于特定的应用和整个系统的设计要求。本领域技术人员可以对于每种特定的应用,可以使用各种方法实现所述的功能,但这种实现不应被理解为超出本申请实施例保护的范围。
本申请实施例中所描述的各种说明性的逻辑块,模块和电路可以通过通用处理单元,数字信号处理单元,专用集成电路(ASIC),现场可编程门阵列(FPGA)或其它可编程逻辑装置,离散门或晶体管逻辑,离散硬件部件,或上述任何组合的设计来实现或操作所描 述的功能。通用处理单元可以为微处理单元,可选地,该通用处理单元也可以为任何传统的处理单元、控制器、微控制器或状态机。处理单元也可以通过计算装置的组合来实现,例如数字信号处理单元和微处理单元,多个微处理单元,一个或多个微处理单元联合一个数字信号处理单元核,或任何其它类似的配置来实现。
本申请实施例中所描述的方法或算法的步骤可以直接嵌入硬件、处理单元执行的软件模块、或者这两者的结合。软件模块可以存储于RAM存储器、闪存、ROM存储器、EPROM存储器、EEPROM存储器、寄存器、硬盘、可移动磁盘、CD-ROM或本领域中其它任意形式的存储媒介中。示例性地,存储媒介可以与处理单元连接,以使得处理单元可以从存储媒介中读取信息,并可以向存储媒介存写信息。可选地,存储媒介还可以集成到处理单元中。处理单元和存储媒介可以配置于ASIC中,ASIC可以配置于用户终端中。可选地,处理单元和存储媒介也可以配置于用户终端中的不同的部件中。
在一个或多个示例性的设计中,本申请实施例所描述的上述功能可以在硬件、软件、固件或这三者的任意组合来实现。如果在软件中实现,这些功能可以存储与电脑可读的媒介上,或以一个或多个指令或代码形式传输于电脑可读的媒介上。电脑可读媒介包括电脑存储媒介和便于使得让电脑程序从一个地方转移到其它地方的通信媒介。存储媒介可以是任何通用或特殊电脑可以接入访问的可用媒体。例如,这样的电脑可读媒体可以包括但不限于RAM、ROM、EEPROM、CD-ROM或其它光盘存储、磁盘存储或其它磁性存储装置,或其它任何可以用于承载或存储以指令或数据结构和其它可被通用或特殊电脑、或通用或特殊处理单元读取形式的程序代码的媒介。此外,任何连接都可以被适当地定义为电脑可读媒介,例如,如果软件是从一个网站站点、服务器或其它远程资源通过一个同轴电缆、光纤电脑、双绞线、数字用户线(DSL)或以例如红外、无线和微波等无线方式传输的也被包含在所定义的电脑可读媒介中。所述的碟片(disk)和磁盘(disc)包括压缩磁盘、镭射盘、光盘、DVD、软盘和蓝光光盘,磁盘通常以磁性复制数据,而碟片通常以激光进行光学复制数据。上述的组合也可以包含在电脑可读媒介中。
本申请的上述描述可以使得本领域技术任何可以利用或实现本申请的内容,任何基于所公开内容的修改都应该被认为是本领域显而易见的,本申请所描述的基本原则可以应用到其它变形中而不偏离本申请的发明本质和范围。因此,本申请所公开的内容不仅仅局限于所描述的实施例和设计,还可以扩展到与本申请原则和所公开的新特征一致的最大范围。

Claims (9)

  1. 一种调试应用程序的方法,该方法应用在个人电脑PC上,其特征在于,所述方法包括:
    所述PC确定自身的人工智能引擎框架和终端设备上的人工智能引擎框架对在线模型中的各个神经网络算子的支持状态,所述在线模型是应用程序具有的人工智能能力对应的数学模型;
    所述PC根据所述支持状态,将所述在线模型拆分为神经网络部分和神经网络算子部分,所述神经网络部分包括所述PC和所述终端设备都支持的神经网络算子,所述神经网络算子部分是所述PC不支持的神经网络算子和所述终端设备不支持的神经网络算子;
    所述PC将所述神经网络部分转换为离线模型;
    所述PC将所述离线模型、所述神经网络算子部分对应的二进制程序算子信息打包到所述应用程序的程序包中,生成具有人工智能能力的应用程序包,以使得所述PC的安卓模拟器运行所述应用程序包时,所述安卓模拟器调用所述PC的人工智能引擎框架和硬件加速设备对所述离线模型进行加速运算,并执行所述二进制程序算子信息对应的二进制程序算子。
  2. 如权利要求1所述的方法,其特征在于,所述执行所述二进制程序算子信息对应的二进制程序算子,包括:
    所述安卓模拟器从所述安卓模拟器的CPU软件算子库中查询到所述二进制程序算子信息对应的二进制程序算子;
    所述安卓模拟器执行所述二进制程序算子。
  3. 如权利要求2所述的方法,其特征在于,所述PC将所述神经网络部分转换为离线模型之后,还包括:
    若所述终端设备上的人工智能引擎框架所支持的计算精度低于所述PC上的人工智能引擎框架所支持的计算精度,则所述PC将所述离线模型的计算精度调整至与所述终端设备上的人工智能引擎框架所支持的计算精度一致。
  4. 一种调试应用程序的方法,该方法应用在个人电脑PC上,其特征在于,包括:
    所述PC确定终端设备上的人工智能引擎框架对在线模型中的各个神经网络算子的支持状态,所述在线模型是所述应用程序具有的人工智能能力对应的数学模型;
    所述PC根据所述支持状态,将所述在线模型拆分为神经网络部分和神经网络算子部分,所述神经网络部分包括所述终端设备都支持的神经网络算子,所述神经网络算子部分是所述终端设备不支持的神经网络算子;
    所述PC将所述神经网络部分转换为离线模型;
    所述PC将所述离线模型和所述神经网络部分对应的二进制程序算子信息打包到所述应用程序的程序包中,并将所述程序包发送到所述终端设备。
  5. 一种调试应用程序的装置,所述装置设置于个人电脑PC中,所述PC包括安卓模拟器、人工智能引擎框架、硬件加速设备和中央处理器CPU,其特征在于,包括:
    状态确定单元,用于确定所述PC的人工智能引擎框架和终端设备上的人工智能引擎框架对在线模型中的各个神经网络算子的支持状态,所述在线模型是所述应用程序具有的人工智能能力对应的数学模型;
    模型转换单元,用于根据所述支持状态,将所述在线模型拆分为神经网络部分和神经网络算子部分,并将所述神经网络部分转换为离线模型;所述神经网络部分包括所述PC和所述终端设备都支持的神经网络算子,所述神经网络算子部分是所述PC不支持的神经网络算子和所述终端设备不支持的神经网络算子;
    应用程序包生成单元,用于将所述离线模型、所述神经网络算子部分对应的二进制程序算子信息打包到所述应用程序的程序包中,生成具有人工智能能力的应用程序包;
    处理单元,用于当所述安卓模拟器从所述应用程序包生成单元获取所述应用程序包并运行所述应用程序包时,根据所述安卓模拟器的调用请求来调用所述PC的所述人工智能引擎框架和所述硬件加速设备对所述应用程序包中的离线模型进行加速运算,生成第一运算结果,以使所述安卓模拟器根据所述第一运算结果和所述二进制程序算子信息对应的二进制程序算子得到目标运算结果。
  6. 如权利要求5所述的装置,其特征在于,所述处理单元包括仿真容器单元和数据缓存单元;
    所述仿真容器单元,用于接收在所述安卓模拟器运行所述应用程序包时发送的所述调用请求,并将所述调用请求中的待处理的文件信息的格式转换为Windows的格式的原始数据;
    所述仿真容器单元,还用于从所述应用程序包生成单元获取所述离线模型,并保存至所述数据缓存单元;
    所述仿真容器单元,还用于将所述Windows的格式的原始数据和所述离线模型在所述数据缓存单元中的保存路径信息发送至所述人工智能引擎框架;
    所述仿真容器单元,还用于获取所述人工智能引擎框架和硬件加速设备利用所述离线模型对所述Windows的格式的原始数据进行运算生成的第一运算结果,并将所述第一运算结果发送至所述安卓模拟器。
  7. 一种调试应用程序的装置,其特征在于,包括:
    状态确定单元,用于确定终端设备上的人工智能引擎框架对在线模型中的各个神经网络算子的支持状态,所述在线模型是所述应用程序具有的人工智能能力对应的数学模型,所述终端设备用于运行所述应用程序;
    模型转换单元,用于根据所述支持状态,将所述在线模型拆分为神经网络部分和神经网络算子部分,并将所述神经网络部分转换为离线模型;所述神经网络部分包括所述终端设备支持的神经网络算子,所述神经网络算子部分是所述终端设备不支持的神经网络算子;
    应用程序包生成单元,用于将所述离线模型、所述神经网络算子部分对应的二进制程序算子信息打包到所述应用程序的程序包中,生成具有人工智能能力的应用程序包;
    发送单元,用于将所述应用程序包发送至所述终端设备。
  8. 一种个人电脑PC,其特征在于,包括一个或多个处理器和一个或多个存储器;
    所述一个或多个存储器与所述一个或多个处理器耦合,所述一个或多个存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述一个或多个处理器执行所述计算机指令时,所述PC执行如权利要求1至7任一项所述的方法。
  9. 一种计算机存储介质,其特征在于,所述计算机可读存储介质包括计算机程序,当计算机程序在PC上运行时,使得所述PC执行如权利要求1至7任一所述的方法。
PCT/CN2018/101399 2018-08-20 2018-08-20 一种调试应用程序的方法及设备 WO2020037475A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/101399 WO2020037475A1 (zh) 2018-08-20 2018-08-20 一种调试应用程序的方法及设备
CN201880072115.8A CN111316227B (zh) 2018-08-20 2018-08-20 一种调试应用程序的方法及设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/101399 WO2020037475A1 (zh) 2018-08-20 2018-08-20 一种调试应用程序的方法及设备

Publications (1)

Publication Number Publication Date
WO2020037475A1 true WO2020037475A1 (zh) 2020-02-27

Family

ID=69592373

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/101399 WO2020037475A1 (zh) 2018-08-20 2018-08-20 一种调试应用程序的方法及设备

Country Status (2)

Country Link
CN (1) CN111316227B (zh)
WO (1) WO2020037475A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113297570B (zh) * 2021-05-21 2022-06-17 浙江工业大学 一种基于卷积神经网络的应用程序在线攻击方法
CN113741863A (zh) * 2021-07-29 2021-12-03 南方电网深圳数字电网研究院有限公司 基于算法模型的应用程序生成方法、电子设备及存储介质
WO2023020516A1 (zh) * 2021-08-17 2023-02-23 华为技术有限公司 一种人工智能ai模型传输方法及装置
CN114924745A (zh) * 2022-05-19 2022-08-19 北京百度网讯科技有限公司 深度学习编译器的运行方法、装置及电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110191753A1 (en) * 2002-07-10 2011-08-04 National Instruments Corporation Incremental deployment and execution of a program on an embedded device
CN106528171A (zh) * 2016-11-24 2017-03-22 郑州云海信息技术有限公司 一种异构计算平台子系统间的接口设计方法、装置及系统
CN107239315A (zh) * 2017-04-11 2017-10-10 北京深鉴智能科技有限公司 面向神经网络异构计算平台的编程模型
CN107391111A (zh) * 2017-06-22 2017-11-24 刘武丰 人工智能协同开发框架及实现方法
CN108388426A (zh) * 2018-04-27 2018-08-10 李喜 一种人工智能开发平台和系统

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104133667B (zh) * 2013-11-29 2017-08-01 腾讯科技(成都)有限公司 实现人工智能行为的方法、装置及人工智能编辑器
CN105666526A (zh) * 2016-03-22 2016-06-15 北京百度网讯科技有限公司 基于人工智能的机器人调试系统
CN106779084B (zh) * 2016-09-30 2019-07-09 广州英康唯尔互联网服务有限公司 机器学习系统及方法
CN107909041A (zh) * 2017-11-21 2018-04-13 清华大学 一种基于时空金字塔网络的视频识别方法
CN108052989A (zh) * 2018-02-07 2018-05-18 深圳市唯特视科技有限公司 一种基于样条卷积神经网络的图像分类方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110191753A1 (en) * 2002-07-10 2011-08-04 National Instruments Corporation Incremental deployment and execution of a program on an embedded device
CN106528171A (zh) * 2016-11-24 2017-03-22 郑州云海信息技术有限公司 一种异构计算平台子系统间的接口设计方法、装置及系统
CN107239315A (zh) * 2017-04-11 2017-10-10 北京深鉴智能科技有限公司 面向神经网络异构计算平台的编程模型
CN107391111A (zh) * 2017-06-22 2017-11-24 刘武丰 人工智能协同开发框架及实现方法
CN108388426A (zh) * 2018-04-27 2018-08-10 李喜 一种人工智能开发平台和系统

Also Published As

Publication number Publication date
CN111316227A (zh) 2020-06-19
CN111316227B (zh) 2021-08-13

Similar Documents

Publication Publication Date Title
WO2020037475A1 (zh) 一种调试应用程序的方法及设备
CN107766126B (zh) 容器镜像的构建方法、系统、装置及存储介质
KR102430739B1 (ko) 데이터 처리방법 및 관련제품
TWI778473B (zh) 人工智能晶片驗證系統、方法,設備及儲存媒體
US9021443B1 (en) Test automation API for host devices
US9658941B2 (en) Methods and systems of function-specific tracing
RU2658190C2 (ru) Управление доступом во время выполнения к интерфейсам прикладного программирования
WO2021057807A1 (zh) 深度学习模型生成方法、装置、设备及存储介质
CN116028292B (zh) 用于远程直接内存访问仿真验证的仿真验证系统及方法
US20220237111A1 (en) Distributed immutable data object testing
CN113805882A (zh) 应用程序开发的方法、装置、电子设备及存储介质
CN113448690B (zh) 监测方法及装置
CN112764981A (zh) 一种协同测试系统及方法
CN115993937A (zh) 一种多进程固态硬盘仿真环境实现方法和装置
JPH08314760A (ja) プログラム開発支援装置
CN114924963A (zh) 网页兼容性测试的分布式执行方法、装置、设备及介质
CN111338761B (zh) 一种51单片机虚拟中断控制器及实现方法
CN113238491B (zh) 执行机构的仿真测试方法、装置、智能臂架及工程车辆
CN110018959B (zh) 一种嵌入式应用调试的方法以及系统
RU2818034C1 (ru) Способ и система запуска приложений в симулируемой среде
CN115809463A (zh) 基于系统调用重定向的物联网固件混合仿真方法及系统
CN113204866A (zh) 一种适用于电力系统云计算的计算中间件方法及系统
CN116527354A (zh) 业务处理方法、装置、运维管理平台和电子设备
CN117493152A (zh) 一种通用的嵌入式软件单元测试环境构建方法及系统
Eberhardt et al. Getting Started with CAPI SNAP: Hardware Development for Software Engineers

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: 18930956

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: 18930956

Country of ref document: EP

Kind code of ref document: A1