Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 68 for BlockArgument (0.46 sec)

  1. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_driver.cc

                      QuantizedType::getQuantizedElementType(type))) {
            return true;
          }
        }
      }
      return false;
    }
    
    }  // namespace
    
    void QuantizationDriver::InitializeArgState(const BlockArgument arg,
                                                const Value arg_value) {
      const auto [cached, inserted] = value_to_state_.try_emplace(arg_value, 0);
      if (!inserted) {
        arg_states_[arg] = cached->second;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 38.1K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/remove_unused_arguments.cc

        // Set up a use count for all function arguments. We'll use this to
        // determine whether we have taken care of all uses and can remove
        // the arg.
        for (BlockArgument arg : func.getArguments()) {
          auto uses = arg.getUses();
          use_count[arg.getArgNumber()] = std::distance(uses.begin(), uses.end());
          argument_to_index.insert({arg, arg.getArgNumber()});
        }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/tfg-to-tfe.cc

        }
      }
      return mlir::success();
    }
    
    static void FilterOutBlockArgControlDep(
        ValueRange operands, llvm::SmallVectorImpl<Value> &filtered) {
      for (Value value : operands)
        if (!mlir::isa<mlir::BlockArgument>(value)) filtered.push_back(value);
    }
    
    // Split the tfg.NextIteration into tf_executor::NextIterationSourceOp and
    // tf_executor::NextIterationSinkOp to break the cycle introduced by itself.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/annotate_parameter_replication.cc

        for (auto entry : llvm::enumerate(cluster_func.getOperands())) {
          auto operand = SkipIdentityAndReadVariable(entry.value());
          auto block_arg = mlir::dyn_cast<BlockArgument>(operand);
          if (block_arg && block_arg.getOwner() == &replicate.GetBody()) {
            // Only mirrored args of ReplicateOp can be annotated.
            if (mirrored_replicate_args.count(block_arg.getArgNumber()) == 0) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/reduce_while_operands.cc

      std::vector<Value> queue;
      queue.push_back(start_node);
      visited.insert(start_node);
      while (!queue.empty()) {
        auto node = queue.back();
        queue.pop_back();
        if (auto arg = mlir::dyn_cast_or_null<BlockArgument>(node)) {
          neighbors.push_back(arg.getArgNumber());
          continue;
        }
        if (!node.getDefiningOp()) continue;
        for (Value operand : node.getDefiningOp()->getOperands()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tf2xla/internal/passes/extract_head_tail_outside_compilation.cc

             !op->hasAttrOfType<BoolAttr>(kXlaMapOutsideCompilationAttr);
    }
    
    // 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();
    }
    
    // Checks if `op` is nested in `block`.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 20.6K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/stablehlo/odml_converter/folders.cc

     public:
      // Returns std::nullopt if the operation cannot be folded.
      static std::optional<FoldAdaptor> Create(Operation* operation) {
        auto foldable_opr = [](Value val) -> bool {
          return !llvm::isa<BlockArgument>(val) &&
                 llvm::isa<stablehlo::ConstantOp>(val.getDefiningOp());
        };
        if (!llvm::all_of(operation->getOperands(), foldable_opr)) {
          return std::nullopt;
        }
        return FoldAdaptor(operation);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 06:11:55 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tf2xla/internal/passes/tpu_sharding_identification_pass.cc

    using OpShardingVector = llvm::SmallVector<OpShardingVariant, 8>;
    using OptionalOpShardingVector =
        llvm::SmallVector<std::optional<OpShardingVariant>, 8>;
    using llvm::StringRef;
    using mlir::Block;
    using mlir::BlockArgument;
    using mlir::BoolAttr;
    using mlir::Builder;
    using mlir::IntegerAttr;
    using mlir::LogicalResult;
    using mlir::ModuleOp;
    using mlir::Operation;
    using mlir::OpOperand;
    using mlir::OpResult;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 02:01:13 UTC 2024
    - 28.9K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/cc/convert_asset_args.cc

      if (!main_func_op) return failure();
    
      SmallVector<StringRef> input_names = GetEntryFunctionInputs(main_func_op);
      SymbolTable symbol_table(module_op);
      SmallVector<AssetFileDef> asset_file_defs;
    
      for (BlockArgument argument : main_func_op.getArguments()) {
        const int arg_idx = argument.getArgNumber();
        auto asset_op =
            LookupBoundInputOfType<AssetOp>(main_func_op, arg_idx, symbol_table);
        if (!asset_op) continue;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/sparsecore/embedding_sequencing.cc

      // args. This will basically be our set increment fn.
      for (Operation* op : non_tpu_ops)
        for (Value input : op->getOperands())
          if (BlockArgument arg = llvm::dyn_cast<BlockArgument>(input))
            // TODO(bfontain): Check that this is actually an argument to the loop
            // body.
            non_tpu_args.insert(arg.getArgNumber());
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 39.4K bytes
    - Viewed (0)
Back to top