Rate This Document
Findability
Accuracy
Completeness
Readability

Feature Scope

Data Types

FWD_D and BWD_D support arbitrary combination of the f32, f16, and bf16 data types.

Propagation Direction

src Data Type

dst Data Type

diff_dst Data Type

diff_src Data Type

FWD_D, BWD_D

f32

f32

f32

f32

f16

f16

f16

f16

bf16

bf16

bf16

bf16

Data Layout

3D to 5D tensors are supported. The following data layout formats are supported. The layout of input and output tensors must be the same.

Tensor Dimension

Tag (src/dst/diff_dst/diff_src)

3D

abc,acb

4D

abcd,acdb

5D

abcde,acdeb

Parameter Constraints

Field

Value

--dir

FWD_D [default], BWD_D

--sdt

f32 [default], f16, bf16, s32, s8, u8

--ddt

f32 [default], f16, bf16, s32, s8, u8

--alg

nearest [default], linear

--tag

axb [default], abx

Resampling requires that the memory layout of the input and output tensors be the same, but the dimensions can be different.

For details, see the following cases:

  • 5D: mb4_ic8_id4od8_ih4oh8_iw4ow8, 4×8×4×4×4 (input), 4×8×8×8×8 (output)
  • 4D: mb4_ic8_ih4oh8_iw4ow8, 4×8×4×4 (input), 4×8×8×8 (output)
  • 3D: mb4_ic8_iw4ow8, 4×8×4 (input), 4×8×8 (output)

Note that if the value of id, ih, iw, od, oh, or ow is too large, the precision may be affected due to a limitation of the test system. This is not a functional problem because other platforms have the same issue. To avoid this issue, you are advised to set the preceding parameters to a value less than 20000.