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

Function ApVariadicInferMeta

paddle/phi/infermeta/multiary.cc:479–504  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

477}
478
479void ApVariadicInferMeta(const std::vector<const MetaTensor*>& xs,
480 int num_outputs,
481 const std::string& code_module_lambda,
482 const std::string& infer_symbolic_lambda,
483 const std::string& infer_meta_lambda,
484 const std::string& kernel_dispatch_lambda,
485 const std::string& kernel_dispatch_const_data_lambda,
486 std::vector<MetaTensor*> outs,
487 MetaConfig config) {
488#ifdef PADDLE_WITH_CINN
489 ApInferMetaHelper helper{};
490 const auto& ret = helper.InferMeta(infer_meta_lambda, &xs, &outs);
491 PADDLE_ENFORCE_EQ(
492 ret.HasError(),
493 false,
494 common::errors::Fatal(
495 "ApVariadicInferMeta failed. \nTraceback (most recent call "
496 "last):\n%s\n%s: %s. ",
497 ret.GetError().CallStackToString(),
498 ret.GetError().class_name(),
499 ret.GetError().msg()));
500#else
501 PADDLE_THROW(common::errors::Unimplemented(
502 "ap_variadic is not implemented when cinn is not enabled."));
503#endif
504}
505
506void ApFacadeInferMeta(
507 const paddle::optional<std::vector<const MetaTensor*>>& xs,

Callers

nothing calls this directly

Calls 5

HasErrorMethod · 0.80
CallStackToStringMethod · 0.80
InferMetaMethod · 0.45
class_nameMethod · 0.45
msgMethod · 0.45

Tested by

no test coverage detected