MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / CopyLayoutFromShape

Method CopyLayoutFromShape

tensorflow/compiler/xla/shape_layout.cc:25–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23namespace xla {
24
25Status ShapeLayout::CopyLayoutFromShape(const Shape& other_shape) {
26 if (!ShapeUtil::Compatible(other_shape, shape_)) {
27 return InvalidArgument("Shape %s is not compatible with shape %s",
28 ShapeUtil::HumanString(other_shape),
29 ShapeUtil::HumanString(shape()));
30 }
31 shape_ = other_shape;
32 return Status::OK();
33}
34
35Status ShapeLayout::AssignLayoutToShape(Shape* to_shape) const {
36 if (!ShapeUtil::Compatible(*to_shape, shape_)) {

Callers 4

TEST_FFunction · 0.80
CreateModuleConfigMethod · 0.80
ParseComputationsMethod · 0.80

Calls 3

CompatibleClass · 0.85
InvalidArgumentFunction · 0.85
shapeFunction · 0.50

Tested by 1

TEST_FFunction · 0.64