MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / remote_recv_rule

Function remote_recv_rule

imperative/src/impl/transformations/scalar.cpp:157–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157ValueRefList remote_recv_rule(
158 const RemoteRecv& remote_recv, Span<ValueRef> inputs, Span<bool> inputs_mask,
159 const Type<ScalarValue>& scalar_type) {
160 if (remote_recv.shape.empty()) {
161 std::vector<int32_t> shape = {1};
162 auto remote_recv_no_scalar = RemoteRecv::make(
163 remote_recv.key, remote_recv.addr, remote_recv.port,
164 remote_recv.rank_from, remote_recv.cn, shape, remote_recv.dtype,
165 remote_recv.backend);
166 remote_recv_no_scalar->set_scope(remote_recv.scope());
167 return imperative::apply(ApplyOp(*remote_recv_no_scalar), inputs);
168 } else {
169 return imperative::apply(remote_recv, inputs);
170 }
171}
172
173ValueRefList check_no_finite_rule(
174 const CheckNonFinite& check_no_finite, Span<ValueRef> inputs,

Callers

nothing calls this directly

Calls 6

set_scopeMethod · 0.80
scopeMethod · 0.80
makeFunction · 0.50
applyFunction · 0.50
ApplyOpClass · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected