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

Method Match

paddle/cinn/backends/function_prototype.cc:29–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27namespace backends {
28
29bool FunctionProto::Match(const ir::Call *op) const {
30 if (name != op->name) return false;
31 if (ret_type != op->type()) return false;
32 if (op->read_args.size() != readonly_arg_types.size()) return false;
33 if (op->write_args.size() != mutable_arg_types.size()) return false;
34
35 for (int i = 0; i < op->read_args.size(); i++) {
36 if (op->read_args[i].type() != readonly_arg_types[i]) return false;
37 }
38 for (int i = 0; i < op->write_args.size(); i++) {
39 if (op->write_args[i].type() != mutable_arg_types[i]) return false;
40 }
41 return true;
42}
43
44void FunctionProto::AssertMatch(const ir::Call *op) const {
45 PADDLE_ENFORCE_EQ(name,

Callers 15

GenerateFunctionBodyMethod · 0.45
LowerToAstVecFunction · 0.45
ApplyMethod · 0.45
BindMethod · 0.45
OptimizeFunction · 0.45
RunMethod · 0.45
RunMethod · 0.45
BuildMethod · 0.45
GetSourceCodeMethod · 0.45
BuildDefaultMethod · 0.45
TargetToBackendReprFunction · 0.45

Calls 2

typeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected