Skip to content

Commit

Permalink
[Mosaic:TPU][NFC] Delete unused functions
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 707660214
  • Loading branch information
tlongeri authored and Google-ML-Automation committed Dec 18, 2024
1 parent 74eca13 commit 13e721a
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions jaxlib/mosaic/dialect/tpu/transforms/infer_vector_layout.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1968,32 +1968,6 @@ class VectorLayoutInferer {
setOutLayout(op, out);
}

SmallVector<Layout, 4> getInLayout(Operation *op) {
CHECK(op);
CHECK(op->getAttr("in_layout"));
auto in_attrs = op->getAttrOfType<ArrayAttr>("in_layout").getValue();
CHECK_EQ(in_attrs.size(), op->getNumOperands());
SmallVector<Layout, 4> in_layouts;
in_layouts.reserve(op->getNumOperands());
for (int i = 0; i < op->getNumOperands(); ++i) {
in_layouts.push_back(cast<VectorLayoutAttr>(in_attrs[i]).getLayout());
}
return in_layouts;
}

SmallVector<Layout, 4> getOutLayout(Operation *op) {
CHECK(op);
CHECK(op->getAttr("out_layout"));
auto out_attrs = op->getAttrOfType<ArrayAttr>("out_layout").getValue();
CHECK_EQ(out_attrs.size(), op->getNumResults());
SmallVector<Layout, 4> out_layouts;
out_layouts.reserve(op->getNumResults());
for (int i = 0; i < op->getNumResults(); ++i) {
out_layouts.push_back(cast<VectorLayoutAttr>(out_attrs[i]).getLayout());
}
return out_layouts;
}

Layout getLayout(Value v) {
auto op = v.getDefiningOp();
CHECK(op);
Expand Down

0 comments on commit 13e721a

Please sign in to comment.