Lines Matching full:shapes

223 // TODO: Canonicalization should be implemented for shapes that can be
483 // In this example if shapes [0, 1, 2] are broadcastable, then it means that
484 // shapes [0, 1] are broadcastable too, and can be removed from the list of
485 // constraints. If shapes [0, 1, 2] are not broadcastable, then it doesn't
486 // matter if shapes [0, 1] are broadcastable (same for shapes [3, 4, 5]).
508 // Collect shapes checked by `cstr_broadcastable` operands.
509 SmallVector<std::pair<CstrBroadcastableOp, DenseSet<Value>>> shapes;
512 shapes.emplace_back(cstr, std::move(shapesSet));
516 llvm::sort(shapes, [](auto a, auto b) {
526 for (unsigned i = 0; i < shapes.size(); ++i) {
528 return llvm::set_is_subset(pair.second, shapes[i].second);
532 auto *it = std::remove_if(shapes.begin() + i + 1, shapes.end(), isSubset);
533 for (auto *it0 = it; it0 < shapes.end(); ++it0)
535 shapes.erase(it, shapes.end());
544 for (auto &shape : shapes)
565 SmallVector<Value, 8> shapes;
571 return llvm::is_contained(shapes, s);
573 if (!shapes.empty() && !cstrEqOp.getShapes().empty() && disjointShapes)
575 shapes.append(cstrEqOp.getShapes().begin(), cstrEqOp.getShapes().end());
577 rewriter.replaceOpWithNewOp<CstrEqOp>(op, shapes);
652 // TODO: Support folding with more than 2 input shapes
666 // If the shapes are not compatible, we can't fold it.
1000 // on the input shapes.
1020 return emitOpError("required at least 2 input shapes");
1386 // Can always broadcast fewer than two shapes.
1422 return emitOptionalError(location, "requires all sizes or shapes");
1427 return emitOptionalError(location, "requires all sizes or shapes");
1429 // Handle shapes, propagate error type if present.
1433 return emitOptionalError(location, "requires all sizes or shapes");
1486 /// Evaluate the `rank` operation for shapes of ranked tensors at compile time.