Skip to content
Snippets Groups Projects

Transpose output DataFormat change based on input and ouputDimsOrder

Merged Wissam Boussella requested to merge wboussella/aidge_core:fix_forward_dims_transpose into dev
Files
5
@@ -83,6 +83,24 @@ using DataFormatTranspose = std::array<std::size_t, 5>;
@@ -83,6 +83,24 @@ using DataFormatTranspose = std::array<std::size_t, 5>;
*/
*/
DataFormatTranspose getPermutationMapping(const DataFormat& src, const DataFormat& dst);
DataFormatTranspose getPermutationMapping(const DataFormat& src, const DataFormat& dst);
 
/**
 
* @brief Determine the output data format after applying a transpose operation.
 
*
 
* This function computes the new data format after transposing a tensor.
 
*
 
* It follows these steps:
 
* 1. Retrieves the permutation mapping from the input format.
 
* 2. Applies the given output dimensions order to compute the new permutation.
 
* 3. Identifies the corresponding data format after applying the new permutation.
 
*
 
* @param inputDataFormat The data format of the input tensor.
 
* @param outputDimsOrder The permutation applied to the input tensor's dimensions.
 
* @return DataFormat The computed output data format after applying the permutation.
 
*
 
* @pre `outputDimsOrder` must be a valid permutation of the format's dimensions.
 
*/
 
DataFormat getTransposedDataFormat(const DataFormat inputDataFormat, const std::array<std::size_t, 5> outputDimsOrder);
 
} // namespace Aidge
} // namespace Aidge
namespace {
namespace {
Loading