Function: set_tensor_storage_shape

This API will be deprecated in future releases. Use acl.set_tensor_shape instead.

C Prototype

aclError aclSetTensorStorageShape(aclTensorDesc *desc, int numDims, const int64_t *dims)

Python Function

ret = acl.set_tensor_storage_shape(desc, dims)

Function Usage

Sets the actual dims of the tensor after creating the tensor description by calling acl.create_tensor_desc. This API is mainly used in the PyTorch scenarios.

The Atlas Training Series Product does not support this API.

Input Description

desc: int, pointer address of aclTensorDesc.

Call acl.create_tensor_desc to create data of the aclTensorDesc type in advance.

dims: list, dimensions to be set.

Return Value

ret: int, error code.

Restrictions

None