| Files | Last commit | Last update |
|---|---|---|
| 13 days ago | ||
| 10 months ago | ||
| 18 days ago | ||
| 1 month ago | ||
| 6 days ago | ||
| 2 months ago | ||
| 1 month ago | ||
| 6 days ago | ||
| 1 month ago | ||
| 6 days ago |
Fill
English | 简体中文
Product Support Status
| Product | Supported |
|---|---|
| Ascend 950PR&950DT products | √ |
| Atlas A3 products | √ |
| Atlas A2 products | √ |
| Atlas 200I/500 A2 inference products | √ |
| Atlas inference products | √ |
| Atlas training products | √ |
Function Description
- Operator function: performs a fill operation on tensors and supports non-contiguous Tensor operations.
- InplaceFillScalar: fills the entire tensor with a scalar value.
- InplaceFillTensor: fills the entire tensor with a tensor value (the value tensor must be a 0-dimensional tensor or a 1-dimensional tensor with size=1).
Parameter Description
InplaceFillScalar
| Parameter Name | Input/Output/Attribute | Description | Data Type | Data Format |
|---|---|---|---|---|
| selfRef | Input/Output tensor | Input and output tensor. Non-contiguous Tensors are supported, and data dimensions above 8 are not supported. | FLOAT, FLOAT16, UINT8, INT8, INT16, INT32, INT64, DOUBLE, COMPLEX64, COMPLEX128, BOOL, BFLOAT16, UINT16, UINT32, UINT64, FLOAT8_E4M3FN, FLOAT8_E5M2, FLOAT8_E8M0, HIFLOAT8 | ND |
| value | Input scalar | Specified scalar value. Its data type must satisfy the data type inference rules with the data type of selfRef. | FLOAT, FLOAT16, UINT8, INT8, INT16, INT32, INT64, DOUBLE, COMPLEX64, COMPLEX128, BOOL, BFLOAT16, UINT16, UINT32, UINT64, FLOAT8_E4M3FN, FLOAT8_E5M2, FLOAT8_E8M0, HIFLOAT8 | - |
InplaceFillTensor
| Parameter Name | Input/Output/Attribute | Description | Data Type | Data Format |
|---|---|---|---|---|
| selfRef | Input/Output tensor | Input and output tensor. Non-contiguous Tensors are supported, and data dimensions above 8 are not supported. | FLOAT, FLOAT16, UINT8, INT8, INT16, INT32, INT64, DOUBLE, COMPLEX64, COMPLEX128, BOOL, BFLOAT16, FLOAT8_E4M3FN, FLOAT8_E5M2, FLOAT8_E8M0, HIFLOAT8 | ND |
| value | Input tensor | Fill value tensor. It must be a 0-dimensional tensor or a 1-dimensional tensor with size=1. | FLOAT, FLOAT16, UINT8, INT8, INT16, INT32, INT64, DOUBLE, COMPLEX64, COMPLEX128, BOOL, BFLOAT16, FLOAT8_E4M3FN, FLOAT8_E5M2, FLOAT8_E8M0, HIFLOAT8 | ND |
Constraint Description
- Data dimensions above 8 are not supported for the input tensor.
- The value parameter of InplaceFillTensor must be a 0-dimensional tensor or a 1-dimensional tensor with size=1.
- Data types must satisfy the mutual inference relationship.
- The FLOAT8_E4M3FN, FLOAT8_E5M2, FLOAT8_E8M0, and HIFLOAT8 data types are supported only on Ascend 950PR&950DT products and are not supported on other products.
- For CANN 9.0.0, the FLOAT8_E4M3FN, FLOAT8_E5M2, FLOAT8_E8M0, and HIFLOAT8 data types are not supported.
Invocation Description
| Invocation Method | Sample Code | Description |
|---|---|---|
| aclnn API | test_aclnn_fill_scalar.cpp | Invokes the InplaceFillScalar operator through the aclnnInplaceFillScalar API. |
| aclnn API | test_aclnn_fill_tensor.cpp | Invokes the InplaceFillTensor operator through the aclnnInplaceFillTensor API. |