padding.h
Functions handling padding.
Functions
-
void nvte_multi_padding(size_t num_tensors, const NVTETensor *input_list, NVTETensor *output_list, const int *padded_num_rows_list, cudaStream_t stream)
Padding multiple tensors.
NOTE: Padding mode only support bottom.
For example, 3x3 matrix pad to 4x3 matrix.
source | 1 | 2 | 3 | | 4 | 5 | 6 | | 7 | 8 | 9 |
destination | 1 | 2 | 3 | | 4 | 5 | 6 | | 7 | 8 | 9 | | 0 | 0 | 0 |
- Parameters:
num_tensors – [in] Number of tensors.
input_list – [in] List of 2D input tensors.
output_list – [inout] List of padded tensors. Dimensions match tensors in input_list.
padded_num_rows_list – [in] List of padded num rows corresponding to input tensors.
stream – [in] CUDA stream used for the operation.