Apparatus and methods for vector operations
AssigneeCambricon Technologies Corporation Limited
InventorsJinhua Tao, Tian Zhi, Shaoli Liu, Tianshi Chen, Yunji Chen
Life of this patent
Estimating the term…
Abstract
Aspects for vector operations in neural network are described herein. The aspects may include a vector caching unit configured to store a first vector and a second vector, wherein the first vector includes one or more first elements and the second vector includes one or more second elements. The aspects may further include one or more adders and a combiner. The one or more adders may be configured to respectively add each of the first elements to a corresponding one of the second elements to generate one or more addition results. The combiner may be configured to combine a combiner configured to combine the one or more addition results into an output vector.
Claims14
An apparatus for vector operations in a neural network, comprising:
- a controller unit configured to receive a vector-add-scalar instruction that includes a first address of a vector, a scalar value, and an operation code that indicates an operation to add the vector to the scalar value, wherein the controller unit includes an instruction register configured to store information corresponding to operation fields in the vector-add-scalar instruction;
- and
- a computation module configured to
- receive the vector in response to the vector-add-scalar instruction based on the first address from a memory, and
- receive the scalar value included in the vector-add-scalar instruction,
- wherein the vector includes one or more elements, and
- wherein the computation module includes:
- multiple adders configured to parallelly respectively add the scalar value to each element of the vector to generate one or more addition results, and
- a combiner configured to combine the one or more addition results into an output vector.
A method for vector operations in a neural network, comprising:
- receiving, by a controller unit, a vector-add-scalar instruction that includes a first address of a vector, a scalar value, and an operation code that indicates an operation to add the vector to the scalar value;
- storing, by an instruction register of the controller unit, information corresponding to operation fields in the vector-add-scalar instruction received from the instruction queue module;
- receiving, by a computation module, the vector in response to the vector-add-scalar instruction from a memory based on the first address, wherein the vector includes one or more elements;
- receiving, by the computation module, the scalar value included in the vector-add-scalar instruction;
- parallelly respectively adding, by multiple adders of the computation module, the scalar value to each element of the vector to generate one or more addition results;
- and
- combining, by a combiner of the computation module, the one or more addition results into an output vector.
Dependencies are inferred from the claim text.