Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 73 for graph_op (0.27 sec)

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

          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());
      auto graph_op = builder.create<tf_executor::GraphOp>(
    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/tensorflow/translate/split_into_island_per_op_pass.cc

        return;
      }
    
      tf_executor::GraphOp graph_op;
    
      if (llvm::hasSingleElement(func.front().without_terminator())) {
        graph_op = dyn_cast<tf_executor::GraphOp>(func.front().front());
      }
    
      if (!graph_op) {
        func.emitError("expected function to contain only a graph_op");
        signalPassFailure();
        return;
      }
    
      if (!(llvm::hasSingleElement(graph_op.GetBody().without_terminator()) &&
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 17 07:31:01 UTC 2023
    - 7.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/convert_control_to_data_outputs.cc

      func.setType(ftype);
    
      // Rewrite GraphOp to have same number of results as the
      // function.
      OpBuilder builder(graph_op);
      auto new_graph_op =
          builder.create<GraphOp>(graph_op.getLoc(), new_result_types);
      new_graph_op.getRegion().takeBody(graph_op.getRegion());
      graph_op->replaceAllUsesWith(
          new_graph_op->getResults().drop_back(num_resources));
      graph_op.erase();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/breakup-islands.cc

    // bug in common runtime (see b/185483669).
    void AddStatefulControlFlowDependencies(tf_executor::GraphOp graph_op) {
      llvm::SmallDenseSet<Value, 8> graph_fetches;
      for (Value value : graph_op.GetFetch().getFetches()) {
        graph_fetches.insert(value);
      }
      for (Operation& op : graph_op.GetBody().without_terminator()) {
        auto island = dyn_cast<tf_executor::IslandOp>(&op);
        if (!island) continue;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Aug 11 20:52:36 UTC 2023
    - 16.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/passes/merge_duplicate_resource_ops.cc

        // The pass runs on a valid tf_executor dialect, so the op should be the
        // GraphOp.
        return cast<GraphOp>(graph_op_range.begin());
      }
    
      return {};
    }
    
    void MergeDuplicateResourceOpsPass::runOnOperation() {
      func::FuncOp func_op = getOperation();
      GraphOp graph_op = GetGraphOpFromFuncOp(func_op);
      if (!graph_op) return;
    
      llvm::StringMap<Operation*> shared_name_to_resource;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 26 04:26:16 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/parallel_execute_to_islands.cc

          if (execute.use_empty())
            unused_execute_controls.push_back(execute.getControl());
    
        if (!unused_execute_controls.empty()) {
          auto graph_op = island_op->getParentOfType<tf_executor::GraphOp>();
          tf_executor::FetchOp fetch = graph_op.GetFetch();
          auto fetches = llvm::to_vector<8>(fetch.getOperands());
          fetches.append(unused_execute_controls.begin(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jan 19 19:47:16 UTC 2023
    - 11.1K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/tensorflow/passes/merge_save_function_ops_to_main.cc

    }
    
    // Appends `value` to the arguments of the `FetchOp` of `graph_op`.
    void AppendValueToFetch(GraphOp graph_op, Value value) {
      FetchOp old_main_fetch = graph_op.GetFetch();
      auto fetches = llvm::to_vector(old_main_fetch.getFetches());
      fetches.emplace_back(value);
    
      auto builder = OpBuilder::atBlockTerminator(&graph_op.GetBody());
      builder.create<FetchOp>(old_main_fetch.getLoc(), std::move(fetches));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/replicate_to_island.cc

      // islands per replica of the replicate.
      llvm::SmallVector<tf_executor::IslandOp, 4> replicate_op_islands;
      getOperation().walk([&](tf_executor::GraphOp graph_op) {
        for (auto island_op : graph_op.getOps<tf_executor::IslandOp>()) {
          if (!island_op.WrapsSingleOp()) continue;
    
          if (isa<tf_device::ReplicateOp>(&island_op.GetBody().front()))
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jul 24 21:01:40 UTC 2023
    - 16.9K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/merge_initializer_function_ops_to_main.cc

    // * Its GraphOp should only have control outputs.
    // * "tf_saved_model.initializer_type" attribute must exist.
    LogicalResult ValidateInitFunc(func::FuncOp init_func_op) {
      GraphOp graph_op = GetGraphOpFromFuncOp(init_func_op);
      if (!graph_op) return success();  // Consider empty FuncOp valid.
    
      FetchOp fetch_op = graph_op.GetFetch();
      for (const Value fetch : fetch_op.getFetches()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun May 12 12:54:52 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/translate/export_graphdef.cc

      }
    
      Exporter exporter(&configs, graph.get(), tf_dialect, &symbol_table);
    
      auto graph_op = llvm::cast<mlir::tf_executor::GraphOp>(block.front());
    
      // Set input and output names and increment the use counter for them to help
      // generate unique names.
      if (!output_names.empty()) {
        const int num_data_results = graph_op.getNumResults();
        const int64_t output_names_size = output_names.size();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 01 11:17:36 UTC 2024
    - 35.2K bytes
    - Viewed (0)
Back to top