CN111553473A - 数据冗余方法及执行数据冗余方法的神经网络处理器 - Google Patents

数据冗余方法及执行数据冗余方法的神经网络处理器 Download PDF

Info

Publication number
CN111553473A
CN111553473A CN202010617408.9A CN202010617408A CN111553473A CN 111553473 A CN111553473 A CN 111553473A CN 202010617408 A CN202010617408 A CN 202010617408A CN 111553473 A CN111553473 A CN 111553473A
Authority
CN
China
Prior art keywords
data
instruction
neural network
redundancy
unit
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN202010617408.9A
Other languages
English (en)
Other versions
CN111553473B (zh
Inventor
陈天石
张磊
刘少礼
王在
周徐达
杜子东
胡帅
何皓源
周聖元
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Cambricon Information Technology Co Ltd
Original Assignee
Shanghai Cambricon Information Technology Co Ltd
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
Priority claimed from CN201710578784.XA external-priority patent/CN109254867B/zh
Priority claimed from CN201710677922.XA external-priority patent/CN109376845B/zh
Priority claimed from CN201710793531.4A external-priority patent/CN107578014B/zh
Priority claimed from CN201710910124.7A external-priority patent/CN109583577B/zh
Application filed by Shanghai Cambricon Information Technology Co Ltd filed Critical Shanghai Cambricon Information Technology Co Ltd
Priority to CN202010617408.9A priority Critical patent/CN111553473B/zh
Publication of CN111553473A publication Critical patent/CN111553473A/zh
Application granted granted Critical
Publication of CN111553473B publication Critical patent/CN111553473B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/3296Power saving characterised by the action undertaken by lowering the supply or operating voltage
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1004Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1008Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices
    • G06F11/1044Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices with specific ECC/EDC distribution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1008Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices
    • G06F11/1048Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices using arrangements adapted for a specific error detection or correction feature
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • G06F11/1451Management of the data involved in backup or backup restore by selection of backup contents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/18Error detection or correction of the data by redundancy in hardware using passive fault-masking of the redundant circuits
    • G06F11/186Passive fault masking when reading multiple copies of the same data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3024Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3058Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3058Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations
    • G06F11/3062Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations where the monitored property is the power consumption
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0875Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches with dedicated cache, e.g. instruction or stack
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • G06F18/24133Distances to prototypes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
    • G06F3/012Head tracking input arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/017Gesture based interaction, e.g. based on a set of recognized hand gestures
    • 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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/3004Arrangements for executing specific machine instructions to perform operations on memory
    • 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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/3004Arrangements for executing specific machine instructions to perform operations on memory
    • G06F9/30047Prefetch instructions; cache control instructions
    • 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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3836Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution
    • 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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3885Concurrent instruction execution, e.g. pipeline or look ahead using a plurality of independent parallel functional units
    • G06F9/3893Concurrent instruction execution, e.g. pipeline or look ahead using a plurality of independent parallel functional units controlled in tandem, e.g. multiplier-accumulator
    • 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • 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
    • 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/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/94Hardware or software architectures specially adapted for image or video understanding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/174Facial expression recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/324Power saving characterised by the action undertaken by lowering clock frequency
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/1608Error detection by comparing the output signals of redundant hardware
    • G06F11/1612Error detection by comparing the output signals of redundant hardware where the redundant component is persistent storage
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/1666Error detection or correction of the data by redundancy in hardware where the redundant component is memory or memory area
    • G06F11/167Error detection by comparing the memory output
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/81Threshold
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2203/00Indexing scheme relating to G06F3/00 - G06F3/048
    • G06F2203/01Indexing scheme relating to G06F3/01
    • G06F2203/011Emotion or mood input determined on the basis of sensed human body parameters such as pulse, heart rate or beat, temperature of skin, facial expressions, iris, voice pitch, brain activity patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/45Caching of specific data in cache memory
    • G06F2212/452Instruction code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/544Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices for evaluating functions by calculation
    • G06F7/5443Sum of products
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/57Arithmetic logic units [ALU], i.e. arrangements or devices for performing two or more of the operations covered by groups G06F7/483 – G06F7/556 or for performing logical operations
    • 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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/30007Arrangements for executing specific machine instructions to perform operations on data operands
    • G06F9/3001Arithmetic instructions
    • 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/044Recurrent networks, e.g. Hopfield networks
    • 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/047Probabilistic or stochastic networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Quality & Reliability (AREA)
  • Evolutionary Computation (AREA)
  • Mathematical Physics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Human Computer Interaction (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Neurology (AREA)
  • Computational Mathematics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Medical Informatics (AREA)
  • Algebra (AREA)
  • Advance Control (AREA)
  • Hardware Redundancy (AREA)

Abstract

本申请公开了一种数据冗余方法和神经网络处理器,包括:存储单元,控制单元、运算单元和指令冗余处理单元。

Description

数据冗余方法及执行数据冗余方法的神经网络处理器
技术领域
本申请涉及数据处理领域,更具体地涉及一种数据冗余方法及执行数据冗余方法的神经网络处理器。
背景技术
数据冗余技术采用副本冗余或者纠错编码的方式提高数据的安全性和可靠性,但是数据冗余技术带来巨大的存储容量开销和访存功耗开销,针对大规模的数据,这个问题会更加严重。因此如何结合数据的特性进行数据冗余成为一个亟待解决的问题。
发明内容
鉴于现有方案存在的问题,为了克服上述现有技术方案的不足,本申请提出了一种数据冗余方法及神经网络处理器。
根据本申请的一个方面,提供了一种执行数据冗余方法的神经网络处理器,包括:存储单元,控制单元、运算单元和指令冗余处理单元;
存储单元,用于接收外界输入的数据,存储神经网络的神经元、权值和指令,并将指令发送给指令控制单元,将神经元和权值发送给运算单元;
控制单元,接收存储单元发送的指令,经过译码后生成控制信息控制运算单元;
运算单元,用于接收存储单元发送的权值和神经元,完成神经网络训练运算并将输出神经元重新传输给存储单元存储;
指令冗余处理单元,用于对指令进行数据冗余处理。
本申请另一方面提供一种数据冗余方法,所述方法应用于神经网络处理器,所述神经网络处理器包括:存储单元,控制单元、运算单元和指令冗余处理单元;所述方法包括:
存储单元接收外界输入的数据,存储神经网络的神经元、权值和指令,并将指令发送给指令控制单元,将神经元和权值发送给运算单元;
控制单元接收存储单元发送的指令,经过译码后生成控制信息控制运算单元;
运算单元接收存储单元发送的权值和神经元,完成神经网络训练运算并将输出神经元重新传输给存储单元存储;
指令冗余处理单元对指令进行数据冗余处理。
从上述技术方案可以看出,本申请具有至少以下有益效果:
对数据选择性的进行冗余处理,减少存储容量开销和访存功耗开销;
区分数据的重要等级,对不同重要等级的数据进行不同的冗余处理,保证存储数据的安全性和可靠性的同时,减少存储容量占用和访存功耗。
附图说明
图1为本申请一实施例中数据冗余方法的流程图;
图2为本申请另一实施例数据冗余装置的结构框图;
图3为本申请一实施例神经网络处理器;
图4为本申请实例提供的运算单元的结构示意图;
图5为本申请实施例提供的运算单元的另一结构示意图;
图6为本申请实施例提供的运算单元的又一结构示意图。
具体实施方式
本申请某些实施例于后方将参照所附附图做更全面性地描述,其中一些但并非全部的实施例将被示出。实际上,本申请的各种实施例可以许多不同形式实现,而不应被解释为限于此数所阐述的实施例;相对地,提供这些实施例使得本申请满足适用的法律要求。
在本说明书中,下述用于描述本申请原理的各种实施例只是说明,不应该以任何方式解释为限制申请的范围。参照附图的下述描述用于帮助全面理解由权利要求及其等同物限定的本申请的示例性实施例。
为使本申请的目的、技术方案和优点更加清楚明白,以下结合具体实施例,并参照附图,对本申请进一步详细说明。
本申请实施例提供了一种数据冗余方法,通过将数据划分为多个重要等级,并针对不同的重要等级的数据进行不同的数据冗余处理,在保证存储数据的安全性和可靠性的基础上,减少存储容量开销和访存功耗开销。
具体的,图1示出了数据冗余方法的流程图,如附图1所示,数据冗余方法包括以下具体步骤:
步骤S101:将数据划分为M个重要等级,M为正整数;
具体地,数据的重要等级可以综合考虑数据的大小,数据绝对值的大小,数据的类型(浮点型、定点型),数据的读操作频率,数据写操作频率等因素进行设置。
步骤S102:提取每一重要等级中的每一数据的重要比特位;
具体地,数据中的比特位分为重要比特位和非重要比特位。若数据共有x个比特位,其中y个比特位是重要比特位,(x-y)个比特位是不重要比特位,其中x,y为正整数。后续仅对数据的y个重要比特位进行处理,y个重要比特位的位置可以是连续的,也可以是不连续的。
步骤S103:针对所述重要比特位进行数据冗余处理。
具体地,所述数据冗余处理包括副本冗余处理和/或纠错编码处理,可以根据不同的重要性来进行不同的处理,例如可以,当一数据中的所有比特位均为重要比特位时,对该数据的所有比特位进行纠错编码处理,当一数据中的部分比特位为重要比特位时,对该数据的重要比特位进行副本冗余处理。
副本冗余可以在同一块存储介质备份冗余,也可以在不同存储介质备份冗余。数据可以同时备份N份,其中N是大于0的正整数。纠错编码方式包括但不仅限于循环冗余校验(Cyclic Redundancy Check,CRC),错误检查和纠正(Error Correcting Code,ECC)。
以下通过几个实例具体介绍本实施例中的数据冗余方法。
实例0:对神经网络指令做冗余,对参数不做冗余
将神经网络指令设定为第1重要等级,将神经网络的参数设定为第2重要等级。其中神经网络参数包括拓扑结构信息,神经元数据和权值数据。对第1重要等级的数据进行冗余存储,对第2重要等级的数据不进行冗余存储。当对第1重要等级数据进行读操作时,读取原始数据和备份的两份数据,若出现相应数据不一致,则取相同的两份数据作为最终读取的数据,同时将第三份不一致的数据进行修复。当对第1重要等级数据进行写操作时,同时写回到两个备份地址,同时保证原始数据和两个备份数据一致。
如图3所示,对神经网络处理器由存储单元,控制单元和运算单元组成。存储存储单元接收外界的输入数据,存储神经网络的神经元、权值和指令,并将指令发送给指令控制单元,将神经元和权值发送给运算单元。
指令控制单元,接收存储单元发送的指令,经过译码后生成控制信息控制运算单元。
运算单元,用于接收存储单元发送的权值和神经元,完成神经网络训练运算并将输出神经元重新传输给存储单元存储。
神经网络处理器还包括指令冗余处理单元,分别内嵌至存储单元和指令控制单元中,对指令进行数据冗余处理。
在本公开的一些实施例中,运算单元的拓扑结构可以如图4所示,运算单元可以包括一个主处理电路和多个从处理电路。图4所示的拓扑结构为树型模块,所述树型模块包括:一个根端口和多个支端口,所述树型模块的根端口连接所述主处理电路,所述树型模块的多个支端口分别连接多个从处理电路中的一个从处理电路;所述树型模块,用于转发所述主处理电路与所述多个从处理电路之间的数据块、权值以及运算指令。如图4所示,树型模块可以包括多层节点结构,节点为具有转发功能的结构,该节点本身可以不具有计算功能。
在本公开的一些实施例中,运算单元的拓扑结构可以如图5所示,运算单元可以包括一个主处理电路、多个从处理电路、和分支处理电路。所述主处理电路,具体用于将一个输入神经元分配成多个数据块,将所述多个数据块中的至少一个数据块、权值以及多个运算指令中的至少一个运算指令发送给所述分支处理电路;
所述分支处理电路,用于转发所述主处理电路与所述多个从处理电路之间的数据块、权值以及运算指令;
所述多个从处理电路,用于依据该运算指令对接收到的数据块以及权值执行运算得到中间结果,并将中间结果传输给所述分支处理电路;
所述主处理电路,用于将分支处理电路发送的中间结果进行后续处理得到该计算指令的结果,将该计算指令的结果发送给所述控制器单元。
在本公开的一些实施例中,运算单元的拓扑结构可以如图6所示,运算单元可以包括一个主处理电路和多个从处理电路。所述多个从处理电路呈阵列分布;每个从处理电路与相邻的其他从处理电路连接,所述主处理电路连接所述多个从处理电路中的k个从处理电路,所述k个从处理电路为:第1行的n个从处理电路、第m行的n个从处理电路以及第1列的m个从处理电路;
所述k个从处理电路,用于在所述主处理电路以及多个从处理电路之间的数据以及指令的转发;
所述主处理电路,用于将一个输入数据分配成多个数据块,将所述多个数据块中的至少一个数据块以及多个运算指令中的至少一个运算指令发送给所述k个从处理电路;
所述k个从处理电路,用于转换所述主处理电路与所述多个从处理电路之间的数据;
所述多个从处理电路,用于依据该运算指令对接收到的数据块执行运算得到中间结果,并将运算结果传输给所述K个从处理电路;
所述主处理电路,用于将所述K个从处理电路发送的中间结果进行后续处理得到该计算指令的结果,将该计算指令的结果发送给所述控制器单元。在一些实施例中,所述主处理电路,具体用于将多个从处理电路发送的中间结果进行组合排序得到该计算指令的结果;
在一些实施例中,主处理电路,具体用于将多个处理电路的发送的中间结果进行组合排序以及激活处理后得到该计算指令的结果。
在一些实施例中,所述主处理电路包括:转换处理电路、激活处理电路、加法处理电路中的一种或任意组合;
所述转换处理电路,用于对所述数据执行前序处理,具体为:将主处理电路接收的数据或中间结果执行第一数据结构与第二数据结构之间的互换;或将主处理电路接收的数据或中间结果执行第一数据类型与第二数据类型之间的互换;
所述激活处理电路,用于执行所述后续处理,具体为执行主处理电路内数据的激活运算;
所述加法处理电路,用于执行所述后续处理,具体为执行加法运算或累加运算。
在一些实施例中,所述从处理电路包括:乘法处理电路;
所述乘法处理电路,用于对接收到的数据块执行乘积运算得到乘积结果。
在一些实施例中,所述从处理电路还包括:累加处理电路,所述累加处理电路,用于对该乘积结果执行累加运算得到该中间结果。
在一些实施例中,所述树型模块为n叉树结构,所述n为大于等于2的整数。
实例1:对神经网络参数进行数据冗余。
首先将神经网络参数按照参数绝对值大小确定M个重要等级,第1、2……M重要等级,并将参数对应划入各重要等级。
具体地,设定M+1个阈值,按照从大到小排序后的分别记为T0,T1,T2,…及TM。当神经网络参数的绝对值D满足Ti-1>D>Ti时,该数据归为第i个重要等级,其中i=1,2……,M,T0,T1,T2,…及TM均为实数,且T0>T1>T2>…>TM≥0。即神经网络参数的绝对值T0>D>T1时,划入第1重要等级,神经网络参数的绝对值T1>D>T2时,划入第2重要等级,依次类推。
对于第i重要等级参数中浮点型的一参数,共有xi个比特位,设置符号位与指数部分以及底数部分前yi位指定为重要比特位,其中xi,yi均为正整数,且0<yi≤xi
对于第i重要等级参数中的定点型的参数,共有xi个比特位,设置设符号位和数值部分前zi位是重要比特位,其中xi,zi均为正整数,且0<zi≤xi
对第i重要等级参数中重要比特位采用数据备份的方式进行数据冗余,并且备份两份,对不重要比特位不进行冗余存储。当对第i重要等级中的参数进行读操作时,对于重要比特位同时读取原始数据和备份的两份数据,若出现相应数据不一致,则取相同的两份数据作为最终读取的数据,同时将第三份不一致的数据进行修复。当对第i重要等级参数进行写操作时,对于重要比特位同时写回到两个备份地址,同时保证原始数据中的数据和两个备份数据一致。
实例2:对稀疏神经网络参数进行数据冗余。
本实例中稀疏神经网络参数分为两部分,分别是非零参数和非零参数位置。
将非零参数位置设置为第1重要等级,并且将其所有的比特位标记为重要比特性,采用CRC校验码的方式进行冗余存储。当进行读操作时,读取存储CRC校验码并对原始数据进行CRC校验码计算,如果两个CRC校验码不一致,则按照存储的CRC校验码对数据进行修正。进行写操作时,同时存储原始数据和CRC校验码。
将神经网络的非零参数按照参数绝对值大小设置重要等级,从第2重要等级开始依次设置M-1个重要等级。设定M个阈值,按照从大到小排序后的分别记为T1,T2,…及TM。当非零参数的绝对值D满足Ti-1>D>Ti时,该数据归为第i个重要等级,其中i=2,3……,M,T1,T2,…及TM均为实数,且T1>T2>…>TM≥0。即非零参数的绝对值满足T1>D>T2时,划入第2重要等级,非零参数的绝对值满足T2>D>T3时,划入第3重要等级依次类推。
对于第i重要等级参数中浮点型的一参数,共有xi个比特位,设置符号位与指数部分以及底数部分前yi位指定为重要比特位,其中xi,yi均为正整数,且0<yi≤xi
对于第i重要等级参数中的定点型的参数,共有xi个比特位,设置设符号位和数值部分前zi位是重要比特位,其中xi,zi均为正整数,且0<zi≤xi
对第i重要等级参数中重要比特位,采用数据备份的方式进行数据冗余,并且备份两份,对不重要比特位不进行冗余存储。当对第i重要等级中的参数进行读操作时,对于重要比特位同时读取原始数据和备份的两份数据,若出现相应数据不一致,则取相同的两份数据作为最终读取的数据,同时将第三份不一致的数据进行修复。当对第i重要等级参数进行写操作时,对于重要比特位同时写回到两个备份地址,同时保证原始数据中的数据和两个备份数据一致。
实施例3:图计算的应用中数据冗余。
本实施中图计算应用中数据分为两部分,包括顶点数据和边数据。
将图计算应用中的顶点数据设置为第1重要等级,并且将所有的数据比特位标记为重要比特性,采用CRC校验码的方式进行冗余存储。当进行读操作时,读取存储CRC校验码并对原始数据进行CRC校验码计算,如果两个CRC校验码不一致,则按照存储的CRC校验码对数据进行修正。进行写操作时,同时存储原始数据和CRC校验码。
将图计算应用中边数据按照边的访问频率设置重要等级,从第2重要等级开始依次设置M-1个重要等级。按照从大到小排序后的分别记为T1,T2,…及TM。当边数据访问频率F满足Ti-1>F>Ti时,该数据归为第i个重要等级,其中i=2,3……,M,T1,T2,…及TM均为实数,且T1>T2>…>TM≥0,即边数据访问频率满足T1>F>T2时,划入第2重要等级,边数据访问频率满足T2>F>T3时,划入第3重要等级依次类推。
对于第i重要等级中浮点型的边数据,共有xi个比特位,设置符号位与指数部分以及底数部分前yi位指定为重要比特位,其中xi,yi均为正整数,且0<yi≤xi
对于第i重要等级参数中的定点型的边数据,共有xi个比特位,设置设符号位和数值部分前zi位是重要比特位,其中xi,zi均为正整数,且0<zi≤xi
第i重要等级边数据中重要比特位采用数据备份的方式进行数据冗余,并且备份两份,对不重要比特位不进行冗余存储。当对第i重要等级边数据进行读操作时,对于重要比特位同时读取原始数据和备份的两份数据,若出现数据不一致,则取相同的两份数据作为最终读取的数据,同时将第三份不一致数据修复。当对第i重要等级边数据进行写操作时,对于重要比特位同时写回到两个备份地址,同时保证原始数据中的数据和两个备份数据一致。
本申请另一实施例提供一种数据冗余装置100,图2示出了数据冗余装置的结构框图,如图2所示,数据冗余装置100包括重要等级划分单元10、重要比特位提取单元20以及数据冗余处理单元30。
其中,重要等级划分单元10用于根据重要性将数据划分为M个重要等级,M为正整数,具体地,数据的重要等级可以综合考虑数据的大小,数据绝对值的大小,数据的类型(浮点型、定点型),数据的读操作频率,数据写操作频率等因素进行设置。
重要比特位提取单元20用于提取每一重要等级中的每一数据的重要比特位。重要比特位提取单元20会识别不同重要等级的数据,并将数据比特位分为重要数据比特位和不重要数据比特位。同时对每一个重要等级的每一数据,提取重要比特位。
数据冗余处理单元30用于针对所述重要比特位进行数据冗余处理。
如图2所示,数据冗余处理单元30包括冗余存储单元31和读写控制单元32。
冗余存储单元31可以对原始数据进行存储,并且对数据中的重要比特位进行数据冗余存储。数据冗余可以是副本备份或者纠错编码。副本可以同时备份N份,其中N是大于0的正整数。纠错编码方式包括但不仅限于CRC校验,ECC校验。冗余存储单元31可以是硬盘,DRAM,SRAM,ECC-DRAM,ECC-SRAM和非易失性内存。
读写控制单元32能够对冗余的数据进行读写操作,保证读写数据的一致性。
前面的附图中所描绘的进程或方法可通过包括硬件(例如,电路、专用逻辑等)、固件、软件(例如,被承载在非瞬态计算机可读介质上的软件),或两者的组合的处理逻辑来执行。虽然上文按照某些顺序操作描述了进程或方法,但是,应该理解,所描述的某些操作能以不同顺序来执行。此外,可并行地而非顺序地执行一些操作。
需要说明的是,在附图或说明书正文中,未绘示或描述的实现方式,均为所属技术领域中普通技术人员所知的形式,并未进行详细说明。此外,上述对各元件和方法的定义并不仅限于实施例中提到的各种具体结构、形状或方式,本领域普通技术人员可对其进行简单地更改或替换。
以上所述的具体实施例,对本申请的目的、技术方案和有益效果进行了进一步详细说明,应理解的是,以上所述仅为本申请的具体实施例而已,并不用于限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (17)

1.一种执行数据冗余方法的神经网络处理器,其特征在于,包括:存储单元,控制单元、运算单元和指令冗余处理单元;
存储单元,用于接收外界输入的数据,存储神经网络的神经元、权值和指令,并将指令发送给指令控制单元,将神经元和权值发送给运算单元;
控制单元,接收存储单元发送的指令,经过译码后生成控制信息控制运算单元;
运算单元,用于接收存储单元发送的权值和神经元,完成神经网络训练运算并将输出神经元重新传输给存储单元存储;
指令冗余处理单元,用于对指令进行数据冗余处理。
2.根据权利要求1所述的神经网络处理器,其特征在于,
所述指令冗余处理单元,具体用于对所述指令数据进行读操作时,读取原始数据和备份的两份数据,若出现不一致,则取相同的两份数据作为最终读取的数据,同时将第三份不一致的数据进行修复;当对所述指令数据进行写操作时,同时将所述指令数据写回到两个备份地址,同时保证原始数据和两个备份数据一致。
3.根据权利要求1所述的神经网络处理器,其特征在于,所述指令冗余处理单元分别内嵌至存储单元和控制单元中。
4.根据权利要求1所述的神经网络处理器,其特征在于,所述数据包括:神经网络参数,按照神经网络参数的绝对值划分M个重要等级,按照由大到小的顺序设定M+1个阈值T0,T1,T2,…及TM,当神经网络参数的绝对值D满足Ti-1>D>Ti时,该数据归为第i个重要等级,其中i=1,2……,M,T0,T1,T2,…及TM均为实数,且T0>T1>T2>…>TM≥0。
5.根据权利要求1所述的神经网络处理器,其特征在于,所述数据包括稀疏神经网络参数,所述稀疏神经网络参数包括非零参数和非零参数位置,所述非零参数位置设置为第1重要等级,非零参数按照参数绝对值划分M-1个重要等级,按照由大到小的顺序设定M个阈值T1,T2,…及TM,当非零参数的绝对值D满足Ti-1>D>Ti时,该数据归为第i个重要等级,其中i=2,3……,M,T1,T2,…及TM均为实数,且T1>T2>…>TM≥0。
6.根据权利要求1所述的神经网络处理器,其特征在于,所述数据包括图计算应用数据,包括顶点数据和边数据,所述顶点数据设置为第1重要等级,边数据按照访问频率划分M-1个重要等级,按照由大到小的顺序设定M个阈值T1,T2,…及TM,当边数据按照访问频率F满足Ti-1>F>Ti时,该数据归为第i个重要等级,其中i=2,3……,M,T1,T2,…及TM-1均为实数,且T1>T2>…>TM≥0。
7.根据权利要求1所述的神经网络处理器,其特征在于,
所述数据为浮点型参数,设置符号位、指数部分以及底数部分前y位指定为重要比特位,y为正整数;和/或
所述数据为定点型参数,设置符号位、数值部分前z位指定为重要比特位,z为正整数。
8.根据权利要求1或2所述的神经网络处理器,其特征在于,所述运算单元包括一个主处理电路、多个从处理电路和分支处理电路;
所述主处理电路,具体用于将一个输入神经元分配成多个数据块,将所述多个数据块中的至少一个数据块、权值以及多个运算指令中的至少一个运算指令发送给所述分支处理电路;
所述分支处理电路,用于转发所述主处理电路与所述多个从处理电路之间的数据块、权值以及运算指令;
所述多个从处理电路,用于依据该运算指令对接收到的数据块以及权值执行运算得到中间结果,并将中间结果传输给所述分支处理电路;
所述主处理电路,用于将分支处理电路发送的中间结果进行后续处理得到该计算指令的结果,将该计算指令的结果发送给所述控制单元。
9.根据权利要求1或2所述的神经网络处理器,其特征在于,所述运算单元包括一个主处理电路和多个从处理电路;所述多个从处理电路呈阵列分布;每个从处理电路与相邻的其他从处理电路连接,所述主处理电路连接所述多个从处理电路中的k个从处理电路,所述k个从处理电路为:第1行的n个从处理电路、第m行的n个从处理电路以及第1列的m个从处理电路;
所述k个从处理电路,用于在所述主处理电路以及多个从处理电路之间的数据以及指令的转发;
所述主处理电路,用于将一个输入数据分配成多个数据块,将所述多个数据块中的至少一个数据块以及多个运算指令中的至少一个运算指令发送给所述k个从处理电路;
所述k个从处理电路,用于转换所述主处理电路与所述多个从处理电路之间的数据;
所述多个从处理电路,用于依据该运算指令对接收到的数据块执行运算得到中间结果,并将运算结果传输给所述k个从处理电路;
所述主处理电路,用于将所述k个从处理电路发送的中间结果进行后续处理得到该计算指令的结果,将该计算指令的结果发送给所述控制单元。
10.一种数据冗余方法,其特征在于,所述方法应用于神经网络处理器,所述神经网络处理器包括:存储单元,控制单元、运算单元和指令冗余处理单元;所述方法包括:
存储单元接收外界输入的数据,存储神经网络的神经元、权值和指令,并将指令发送给指令控制单元,将神经元和权值发送给运算单元;
控制单元接收存储单元发送的指令,经过译码后生成控制信息控制运算单元;
运算单元接收存储单元发送的权值和神经元,完成神经网络训练运算并将输出神经元重新传输给存储单元存储;
指令冗余处理单元对指令进行数据冗余处理。
11.根据权利要求10所述的方法,其特征在于,所述指令冗余处理单元对指令进行数据冗余处理具体包括:
对所述指令数据进行读操作时,读取原始数据和备份的两份数据,若出现数据不一致,则取相同的两份数据作为最终读取的数据,同时将第三份不一致的数据进行修复;当对所述指令数据进行写操作时,同时将所述指令数据写回到两个备份地址,同时保证原始数据和两个备份数据一致。
12.根据权利要求10所述的方法,其特征在于,所述方法还包括:
若所述数据包括神经网络参数时,按照神经网络参数的绝对值划分M个重要等级,按照由大到小的顺序设定M+1个阈值T0,T1,T2,…及TM,当神经网络参数的绝对值D满足Ti-1>D>Ti时,该数据归为第i个重要等级,其中i=1,2……,M,T0,T1,T2,…及TM均为实数,且T0>T1>T2>…>TM≥0;
若所述数据包括稀疏神经网络参数时,所述稀疏神经网络参数包括非零参数和非零参数位置,所述非零参数位置设置为第1重要等级,非零参数按照参数绝对值划分M-1个重要等级,按照由大到小的顺序设定M个阈值T1,T2,…及TM,当非零参数的绝对值D满足Ti-1>D>Ti时,该数据归为第i个重要等级,其中i=2,3……,M,T1,T2,…及TM均为实数,且T1>T2>…>TM≥0;
若所述数据包括图计算应用数据时,所述图计算应用数据包括顶点数据和边数据,所述顶点数据设置为第1重要等级,边数据按照访问频率划分M-1个重要等级,按照由大到小的顺序设定M个阈值T1,T2,…及TM,当边数据按照访问频率F满足Ti-1>F>Ti时,该数据归为第i个重要等级,其中i=2,3……,M,T1,T2,…及TM-1均为实数,且T T1>T2>…>TM≥0。
13.根据权利要求10所述的方法,其特征在于,
若所述数据为浮点型参数时,设置符号位、指数部分以及底数部分前y位指定为重要比特位,y为正整数;
若所述数据为定点型参数时,设置符号位、数值部分前z位指定为重要比特位,z为正整数。
14.根据权利要求10所述的方法,其特征在于,所述方法还包括:
将数据划分为M个重要等级;提取每一重要等级中的每一数据的重要比特位;
以及针对所述重要比特位进行数据冗余处理,其中M为正整数。
15.根据权利要求14所述的方法,其中,若所述数据冗余处理包括纠错编码处理;所述纠错编码处理包括:循环冗余校验CRC和/或错误检查和纠正ECC根据权利要求3所述的数据冗余方法,其中,所述CRC具体包括:当进行读操作时,读取存储循环冗余校验码,并对原始数据进行循环冗余校验码计算,如果两个循环冗余校验码不一致,则按照存储的循环冗余校验码对该数据进行修正,进行写操作时,同时存储该数据的原始数据和循环冗余校验码;
所述ECC具体包括:对数据进行纠错编码处理包括:对该数据采用错误检查和纠正内存进行冗余存储,在进行读写操作时,错误检查和纠正内存自动进行检错和纠错处理。
16.根据权利要求14所述的方法,其中,若所述数据冗余处理包括副本冗余处理,所述副本冗余处理包括同时备份N份副本,其中N≥2,且N为正整数;其中,对数据的重要比特位进行副本冗余处理包括:进行读操作时,对于重要比特位同时读取原始数据和备份的N份数据,若出现数据不一致,则取相同的N份数据作为最终读取的数据,同时将第N+1份不一致数据修复,当进行写操作时,对于重要比特位同时写回到N个备份地址,同时保证原始数据中的数据和N个备份数据一致。
17.根据权利要求14-16中任一所述的方法,其中,所述将数据划分为M个重要等级包括根据数据的大小、数据绝对值的大小、数据的类型、数据的读操作频率及数据的写操作频率中的至少一个来进行划分。
CN202010617408.9A 2017-07-05 2018-07-05 数据冗余方法及执行数据冗余方法的神经网络处理器 Active CN111553473B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010617408.9A CN111553473B (zh) 2017-07-05 2018-07-05 数据冗余方法及执行数据冗余方法的神经网络处理器

Applications Claiming Priority (13)

Application Number Priority Date Filing Date Title
CN201710541899 2017-07-05
CN2017105418991 2017-07-05
CN201710578784.XA CN109254867B (zh) 2017-07-14 2017-07-14 数据冗余方法及装置
CN201710578784X 2017-07-14
CN201710677922X 2017-08-09
CN201710677922.XA CN109376845B (zh) 2017-08-09 2017-08-09 动态调整方法及动态调整协处理器
CN2017107935314 2017-09-06
CN201710793531.4A CN107578014B (zh) 2017-09-06 2017-09-06 信息处理装置及方法
CN2017109101247 2017-09-29
CN201710910124.7A CN109583577B (zh) 2017-09-29 2017-09-29 运算装置及方法
CN201880001841.0A CN109478144B (zh) 2017-07-05 2018-07-05 一种数据处理装置和方法
CN202010617408.9A CN111553473B (zh) 2017-07-05 2018-07-05 数据冗余方法及执行数据冗余方法的神经网络处理器
PCT/CN2018/094710 WO2019007406A1 (zh) 2017-07-05 2018-07-05 一种数据处理装置和方法

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201880001841.0A Division CN109478144B (zh) 2017-07-05 2018-07-05 一种数据处理装置和方法

Publications (2)

Publication Number Publication Date
CN111553473A true CN111553473A (zh) 2020-08-18
CN111553473B CN111553473B (zh) 2023-10-13

Family

ID=64950607

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202010617408.9A Active CN111553473B (zh) 2017-07-05 2018-07-05 数据冗余方法及执行数据冗余方法的神经网络处理器
CN201880001841.0A Active CN109478144B (zh) 2017-07-05 2018-07-05 一种数据处理装置和方法

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN201880001841.0A Active CN109478144B (zh) 2017-07-05 2018-07-05 一种数据处理装置和方法

Country Status (4)

Country Link
US (1) US11307864B2 (zh)
EP (3) EP3637258A4 (zh)
CN (2) CN111553473B (zh)
WO (1) WO2019007406A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115499104A (zh) * 2022-10-24 2022-12-20 上海泰矽微电子有限公司 一种芯片die间的通信方法
CN115549854A (zh) * 2021-06-30 2022-12-30 上海寒武纪信息科技有限公司 循环冗余校验方法、装置、存储介质以及电子设备

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109583577B (zh) * 2017-09-29 2021-04-23 上海寒武纪信息科技有限公司 运算装置及方法
CN111553473B (zh) * 2017-07-05 2023-10-13 上海寒武纪信息科技有限公司 数据冗余方法及执行数据冗余方法的神经网络处理器
US20190340490A1 (en) * 2018-05-04 2019-11-07 Apple Inc. Systems and methods for assigning tasks in a neural network processor
CN111832739B (zh) 2019-04-18 2024-01-09 中科寒武纪科技股份有限公司 一种数据处理方法及相关产品
CN110690902B (zh) * 2019-09-25 2022-05-17 电子科技大学 一种基于随机截断的时间交织adc失配优化方法
US11507702B2 (en) 2019-11-05 2022-11-22 Apple Inc. Secure mode switching in neural processor circuit
KR20210100277A (ko) * 2020-02-06 2021-08-17 삼성전자주식회사 전력 최적화 스케쥴러의 동작 방법 및 전력 최적화 스케쥴러를 포함하는 컴퓨팅 장치
US11734121B2 (en) * 2020-03-10 2023-08-22 EMC IP Holding Company LLC Systems and methods to achieve effective streaming of data blocks in data backups
WO2022040643A1 (en) * 2020-08-21 2022-02-24 Fu Zhi Sing Processing unit architectures and techniques for reusable instructions and data
CN114415817B (zh) * 2020-10-28 2024-05-07 北京小米移动软件有限公司 显示控制方法、电子设备及存储介质
CN112215243A (zh) * 2020-10-30 2021-01-12 百度(中国)有限公司 图像特征提取方法、装置、设备及存储介质
WO2022102721A1 (ja) * 2020-11-11 2022-05-19 Assest株式会社 うつ状態判別プログラム
CN113703962B (zh) * 2021-07-22 2023-08-22 北京华胜天成科技股份有限公司 云资源分配方法、装置、电子设备及存储介质
CN113885772B (zh) * 2021-10-08 2023-04-28 北京京航计算通讯研究所 一种输入交互设备的等效替代度量方法和***
US11821935B2 (en) 2021-12-01 2023-11-21 Infineon Technologies Ag Differential aging monitor circuits and techniques for assessing aging effects in semiconductor circuits
US11733288B2 (en) * 2021-12-01 2023-08-22 Infineon Technologies Ag Circuits and techniques for assessing aging effects in semiconductor circuits
CN114330691B (zh) * 2021-12-30 2023-08-29 北京奕斯伟计算技术股份有限公司 用于直接存储器访问装置的数据搬运方法
US11726746B1 (en) * 2022-09-14 2023-08-15 Moffett International Co., Limited Vector operation acceleration with convolution computation unit

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101547144A (zh) * 2008-12-29 2009-09-30 华为技术有限公司 一种提高数据传输质量的方法、装置和***
CN102017498A (zh) * 2008-05-06 2011-04-13 阿尔卡特朗讯公司 传输错误的恢复
US20150006444A1 (en) * 2013-06-28 2015-01-01 Denso Corporation Method and system for obtaining improved structure of a target neural network
CN104268035A (zh) * 2014-10-10 2015-01-07 深圳雷柏科技股份有限公司 一种存储数据的恢复方法
EP3129922A1 (en) * 2014-04-08 2017-02-15 Microsoft Technology Licensing, LLC Deep learning using alternating direction method of multipliers
CN106447034A (zh) * 2016-10-27 2017-02-22 中国科学院计算技术研究所 一种基于数据压缩的神经网络处理器、设计方法、芯片
CN106485324A (zh) * 2016-10-09 2017-03-08 成都快眼科技有限公司 一种卷积神经网络优化方法
CN106845631A (zh) * 2016-12-26 2017-06-13 上海寒武纪信息科技有限公司 一种流执行方法及装置

Family Cites Families (36)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0827085B1 (en) * 1996-08-20 2006-03-29 Compaq Computer Corporation Method and apparatus for distributing interrupts in a scalable symmetric multiprocessor system without changing the bus width or bus protocol
US20020133530A1 (en) * 2001-03-15 2002-09-19 Maarten Koning Method for resource control including resource stealing
JP4845755B2 (ja) * 2007-01-30 2011-12-28 キヤノン株式会社 画像処理装置、画像処理方法、プログラム及び記憶媒体
CN101561768A (zh) * 2008-04-18 2009-10-21 北京闻言科技有限公司 一种通用的调度多个任务的方法
CN101344815B (zh) * 2008-08-22 2010-06-09 华硕电脑股份有限公司 调整中央处理器电压与频率的计算机***
US8656145B2 (en) * 2008-09-19 2014-02-18 Qualcomm Incorporated Methods and systems for allocating interrupts in a multithreaded processor
US7979844B2 (en) * 2008-10-14 2011-07-12 Edss, Inc. TICC-paradigm to build formally verified parallel software for multi-core chips
JP2010181989A (ja) * 2009-02-04 2010-08-19 Renesas Electronics Corp データ処理装置
US8255774B2 (en) * 2009-02-17 2012-08-28 Seagate Technology Data storage system with non-volatile memory for error correction
US8423799B2 (en) * 2009-11-30 2013-04-16 International Business Machines Corporation Managing accelerators of a computing environment
CN102314213B (zh) 2010-07-09 2016-03-30 精英电脑股份有限公司 动态调整工作频率的计算机***
US8635385B2 (en) * 2010-07-16 2014-01-21 Advanced Micro Devices, Inc. Mechanism to handle peripheral page faults
WO2012145917A1 (zh) * 2011-04-29 2012-11-01 北京中天安泰信息科技有限公司 运行时指令重组方法及装置
US20120291034A1 (en) * 2011-05-14 2012-11-15 International Business Machines Corporation Techniques for executing threads in a computing environment
US20130074088A1 (en) * 2011-09-19 2013-03-21 Timothy John Purcell Scheduling and management of compute tasks with different execution priority levels
GB2497966A (en) * 2011-12-23 2013-07-03 Renesas Mobile Corp Interrupt event management
WO2013121544A1 (ja) * 2012-02-15 2013-08-22 トヨタ自動車株式会社 制御装置、制御システム
JP6153925B2 (ja) * 2012-05-24 2017-06-28 ルネサスエレクトロニクス株式会社 タスク処理装置
GB2506116B (en) * 2012-09-19 2015-10-21 Jaguar Land Rover Ltd Powertrain control system
US20140089699A1 (en) * 2012-09-27 2014-03-27 Advanced Micro Devices Power management system and method for a processor
US8861270B2 (en) 2013-03-11 2014-10-14 Microsoft Corporation Approximate multi-level cell memory operations
US20150049098A1 (en) * 2013-08-13 2015-02-19 Mediatek Inc. Data processing apparatus for transmitting/receiving compressed pixel data groups via multiple display ports of display interface and related data processing method
US9684559B1 (en) * 2014-04-25 2017-06-20 Altera Corporation Methods and apparatus for storing error correction information on a memory controller circuit
GB2529670A (en) * 2014-08-28 2016-03-02 Ibm Storage system
US9552510B2 (en) * 2015-03-18 2017-01-24 Adobe Systems Incorporated Facial expression capture for character animation
US9600715B2 (en) * 2015-06-26 2017-03-21 Intel Corporation Emotion detection system
CN105045763B (zh) * 2015-07-14 2018-07-13 北京航空航天大学 一种基于fpga+多核dsp的pd雷达信号处理***及其并行实现方法
CN106991477B (zh) 2016-01-20 2020-08-14 中科寒武纪科技股份有限公司 一种人工神经网络压缩编码装置和方法
CN111353588B (zh) 2016-01-20 2024-03-05 中科寒武纪科技股份有限公司 用于执行人工神经网络反向训练的装置和方法
CN106991077A (zh) 2016-01-20 2017-07-28 南京艾溪信息科技有限公司 一种矩阵计算装置
CN106201651A (zh) 2016-06-27 2016-12-07 鄞州浙江清华长三角研究院创新中心 神经形态芯片的模拟器
CN106200853A (zh) * 2016-07-02 2016-12-07 上海与德通讯技术有限公司 一种唤醒电路及唤醒方法
CN106372622A (zh) * 2016-09-30 2017-02-01 北京奇虎科技有限公司 一种人脸表情分类方法及装置
CN106775977B (zh) * 2016-12-09 2020-06-02 北京小米移动软件有限公司 任务调度方法、装置及***
US10733378B2 (en) * 2017-03-17 2020-08-04 Baydin, Inc. Analysis of message quality in a networked computer system
CN111553473B (zh) * 2017-07-05 2023-10-13 上海寒武纪信息科技有限公司 数据冗余方法及执行数据冗余方法的神经网络处理器

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102017498A (zh) * 2008-05-06 2011-04-13 阿尔卡特朗讯公司 传输错误的恢复
CN101547144A (zh) * 2008-12-29 2009-09-30 华为技术有限公司 一种提高数据传输质量的方法、装置和***
US20150006444A1 (en) * 2013-06-28 2015-01-01 Denso Corporation Method and system for obtaining improved structure of a target neural network
EP3129922A1 (en) * 2014-04-08 2017-02-15 Microsoft Technology Licensing, LLC Deep learning using alternating direction method of multipliers
CN104268035A (zh) * 2014-10-10 2015-01-07 深圳雷柏科技股份有限公司 一种存储数据的恢复方法
CN106485324A (zh) * 2016-10-09 2017-03-08 成都快眼科技有限公司 一种卷积神经网络优化方法
CN106447034A (zh) * 2016-10-27 2017-02-22 中国科学院计算技术研究所 一种基于数据压缩的神经网络处理器、设计方法、芯片
CN106845631A (zh) * 2016-12-26 2017-06-13 上海寒武纪信息科技有限公司 一种流执行方法及装置

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
A.H. SUNG等: "Ranking importance of input parameters of neural networks" *
YUNJI CHEN等: "DaDianNao: A Machine-Learning Supercomputer" *
张昭昭: "模块化神经网络结构自组织设计方法" *
胡蓉等: "一种带修剪的增量极速学习模糊神经网络" *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115549854A (zh) * 2021-06-30 2022-12-30 上海寒武纪信息科技有限公司 循环冗余校验方法、装置、存储介质以及电子设备
CN115499104A (zh) * 2022-10-24 2022-12-20 上海泰矽微电子有限公司 一种芯片die间的通信方法

Also Published As

Publication number Publication date
CN109478144B (zh) 2021-12-14
EP3637258A4 (en) 2021-03-10
EP3660629B1 (en) 2023-08-30
EP3660629A1 (en) 2020-06-03
EP3637258A1 (en) 2020-04-15
WO2019007406A1 (zh) 2019-01-10
US20200104167A1 (en) 2020-04-02
US11307864B2 (en) 2022-04-19
CN109478144A (zh) 2019-03-15
EP3660739A1 (en) 2020-06-03
CN111553473B (zh) 2023-10-13

Similar Documents

Publication Publication Date Title
CN111553473B (zh) 数据冗余方法及执行数据冗余方法的神经网络处理器
US11941257B2 (en) Method and apparatus for flexible RAID in SSD
CN105683927A (zh) 用于重新平衡贮存在闪速存储器装置中的数据的方法和***
CN105637490A (zh) 用于在闪速存储器装置之间迁移数据的方法和***
DE102011085989B4 (de) Verfahren und Vorrichtung zum Ausführen von parallelen Speicherlese- und Speicherschreiboperationen
CN112860475B (zh) 基于rs纠删码的校验块恢复方法、装置、***及介质
US20170262191A1 (en) Reducing write tail latency in storage systems
CN108170555A (zh) 一种数据恢复方法及设备
US10284231B2 (en) Adaptive outer code for consistent overprovisioning (OP) level
US11436482B2 (en) Storing neural net works and weights for neural networks
KR20170092537A (ko) 다수의 스토리지 디바이스에 걸친 원자 기입 동작의 수행
CN104246708A (zh) 针对nand闪存上数据的存储的架构
WO2022142544A1 (zh) 防止闪存数据丢失的方法、固态硬盘控制器、固态硬盘
WO2023151290A1 (zh) 一种数据编码方法、装置、设备及介质
WO2018167592A1 (en) Non-binary context mixing compressor/decompressor
WO2019173075A4 (en) Mission-critical ai processor with multi-layer fault tolerance support
CN108959526A (zh) 日志管理方法以及日志管理装置
CN111240887A (zh) 基于三维闪存存储结构的错误页识别方法
CN111143146A (zh) 一种存储装置的健康状态预测方法及***
US10979077B2 (en) Generating hamming weights for data
CN106325769B (zh) 一种数据存储的方法及装置
CN105468471A (zh) 固态存储装置及其错误更正方法
CN113220221B (zh) 存储器控制器与数据处理方法
CN109254867B (zh) 数据冗余方法及装置
CN109388519B (zh) 错误恢复方法及装置、处理器

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant