Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 54 for getTerminator (0.28 sec)

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

      // Don't prune if result is used.
      if (!result.use_empty()) return false;
    
      Block& body_block = while_op.getBody().front();
      Block& cond_block = while_op.getCond().front();
      Operation* body_yield_op = body_block.getTerminator();
    
      // The body yield operand, body block argument, condition block argument, and
      // result all correspond to each other (see definition of `WhileRegionOp`).
      int idx = result.getResultNumber();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Nov 16 01:49:07 UTC 2022
    - 5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/stablehlo/passes/merge_fusion_with_dequantize.cc

        if (!func_op) return failure();
        // The quantized fusion should have requantize and return ops at the end.
        auto return_op = dyn_cast_or_null<func::ReturnOp>(
            func_op.getRegion().getBlocks().front().getTerminator());
        if (!return_op) return failure();
        auto req_op = llvm::dyn_cast_or_null<mlir::stablehlo::UniformQuantizeOp>(
            return_op.getOperands()[0].getDefiningOp());
        if (!req_op) return failure();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_merge_variables_with_execute.cc

      const int size_before = output_types->size();
      for (int index = start; index < end; ++index) {
        Block& block = parallel_execute.GetRegionBlockWithIndex(index);
        auto terminator_operand_types = block.getTerminator()->getOperandTypes();
        output_types->append(terminator_operand_types.begin(),
                             terminator_operand_types.end());
      }
      return output_types->size() - size_before;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 29 17:52:11 UTC 2024
    - 27K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/launch_to_device_attribute.cc

                                                tf_device::LaunchOp launch) {
      // Forward launch inner op results to launch op results.
      launch.replaceAllUsesWith(launch.GetBody().getTerminator()->getOperands());
    
      // For all inner ops, assign the launch device as a `device` attribute.
      if (failed(AssignDevicesInRegion(tf_dialect, launch, launch.getBody())))
        return failure();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/tensor_array_ops_decomposition.cc

        old_val.replaceAllUsesWith(new_val);
        return;
      }
      Operation* old_op = old_val.getDefiningOp();
      Operation* terminator_op =
          old_op->getParentOfType<func::FuncOp>().front().getTerminator();
      llvm::SmallPtrSet<mlir::Operation*, 1> exceptions = {terminator_op};
      old_val.replaceAllUsesExcept(new_val, exceptions);
    }
    
    struct TensorArrayStats {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Mar 02 20:41:19 UTC 2023
    - 40.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/stack_ops_decomposition.cc

    // Returns the aliasing argument number of a fucntion return value if it simply
    // forwards the argument. Otherwise, returns -1.
    int64_t FindAliasedInput(func::FuncOp func, int64_t return_index) {
      Value return_val = func.front().getTerminator()->getOperand(return_index);
      auto maybe_arg = mlir::dyn_cast<BlockArgument>(return_val);
      if (!maybe_arg) return -1;
      return maybe_arg.getArgNumber();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 23.8K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/transforms/optimize_functional_ops.cc

    // op operands' types.
    //
    // Requires the function has exactly one block.
    void UpdateFuncType(func::FuncOp func) {
      Operation* terminator = func.front().getTerminator();
      auto return_types = llvm::to_vector<4>(terminator->getOperandTypes());
    
      FunctionType func_type = func.getFunctionType();
      if (llvm::ArrayRef(return_types) == func_type.getResults()) return;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/tf_saved_model_freeze_variables.cc

    void UpdateTerminatorArguments(T& func,
                                   const ArrayRef<unsigned> arguments_to_erase,
                                   llvm::BitVector& erase_indices) {
      auto terminator = func.front().getTerminator();
      int num_operands = terminator->getNumOperands();
      erase_indices.resize(num_operands);
      for (auto arg_index : arguments_to_erase) {
        auto argument = func.getArgument(arg_index);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 09:56:53 UTC 2024
    - 19.4K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/cluster_outlining.cc

      // Replace `tf_device.return` terminator with `std.return` in function
      // body.
      auto return_op =
          cast<tf_device::ReturnOp>(outlined_func_block->getTerminator());
      builder->setInsertionPoint(return_op);
      ReplaceClusterReturnWithReturn(return_op, builder);
    
      symbol_table->insert(outlined_func);
      return outlined_func;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 21:25:12 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/region_control_flow_to_functional.cc

      Block& block = region.front();
      if (std::distance(block.begin(), block.end()) != 2) return std::nullopt;
      TF::YieldOp yield =
          llvm::dyn_cast_or_null<TF::YieldOp>(block.getTerminator());
      if (!yield) return std::nullopt;
      func::CallOp call = llvm::dyn_cast_or_null<func::CallOp>(*block.begin());
      if (!call) return std::nullopt;
      if (block.getNumArguments() != call.getNumOperands() ||
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.7K bytes
    - Viewed (0)
Back to top