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

Function GetPhysicalShape

oneflow/core/framework/tensor_impl.cpp:210–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208namespace {
209
210Maybe<Shape> GetPhysicalShape(const Shape& logical_shape, const NdSbp& nd_sbp,
211 const ParallelDesc& parallel_desc,
212 const Optional<int64_t>& parallel_id) {
213 if (parallel_id.has_value()) {
214 return GetPhysicalShape(logical_shape, nd_sbp, parallel_desc, JUST(parallel_id));
215 } else {
216 return std::make_shared<Shape>(DimVector(logical_shape.NumAxes(), 0));
217 }
218}
219
220} // namespace
221

Callers 5

NewMethod · 0.70
FinishMethod · 0.70
CalcPhysicalShapeFunction · 0.50
TryReshapeTensorFunction · 0.50
RawLocalToGlobalFunction · 0.50

Calls 2

has_valueMethod · 0.45
NumAxesMethod · 0.45

Tested by

no test coverage detected