Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 54 for getTerminator (0.31 sec)

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

          std::next(copy_range.begin()) == copy_range.end() &&
          isa<tf_executor::GraphOp>(*copy_range.begin())) {
        // Already a graph.
        return;
      }
    
      auto return_op = dyn_cast<func::ReturnOp>(body.getTerminator());
      if (!return_op) {
        LLVM_DEBUG(llvm::dbgs() << "Expect function to end with return\n");
        return;
      }
      // Build GraphOp.
      OpBuilder builder(&body, body.begin());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Aug 11 20:52:36 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tf2xla/internal/passes/tpu_sharding_identification_pass.cc

        BlockArgument arg = std::get<1>(sharding_and_arg);
        if (failed(VerifySharding(arg.getType(), sharding))) return mlir::failure();
      }
      Operation* terminator = function_block.getTerminator();
      for (auto sharding_and_retval :
           llvm::zip(sharding_for_rets, terminator->getOpOperands())) {
        const auto& sharding = std::get<0>(sharding_and_retval);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 02:01:13 UTC 2024
    - 28.9K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tfr/passes/rewrite_quantized_io.cc

    void RewriteQuantizedIOPass::runOnOperation() {
      ModuleOp module = getOperation();
      OpBuilder builder(module);
      module.walk([&](func::FuncOp func) {
        Block& block = func.front();
        Operation* terminator = block.getTerminator();
    
        // Replace input_arg(tensor<quant_type>) -> tfr.cast
        // with input_arg(tensor<storage_type>) -> tfr.cast
        for (BlockArgument arg : block.getArguments()) {
          Type arg_type = arg.getType();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 08 01:19:25 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/utils/xla_rewrite_util.cc

      builder->setInsertionPointToEnd(&launch.GetBody());
      builder->create<mlir::tf_device::ReturnOp>(loc, op->getResults());
    
      // Move op inside cluster.
      op->moveBefore(launch.GetBody().getTerminator());
    
      builder->restoreInsertionPoint(insert_point);
    
      return launch;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 13 03:57:18 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/while_loop_outline.cc

      FunctionType type;
      if (passthru_extra_args) {
        type = FunctionType::get(context, types, types);
      } else {
        SmallVector<Type, 4> result_types;
        auto operands = region.front().getTerminator()->getOperandTypes();
        result_types.append(operands.begin(), operands.end());
        type = FunctionType::get(context, types, result_types);
      }
    
      auto outlined_func = builder.create<func::FuncOp>(loc, name, type);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/tpu_colocate_composite_resource_ops.cc

      op->replaceAllUsesWith(launch);
    
      builder->setInsertionPointToEnd(&launch.GetBody());
      builder->create<tf_device::ReturnOp>(loc, op->getResults());
    
      // Move op inside cluster.
      op->moveBefore(launch.GetBody().getTerminator());
    }
    
    llvm::SmallVector<Operation*, 4> GetResourceOpsUsingCompositeArgsInReplicate(
        tf_device::ReplicateOp replicate) {
      llvm::SmallVector<Operation*, 4> resource_users;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 16 17:41:12 UTC 2023
    - 5.1K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/ir/tf_device.cc

        unsigned region_index) {
      int num_region_results =
          GetRegionBlockWithIndex(region_index).getTerminator()->getNumOperands();
    
      int return_value_offset = 0;
      for (int region_id = 0; region_id < region_index; ++region_id)
        return_value_offset +=
            GetRegionBlockWithIndex(region_id).getTerminator()->getNumOperands();
    
      return getResults().slice(return_value_offset, num_region_results);
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 33.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/prepare_tpu_computation_for_tf_export.cc

            std::get<0>(result).replaceAllUsesWith(std::get<1>(result));
          }
    
          rewriter.setInsertionPoint(cloned_func.getBody().front().getTerminator());
          rewriter.create<TF::_XlaSendFromHostOp>(
              func.getLoc(),
              cloned_func.getBody().front().getTerminator()->getOperands(),
              /*dynamic_key=*/dynamic_key, op.getRecvKeyAttr(),
              /*device_ordinal=*/rewriter.getI64IntegerAttr(0),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/tensor_list_ops_decomposition.cc

      llvm::SmallVector<Type, 8> arg_types;
      for (auto arg : func.getArguments()) arg_types.push_back(arg.getType());
      func.setType(
          FunctionType::get(func.getContext(), arg_types,
                            func.front().getTerminator()->getOperandTypes()));
    }
    
    // Holds the size value of a tensor list and whether the size is statically
    // known (fixed).
    struct SizeInfo {
      Value size;
      bool fixed;
    };
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 39.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/hoist_replicate_invariant_resource_writes.cc

        llvm::ArrayRef<TF::AssignVariableOp> tail_assign_variable_ops) {
      const auto num_replicas = replicate_op.getN();
      auto return_op = llvm::dyn_cast<tf_device::ReturnOp>(
          replicate_op.getRegion().front().getTerminator());
    
      // Get the new result types.
      // TODO(prakalps): Do not add a value to returned values if it is already
      // returned.
      auto new_result_types = llvm::to_vector<4>(replicate_op->getResultTypes());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 5.8K bytes
    - Viewed (0)
Back to top