Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for BlockArgument (0.23 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/xla_rewrite.cc

    };
    
    void MoveResourceArgsToEnd(func::FuncOp callee) {
      llvm::DenseMap<BlockArgument, BlockArgument> mapping;
      unsigned num_params = callee.getNumArguments();
      llvm::BitVector removed_params(num_params);
      // Copy the resource-type parameters to the end.
      for (unsigned i = 0; i < num_params; ++i) {
        BlockArgument param = callee.getArgument(i);
        if (mlir::isa<TF::ResourceType>(getElementTypeOrSelf(param.getType()))) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/lower_globals_to_ml_program.cc

    static LogicalResult traceUpwardsToArgument(Value v, llvm::DenseSet<Value> seen,
                                                BlockArgument *out) {
      if (seen.contains(v)) {
        return failure();  // infinite loop
      }
      seen.insert(v);
    
      if (auto blockArg = mlir::dyn_cast<BlockArgument>(v)) {
        Operation *op = blockArg.getOwner()->getParentOp();
    
        // If we're in the first block, then the argument to that block is the
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/python/mlir_wrapper/basic_classes.cc

          });
    
      py::class_<mlir::Value>(m, "Value").def("getType", &mlir::Value::getType);
      py::class_<mlir::OpResult, mlir::Value>(m, "OpResult");
      py::class_<mlir::BlockArgument, mlir::Value>(m, "BlockArgument");
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Jan 22 04:26:07 UTC 2022
    - 2.4K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/analysis/resource_dataflow.cc

    ResourceConstructingOps ResourceConstructingOps::EntryState(
        MLIRContext *context) {
      return ResourceConstructingOps();
    }
    ResourceConstructingOps ResourceConstructingOps::EntryState(Value value) {
      if (auto barg = mlir::dyn_cast<BlockArgument>(value)) {
        if (func::FuncOp func =
                dyn_cast<func::FuncOp>(barg.getOwner()->getParentOp())) {
          SymbolTable symbol_table(func->getParentOfType<ModuleOp>());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/tpu_host_computation_expansion.cc

      return op->getAttrOfType<StringAttr>(kXlaOutsideCompilationAttr) != nullptr;
    }
    
    // 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();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/tpu_annotate_dynamic_shape_inputs.cc

              TPUAnnotateDynamicShapeInputsPass> {
      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();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/analysis/tf_dataflow.h

              while_op, while_op.getBodyAttr());
          for (auto &arg : while_op->getOpOperands()) {
            BlockArgument cond_arg = cond.getArgument(arg.getOperandNumber());
            this->join(getLatticeElement(cond_arg), *getLatticeElement(arg.get()));
            BlockArgument body_arg = body.getArgument(arg.getOperandNumber());
            this->join(getLatticeElement(body_arg), *getLatticeElement(arg.get()));
          }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Mar 06 23:53:00 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/freeze_global_tensors.cc

        }
      }
    
      // Collect all those freezable. This is an extra scan but allows for the
      // partial behavior from `allow_mutable_tensor`.
      DenseMap<BlockArgument, bool> freezeable;
      for (auto func : module.getOps<func::FuncOp>()) {
        for (BlockArgument val : func.getArguments()) {
          if (!mlir::isa<TF::ResourceType>(getElementTypeOrSelf(val.getType())))
            continue;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/tensor_device_copy_conversion.cc

        // defining op.
        if (def_op != nullptr &&
            (isa<TF::TPUExecuteOp, TF::TPUExecuteAndUpdateVariablesOp>(def_op))) {
          return true;
        }
        if (BlockArgument block_arg = mlir::dyn_cast<BlockArgument>(arg)) {
          // Skip the folding logic if the block argument is not from the function
          // arguments. This can happen when the argument is from a while loop.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/op_or_arg_name_mapper.cc

                               result.getResultNumber());
        return std::string(result.getOwner()->getName().getStringRef());
      }
      // Use the ASM syntax for BlockArgument
      if (auto arg = mlir::dyn_cast<mlir::BlockArgument>(val)) {
        return "arg" + std::to_string(arg.getArgNumber());
      }
      return "";
    }
    
    std::string OpOrArgStripNameMapper::GetName(OpOrVal op_or_val) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.7K bytes
    - Viewed (0)
Back to top