| 477 | } |
| 478 | |
| 479 | void 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 | |
| 506 | void ApFacadeInferMeta( |
| 507 | const paddle::optional<std::vector<const MetaTensor*>>& xs, |
nothing calls this directly
no test coverage detected