MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / LegacyInterpolateInferMeta

Function LegacyInterpolateInferMeta

paddle/phi/infermeta/multiary.cc:3782–3818  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3780}
3781
3782void LegacyInterpolateInferMeta(
3783 const MetaTensor& x,
3784 const MetaTensor& out_size,
3785 const paddle::optional<std::vector<const MetaTensor*>>& size_tensor,
3786 const MetaTensor& scale_tensor,
3787 const std::string& data_layout,
3788 int out_d,
3789 int out_h,
3790 int out_w,
3791 float scale,
3792 const std::string& interp_method,
3793 bool align_corners,
3794 int align_mode,
3795 MetaTensor* output,
3796 MetaConfig config) {
3797 const auto& dim_x = x.dims();
3798 std::vector<double> scale_vec;
3799 if (scale > 0) {
3800 for (int i = 0; i < dim_x.size() - 2; i++) {
3801 scale_vec.push_back(scale);
3802 }
3803 }
3804 InterpolateInferMeta(x,
3805 out_size,
3806 size_tensor,
3807 scale_tensor,
3808 data_layout,
3809 out_d,
3810 out_h,
3811 out_w,
3812 scale_vec,
3813 interp_method,
3814 align_corners,
3815 align_mode,
3816 output,
3817 config);
3818}
3819
3820void IndexFillInferMeta(const MetaTensor& x,
3821 const MetaTensor& index,

Callers

nothing calls this directly

Calls 4

InterpolateInferMetaFunction · 0.85
dimsMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected