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