SetShapeInfo
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function Usage
Sets the shape information of a LocalTensor.
Prototype
1 | __aicore__ inline void SetShapeInfo(const ShapeInfo& shapeInfo) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
shapeInfo |
Input |
Shape information, which is of the ShapeInfo structure type. |
Returns
None
Restrictions
None
Examples
1 2 3 4 | // Example: Set ShapeInfo of a tensor. AscendC::LocalTensor<float> maxUb = softmaxMaxBuf.template Get<float>(); uint32_t shapeArray[] = {16, 1024}; maxUb.SetShapeInfo(AscendC::ShapeInfo(2, shapeArray, AscendC::DataFormat::ND)); |
Parent topic: LocalTensor