MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / permute_shape

Function permute_shape

utils/GraphUtils.h:673–683  ·  view source on GitHub ↗

Permutes a given tensor shape given the input and output data layout * * @param[in] tensor_shape Tensor shape to permute * @param[in] in_data_layout Input tensor shape data layout * @param[in] out_data_layout Output tensor shape data layout * * @return Permuted tensor shape */

Source from the content-addressed store, hash-verified

671 * @return Permuted tensor shape
672 */
673inline TensorShape permute_shape(TensorShape tensor_shape, DataLayout in_data_layout, DataLayout out_data_layout)
674{
675 if (in_data_layout != out_data_layout)
676 {
677 arm_compute::PermutationVector perm_vec = (in_data_layout == DataLayout::NCHW)
678 ? arm_compute::PermutationVector(2U, 0U, 1U)
679 : arm_compute::PermutationVector(1U, 2U, 0U);
680 arm_compute::permute(tensor_shape, perm_vec);
681 }
682 return tensor_shape;
683}
684
685/** Utility function to return the TargetHint
686 *

Callers 15

output_shapeMethod · 0.85
do_setupMethod · 0.85
do_setupMethod · 0.85
do_setupMethod · 0.85
do_setupMethod · 0.85
do_setupMethod · 0.85
do_setupMethod · 0.85
do_setupMethod · 0.85
do_setupMethod · 0.85
do_setupMethod · 0.85
do_setupMethod · 0.85
do_setupMethod · 0.85

Calls 1

permuteFunction · 0.50

Tested by

no test coverage detected