| 475 | |
| 476 | template <typename T, typename Context> |
| 477 | DenseTensor PerformTranspose(const Context& dev_ctx, |
| 478 | const DenseTensor& tensor, |
| 479 | const LabelMap& label2perm, |
| 480 | const std::vector<char>& all_labels, |
| 481 | const LabelMap& label2type) { |
| 482 | auto axis = GetLabelIndexByType<int>( |
| 483 | all_labels, label2type, label2perm, LabelType::ALL_TYPE); |
| 484 | VLOG(5) << "PerformTranspose: " << paddle::string::join_strings(axis, ","); |
| 485 | if (is_no_need_transpose(axis)) { |
| 486 | return tensor; |
| 487 | } |
| 488 | auto ret = Transpose<T, Context>(dev_ctx, tensor, axis); |
| 489 | VLOG(5) << "PerformTranspose: do_transpose()"; |
| 490 | return ret; |
| 491 | } |
| 492 | |
| 493 | template <typename T, typename Context> |
| 494 | DenseTensor PerformContraction( |
nothing calls this directly
no test coverage detected