Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 68 for BlockArgument (0.26 sec)

  1. tensorflow/compiler/mlir/lite/stablehlo/odml_converter/transforms/shlo_simplify.td

    include "mlir/IR/CommonTypeConstraints.td"
    
    def CloneF32ElementsAttrWithOnes
      : NativeCodeCall<"DenseElementsAttr::get($0.getType().cast<ShapedType>(), (float)1.0)">;
    
    def NotConstant : Constraint<
        CPred<"$0.isa<BlockArgument>() || !llvm::isa<stablehlo::ConstantOp>($0.getDefiningOp())">,
        "Is not a constant.">;
    
    def : Pat<(StableHLO_DivOp $l,
                (StableHLO_ConstantOp:$divisor FloatElementsAttr<32>:$cst)),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 10 03:05:20 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/sparsecore/embedding_pipelining.cc

        llvm::SetVector<Operation*> ops_to_erase;
        llvm::MapVector<BlockArgument, TF::TPUReplicatedInputOp> cache;
        for (auto input_op : func.getRegion().getOps<TF::TPUReplicatedInputOp>()) {
          // We're only expecting a single input argument to be replicated.
          if (input_op->getNumOperands() > 1) continue;
          Value operand = input_op->getOperand(0);
          if (!llvm::isa<BlockArgument>(operand)) continue;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 92.9K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/python/mlir_wrapper/mlir_wrapper.pyi

    class Block:
        def __init__(self, *args, **kwargs) -> None: ...
        def addArgument(self, *args, **kwargs) -> Any: ...
        def end(self) -> Block_Iterator: ...
        def new(self) -> Block: ...
    
    class BlockArgument(Value):
        def __init__(self, *args, **kwargs) -> None: ...
    
    class Block_Iterator:
        def __init__(self, *args, **kwargs) -> None: ...
    
    class Builder:
        def __init__(self, arg0: MLIRContext) -> None: ...
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 09 17:10:09 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/region_control_flow_to_functional.cc

                                  Region& second_region) {
        if (!mlir::isa<BlockArgument>(first) || !mlir::isa<BlockArgument>(second))
          return false;
        BlockArgument first_block_arg = mlir::cast<BlockArgument>(first);
        BlockArgument second_block_arg = mlir::cast<BlockArgument>(second);
    
        // 2 block arguments will match if they are the same argument number, and
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/stack_ops_decomposition.cc

        }
      } else {
        info.decomposed_callee = lowered_callee;
        for (auto& entry : callee_map) {
          info.stack_var_arg_to_size_arg[mlir::cast<BlockArgument>(entry.getFirst())
                                             .getArgNumber()] =
              mlir::cast<BlockArgument>(entry.getSecond()).getArgNumber();
        }
        if (lowered_callee != callee) {
          // Add the clone with a new name.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 23.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/cluster_ops_by_policy.cc

    namespace {
    constexpr char kDeviceAttr[] = "device";
    
    // A type that abstracts over types that have uses accessible via `getUses`.
    using Source = PointerUnion<Operation *, BlockArgument *>;
    
    // We use union-find algorithm to build clusters of connected operations based
    // on the user provided policy. If an operation can be clustered (one of the
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 27.9K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/extract_tpu_copy_with_dynamic_shape_op.cc

              ExtractTPUCopyWithDynamicShapeOpPass> {
      void runOnOperation() override;
    };
    
    // Finds op that created a given value. If the value is a BlockArgument, this
    // returns the owner of the Block.
    Operation* GetOpOfValue(Value value) {
      if (auto block_arg = mlir::dyn_cast<BlockArgument>(value))
        return block_arg.getOwner()->getParentOp();
    
      return value.getDefiningOp();
    }
    
    // Check if the TPUCopyWithDynamicShapeOp is valid.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tf2xla/internal/passes/xla_broadcast.cc

    namespace tensorflow {
    namespace tf2xla {
    namespace internal {
    
    namespace {
    
    using llvm::dyn_cast;
    using mlir::Attribute;
    using mlir::Block;
    using mlir::BlockArgument;
    using mlir::DenseIntElementsAttr;
    using mlir::failure;
    using mlir::Location;
    using mlir::LogicalResult;
    using mlir::OpBuilder;
    using mlir::Operation;
    using mlir::OperationPass;
    using mlir::OpOperand;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 13 18:52:07 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/replicate_invariant_op_hoisting.cc

      Value input = shape_op.getInput();
      // If ShapeOp operand is replicate tensor block argument, replace with the
      // associated first replica operand.
      if (auto block_arg = mlir::dyn_cast<BlockArgument>(input)) {
        if (block_arg.getOwner() != replicate_block) return;
    
        shape_op.setOperand(replicate_op.GetReplicaOperandForBlockArgument(
            block_arg, /*replica=*/0));
    
        return;
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/resource_op_lifting_cleanup.cc

      for (OpResult result : llvm::reverse(op.getResults())) {
        if (!result.use_empty()) continue;
        int result_idx = result.getResultNumber();
        BlockArgument cond_arg = cond.getArgument(result_idx);
        BlockArgument body_arg = cond.getArgument(result_idx);
        Operation *body_ret = body.front().getTerminator();
        // We can eliminate a result if its unused and the corresponding argument
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 19.7K bytes
    - Viewed (0)
Back to top