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

Method GetParallelDescSymbolId

oneflow/core/job/scope.cpp:67–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67Maybe<int64_t> Scope::GetParallelDescSymbolId(const OperatorConf& op_conf) const {
68 if (op_conf.device_tag() == "cpu" || IsCpuOnly(op_conf)) {
69 return scope_proto_.host_parallel_desc_symbol_id();
70 } else {
71 return scope_proto_.device_parallel_desc_symbol_id();
72 }
73}
74
75Maybe<Symbol<ParallelDesc>> Scope::GetParallelDesc(const OperatorConf& op_conf) const {
76 return placement_scope_->GetParallelDesc(op_conf.device_tag(), op_conf);

Calls 1

IsCpuOnlyFunction · 0.85

Tested by

no test coverage detected