MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / New

Method New

oneflow/core/framework/op_expr.cpp:583–592  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

581}
582
583/* static */ Maybe<UserOpExpr> UserOpExpr::New(const std::string& op_name, UserOpConf&& op_proto,
584 const std::vector<std::string>& indexed_ibns,
585 const std::vector<std::string>& indexed_obns) {
586 JUST(AddAttrDefaultValueAndCheckValid(&op_proto));
587 AttrMap base_attrs = MakeAttrMapFromUserOpConf(op_proto);
588 std::shared_ptr<UserOpExpr> op_expr(
589 new UserOpExpr(op_name, std::move(op_proto), base_attrs, indexed_ibns, indexed_obns));
590 JUST(op_expr->Init(op_expr));
591 return op_expr;
592}
593
594Maybe<void> UserOpExpr::InferPhysicalTensorDesc(
595 const AttrMap& attrs, const std::string& device_tag,

Callers

nothing calls this directly

Calls 3

InitMethod · 0.45

Tested by

no test coverage detected