# US 2021/0334137 A1 · Data processing method and related products

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0334137 A1
- Document ID: US20210334137A1
- Status: Published application
- Kind: A1
- Application number: 16/623,837
- Filed: 2019-07-19
- Published: 2021-10-28
- Earliest claimed: 2019-04-18
- Assignees: Cambricon Technologies Corporation Limited
- Applicants: Cambricon Technologies Corporation Limited
- Inventors: Yao ZHANG; Xiaofu MENG; Shaoli Liu
- Web page: https://patentgrep.com/patent/US20210334137A1

## CPC

- G06F 9/4887: {involving deadlines, e.g. rate based, periodic}
- G06F 11/362: Debugging of software
- G06F 9/4411: {Configuring for operating with peripheral devices; Loading of device drivers}
- G06F 9/5072: {Grid computing}
- G06F 11/3644: {by instrumenting at runtime}
- G06F 11/3688: {for test execution, e.g. scheduling of test suites}
- G06F 11/3692: {for test results analysis}
- G06F 11/3698: Environments for analysis, debugging or testing of software
- G06N 3/044: Recurrent networks, e.g. Hopfield networks
- G06N 3/0442: characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
- G06N 3/045: Combinations of networks
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/063: using electronic means
- G06N 3/08: Learning methods
- G06F 30/27: using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
- G06F 30/331: with hardware acceleration, e.g. by using field programmable gate array [FPGA] or emulation
- Y02D 10/00: Energy efficient computing, e.g. low power processors, power management or thermal management
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- Y02D: CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE

## Abstract

The present disclosure discloses a data processing method and related products, in which the data processing method includes: generating, by a general-purpose processor, a binary instruction according to device information of an AI processor, and generating an AI learning task according to the binary instruction; transmitting, by the general-purpose processor, the AI learning task to the cloud AI processor for running; receiving, by the general-purpose processor, a running result corresponding to the AI learning task; and determining, by the general-purpose processor, an offline running file according to the running result, where the offline running file is generated according to the device information of the AI processor and the binary instruction when the running result satisfies a preset requirement. By implementing the present disclosure, the debugging between the AI algorithm model and the AI processor can be achieved in advance.

## Claims

### Claim 1

A data processing method implemented in a data processing system comprising a general-purpose processor and a cloud artificial intelligence (AI) processor, wherein the data processing method includes:
generating, by the general-purpose processor, a binary instruction according to device information of an AI processor; generating, by the general-purpose processor, an AI learning task according to the binary instruction; and transmitting, by the general-purpose processor, the AI learning task to the cloud AI processor for running;
receiving, by the cloud AI processor, the AI learning task; and executing, by the cloud AI processor, the AI learning task to generate a running result; and
receiving, by the general-purpose processor, the running result; determining, by the general-purpose processor, an offline running file according to the running result, wherein the offline running file is generated based on the device information of the AI processor and the binary instruction when the running result satisfies a preset requirement.

### Claim 2 (depends on 1)

The data processing method of claim 1, wherein the device information includes hardware architecture information and parameters of running environment in the AI processor, where the parameters of the running environment include at least one of: a base clock speed of the AI processor, an access bandwidth of an off-chip memory and the AI processor, a size of an on-chip memory, a number of cores in the AI processor, and a type of an operating unit in the AI processor.

### Claim 3 (depends on 1)

The data processing method of claim 1, further comprising:
receiving, by the general-purpose processor, the device information of the AI processor, and
writing, by the general-purpose processor, the device information into a driver to select a cloud AI processor based on the device information in the driver.

### Claim 4 (depends on 1)

The data processing method of claim 1, wherein the determining of the offline running file according to the running result includes:
if the running result satisfies the preset requirement, generating a corresponding offline running file according to the binary instruction.

### Claim 5 (depends on 1)

The data processing method of claim 1, wherein the determining of the offline running file according to the running result further includes:
if the running result does not satisfy the preset requirement, executing at least one of optimization operations until the running result satisfies the preset requirement, and generating the corresponding offline running file according to the binary instruction that satisfies the preset requirement, where the optimization operations include one or more of the following: adjusting hardware architecture information of the AI processor, adjusting parameters of running environment of the AI processor, and optimizing the AI learning task.

### Claim 6 (depends on 5)

The data processing method of claim 5, wherein steps of optimizing the AI learning task include one or more of the following:
optimizing the AI learning task by a special programming language,
optimizing the AI learning task by updating a version of the AI learning task, and
adjusting an AI algorithm model.

### Claim 7 (depends on 1)

The data processing method of claim 1, wherein
the running result includes one or more pieces of information of the following: whether running time of the AI learning task on the AI processor satisfies a first expectation, whether load information of a cloud AI processing system when the AI learning task is executed satisfies a second expectation, and whether a result of the AI learning task satisfies a third expectation.

### Claim 8 (depends on 1)

The data processing method of claim 1, wherein the AI processor includes at least one of the following: the AI processor, a field programmable gate array, and a simulator.

### Claim 9

A data processing device, comprising a memory, a general-purpose processor, and a cloud AI processor in a cloud processing system (or platform), wherein a computer program running on the general-purpose processor and/or the AI processor is stored in the memory;
wherein the general-purpose processor is configured to generate a binary instruction according to device information of the AI processor, generate an AI learning task according to the binary instruction, and transmit the AI learning task to the cloud AI processor for running;
the cloud AI processor is configured to receive and execute the AI learning task to generate a running result; and
the general-purpose processor is configured to receive the running result corresponding to the AI learning task, and determine an offline running file according to the running result; where the offline running file is generated according to the device information of the AI processor and the binary instruction when the running result satisfies a preset requirement.

### Claim 10 (depends on 9)

The data processing device of claim 9, wherein the device information includes hardware architecture information and parameters of running environment of the AI processor, where the parameters of running environment include at least one of the following: a base clock speed of the AI processor, an access bandwidth of an off-chip memory and the AI processor, a size of an on-chip memory, a number of the cores of the AI processor, and a type of an operating unit of the AI processor.

### Claim 11 (depends on 9)

The data processing device of claim 9, wherein the general-purpose processor is further configured to:
receive the device information of the AI processor, and
select a cloud AI processor in the cloud processing system based on the received device information.

### Claim 12 (depends on 9)

The data processing device of claim 9, wherein the general-purpose processor is further configured to determine the offline running file according to the running result, and wherein
if the running result satisfies the preset requirement, the general-purpose processor is configured to generate the corresponding offline running file according to the binary instruction.

### Claim 13 (depends on 9)

The data processing device of claim 9, wherein the general-purpose processor is further configured to determine the offline running file according to the running result, and wherein:
if the running result does not satisfy the preset requirement, the general-purpose processor is configured to execute at least one optimization operation until the running result satisfies the preset requirement, and generate a corresponding offline running file according to the binary instruction that satisfies the preset requirement, where the optimization operation includes one or more of the following: adjusting the hardware architecture information of the AI processor, adjusting the parameters of running environment of the AI processor, and optimizing the AI learning task.

### Claim 14 (depends on 13)

The data processing device of claim 13, wherein steps of optimizing the AI learning task include one or more of the following:
optimizing the AI learning task by a special programming language,
optimizing the AI learning task by updating a version of the AI learning task, and
adjusting an AI algorithm model.

### Claim 15 (depends on 9)

The data processing device of claim 9, wherein the running result includes one or more pieces of information of the following: whether running time of the AI learning task on the cloud AI processor satisfies a first expectation, whether load information of an cloud AI processing system when the AI learning task is executed satisfies a second expectation, and whether a result of the AI learning task satisfies a third expectation.

### Claim 16 (depends on 9)

The data processing device of claim 9, wherein the AI processor includes at least one of: a hardware piece of the AI processor, a field programmable gate array, and a simulator.

### Claim 17

A method of testing a performance of an AI computation model running on an AI processor through simulation, comprising:
generating a set of binary instructions for the AI computation module based on device information of the AI processor and the AI computation model;
generating an AI learning task based on the set of binary instructions;
transmitting the AI learning task to a cloud AI processor in a cloud processing system for execution, wherein the cloud AI processor is selected to match the AI processor based on the device information of the AI processor;
receiving a running result from the cloud processing system; and
determining whether the running result meets a requirement.

### Claim 18 (depends on 17)

The method of claim 17, further comprising:
if it is determined that the running result does not meet the requirement, adjust the set of binary instructions to generate a modified AI learning task; and
transmit the modified AI learning task to the cloud AI processor for execution.

### Claim 19 (depends on 18)

The method of claim 18, wherein adjusting the set of binary instructions comprises:
adjusting the device information; and
generating the set of binary instructions based on the adjusted device information.

### Claim 20 (depends on 17)

The method of claim 17, further comprising:
if it is determined that the running result meets the requirement, generating an offline running file based on the device information and the set of binary instructions.
