Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 92 for getOps (0.36 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/tfg-to-tfe.cc

    }  // namespace
    
    void LegalizeTFGToTFE::runOnOperation() {
      MLIRContext &context = getContext();
      ModuleOp module = getOperation();
    
      DenseSet<StringRef> func_symbols;
      for (auto &op : module.getBodyRegion().getOps()) {
        if (auto func = llvm::dyn_cast<tfg::GraphFuncOp>(op)) {
          func_symbols.insert(
              func->getAttrOfType<StringAttr>(SymbolTable::getSymbolAttrName())
                  .getValue());
        }
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/sparsecore/embedding_sequencing.cc

      // funtion. This is critical for preserving correctness in the presence of
      // resource variables and stateful functions.
      std::vector<Operation*> topological_order;
      for (Operation& op : parent_func.getOps())
        if (ops.contains(&op)) topological_order.push_back(&op);
    
      // Create the partitioned call
      builder.restoreInsertionPoint(insertion_point);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 39.4K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/remove_vars_in_session_initializer.cc

          init_func_op.emitError("expects exactly one block in the MLIR function");
          return signalPassFailure();
        }
    
        auto var_handle_ops =
            init_func_op.getBlocks().front().getOps<VarHandleOp>();
        llvm::SmallVector<VarHandleOp, 4> init_vars(var_handle_ops.begin(),
                                                    var_handle_ops.end());
        RemoveVariables(init_vars);
      }
    }
    
    }  // namespace
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/passes/merge_save_function_ops_to_main.cc

        return cast<GraphOp>(graph_op_range.begin());
      }
    
      return {};
    }
    
    // Gets the "main" function from the module. Returns an empty op iff it doesn't
    // exist.
    func::FuncOp GetMainFunction(ModuleOp module_op) {
      const auto main_func_id =
          StringAttr::get(module_op.getContext(), kImportModelDefaultGraphFuncName);
      auto func_ops = module_op.getOps<func::FuncOp>();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/prepare_tpu_computation_for_tf_export.cc

      for (Region* region : regions_with_token) {
        // Initialize the token with the special argument token. This gets mapped to
        // input token in the parent op or a new token for the entry computation.
        auto token = StringAttr::get(ctx, tensorflow::kXlaTokenArgNodeName);
        for (Operation& op : region->getOps()) {
          // Only communication related ops that needs to have token should have the
          // extra attribute.
    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/ir/tf_saved_model.cc

                .append("duplicate exported name '", exported_name, "'")
                .attachNote(p.first->getSecond()->getLoc())
                .append("previously seen here");
          }
        }
      }
      for (auto func : module.getOps<func::FuncOp>()) {
        const bool is_exported = IsExported(func);
    
        if (is_exported && !func.isPublic()) {
          return func.emitError()
                 << "exported function @" << func.getName() << " should be public";
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 23.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/rewrite_tpu_embedding_ops.cc

    // failure.
    template <typename OpT>
    LogicalResult GetOp(Region* region, OpT* result) {
      *result = {};
      for (auto op : region->getOps<OpT>()) {
        if (*result) return op.emitError("should be unique within a function");
        *result = op;
      }
      return success();
    }
    
    LogicalResult RunOnRegion(Region* region) {
      RecvTPUEmbeddingActivationsOp recv_op;
      if (failed(GetOp(region, &recv_op))) return failure();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 22:55:42 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/tensorflow/cc/convert_asset_args_test.cc

        EXPECT_TRUE(module_op_ref);
        return module_op_ref;
      }
    
      mlir::MLIRContext ctx_{};
    };
    
    func::FuncOp GetMainFuncOp(ModuleOp module_op) {
      for (auto func_op : module_op.getOps<func::FuncOp>()) {
        if (func_op.getSymName() == "main") {
          return func_op;
        }
      }
      return {};
    }
    
    TEST_F(ConvertAssetArgsTest, ConvertsSingleAssetArg) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/executor_tpuv1_island_coarsening.cc

      llvm::DenseMap<func::FuncOp, llvm::DenseSet<func::FuncOp>> caller_callee_map;
      // Creates work queue for determining reachability below.
      std::queue<func::FuncOp> function_worklist;
    
      for (auto func : module.getOps<func::FuncOp>()) {
        for (auto user : symbol_map.getUsers(func)) {
          // Populates work queue with func ops called from TPUPartionedCall.
          if (llvm::isa<TF::TPUPartitionedCallOp>(user)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 27.6K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/tensorflow/passes/propagate_quantize_type.cc

      FrozenRewritePatternSet frozen_patterns(std::move(patterns));
      // Propagation can happen recursively with multiple functions so keep this
      // module level.
      for (auto func : module_op.getOps<func::FuncOp>()) {
        if (failed(applyPatternsAndFoldGreedily(func, frozen_patterns))) {
          func.emitError() << "quant-propagate-quantize-type failed.";
          signalPassFailure();
        }
      }
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7K bytes
    - Viewed (0)
Back to top