Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 30 for GraphOp (0.15 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/passes/merge_save_function_ops_to_main.cc

    bool IsFuncOpEmpty(func::FuncOp func_op) {
      return func_op->getNumRegions() == 0 || func_op.getBody().empty();
    }
    
    // Gets the GraphOp from the function op. Returns an empty op iff it doesn't
    // exist.
    GraphOp GetGraphOpFromFuncOp(func::FuncOp func_op) {
      if (IsFuncOpEmpty(func_op)) return {};
    
      auto graph_op_range = func_op.front().without_terminator();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/graph_pruning.cc

      void runOnOperation() override;
    
     private:
      bool ShouldPreserveOp(Operation* op);
      bool ShouldPreserveIsland(IslandOp island);
      void PruneGraph(GraphOp graph);
    
      llvm::SmallDenseSet<mlir::StringAttr, 4> ops_to_preserve_ids_;
    };
    
    // Checks if a tf_executor.Graph can be pruned.
    // For TensorFlow V1.0 compatibility: when importing a graph without providing
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 05 23:50:19 UTC 2022
    - 7.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/tensorflow/passes/merge_initializer_function_ops_to_main.cc

    // the fetch values in the main GraphOp corresponding to the original fetch
    // values from `src_func_op`. Returns an empty vector when `src_func_op` is
    // empty. `main_func_op` must have a GraphOp.
    SmallVector<Value> CopyOpsToMainFunction(func::FuncOp src_func_op,
                                             func::FuncOp main_func_op) {
      GraphOp src_graph_op = GetGraphOpFromFuncOp(src_func_op);
      if (!src_graph_op) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun May 12 12:54:52 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  4. 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)
  5. tensorflow/compiler/mlir/tensorflow/ir/tf_executor.cc

    // This pattern matches GraphOps with only one island, pulls out all inner ops
    // of the island to the block containing the GraphOp, and then removes the
    // GraphOp.
    struct HoistInnerOpsSingleIslandGraph : public OpRewritePattern<GraphOp> {
      using OpRewritePattern<GraphOp>::OpRewritePattern;
    
      LogicalResult matchAndRewrite(GraphOp op,
                                    PatternRewriter &rewriter) const override {
        Block &block = op.GetBody();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 42.7K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/tfg-to-tfe.cc

        func.setAllResultAttrs(res_attrs);
    
        rewriter.setInsertionPointToStart(func.addEntryBlock());
        // In TFE, the function body is inlined in a GraphOp. Create a GraphOp
        // instance and move the regions from GraphFuncOp to GraphOp.
        auto executor_graph = rewriter.create<tf_executor::GraphOp>(
            loc, func.getFunctionType().getResults());
    
        // Replace the uses of block arguments with function arguments. Note that we
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  7. 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)
  8. tensorflow/compiler/mlir/tensorflow/transforms/update_control_dependencies.cc

        num_control_inputs_removed += island.getControlInputs().size();
        island.getControlInputsMutable().clear();
      } else if (auto fetch = dyn_cast<FetchOp>(op)) {
        GraphOp graph = fetch->getParentOfType<GraphOp>();
        int num_control_fetches = fetch.getNumOperands() - graph.getNumResults();
        if (num_control_fetches > 0) {
          fetch.getFetchesMutable().erase(graph.getNumResults(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jan 30 07:53:51 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/executor_island_coarsening.cc

      MergedIsland* GetOperandCandidateToMergeWith(GraphOp graph,
                                                   MergedIsland& merged_island);
    
      // Attempt to find an island group that consumes a result, either control or
      // data, from one of the islands in the given `merged_island`. If no candidate
      // can be found, returns nullptr.
      MergedIsland* GetResultCandidateToMergeWith(GraphOp graph,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/tf_executor_to_functional.cc

      void runOnOperation() override;
    };
    
    // Extracts inner ops of tf_executor.island ops in a tf_executor.graph, in the
    // order of ops in tf_executor.graph.
    LogicalResult LiftIslandOpInnerOpsFromGraph(tf_executor::GraphOp graph) {
      auto graph_position = graph.getOperation()->getIterator();
      Block* parent_block = graph.getOperation()->getBlock();
      for (Operation& op : graph.GetBody().without_terminator()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Aug 11 20:52:36 UTC 2023
    - 3.4K bytes
    - Viewed (0)
Back to top