Compute APIs
The compute APIs provided by the TBE DSL approach mainly cover vector operations, including element-wise operation APIs, reduction APIs, broadcast APIs, index operation APIs, concat APIs, convolution APIs, 4D to 5D conversion APIs, and matrix computation APIs.
Find the API definition file in the /python/site-packages directory in the ATC installation directory.
Category |
API Description |
See Also |
---|---|---|
Element-wise |
Performs an operation on a tensor element-wise. For example, te.lang.cce.vadd adds tensors x and y element-wise. |
|
Reduction |
Reduces a tensor along axis. For example, te.lang.cce.sum(data,axis,keepdims=False) adds tensor data along axis. |
|
Broadcast |
Broadcasts a tensor to the target shape. For example, broadcast a tensor with shape (3, 1, 2) to a tensor with shape (3, 3, 2). |
|
Segment |
Computes along segments of a tensor. |
|
Inplace |
Computes tensors by row. |
|
Cast |
Rounds up the input tensor element-wise based on certain rules. |
|
Concat |
Reconcatenates multiple input tensors based on a specified axis. |
|
Convolution |
Computes the 2D convolution of the float16 type with the given 5HD data and FracZ weight. |
|
4D/5D conversion |
Supports the conversion between 4D NCHW data format and 5D NC1HWC0 data format. |
|
Matmul |
Performs matrix multiplication operations. |
|
pooling2d |
Samples signals in different sliding windows of tensor_in in different pooling modes. |
|
Common computation |
Performs the round_to operation or data type conversion on the input data. |
|
Build |
Includes schedule and build APIs. |