Tile
Function Usage
Tensor extension API of the image processing class. It is used to extend dimensions based on the input tensor and return a new tensor. Asynchronous calling and preloading are supported. See Example of the Preloading File of the Initialization Operator.
Only Atlas inference product support this API.
The following conditions must be met:
- The input and output tensors must be on the device or DVPP side, and the parameters (stream and data memory) must be on the same device.
- For synchronization, the device where the data memory is located must be the same as the initialized device.
- The input and output parameters cannot exceed four dimensions, and must match the tensor types.
Prototype
1 | APP_ERROR Tile(const Tensor &src, Tensor &dst, const std::vector<uint32_t> &multiples, AscendStream& stream = AscendStream::DefaultStream()); |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
src |
Input |
Tensor class, supporting float16, float32, and uint8 data types. |
multiples |
Input |
std::vector <uint32_t> class, extension multiple. The number of elements must be the same as the number of src dimensions. |
dst |
Output |
Tensor class, supporting float16, float32, and uint8 data types. An empty tensor can be passed. If dst is not an empty tensor, call Tensor.Malloc() to allocate memory in advance.
|
stream |
Input |
AscendStream type. The default value is AscendStream::DefaultStream(). When the parameter value is the default value, the API calling is a synchronous operation. In other cases, the API calling is an asynchronous operation. |
Response Parameters
Data Structure |
Description |
|---|---|
APP_ERROR |
For details about the returned error codes, see APP_ERROR Description. |