Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 78 for getOps (0.47 sec)

  1. tensorflow/compiler/mlir/quantization/common/lift_as_function_call_test.cc

      ASSERT_TRUE(module_op);
    
      func::FuncOp main_fn = FindMainFuncOp(*module_op);
      ASSERT_THAT(main_fn, NotNull());
    
      auto xla_call_module_ops = main_fn.getOps<TF::XlaCallModuleOp>();
      ASSERT_FALSE(xla_call_module_ops.empty());
    
      // Test that `GetQuantizationMethod` returns a valid `Method` corresponding to
      // `"no_quantization {}"`.
      const absl::StatusOr<Method> method =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 10 04:07:09 UTC 2024
    - 26.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/common/attrs_and_constraints_test.cc

          ParseModuleOpString(kModuleDotGeneralFullyConnected);
      ASSERT_TRUE(module_op);
    
      func::FuncOp main_fn = FindMainFuncOp(*module_op);
      ASSERT_THAT(main_fn, NotNull());
    
      auto dot_general_op = *main_fn.getOps<DotGeneralOp>().begin();
      EXPECT_THAT(IsDotGeneralFullyConnected(dot_general_op), true);
    }
    
    TEST_F(AttrsAndConstraintsTest, IsDotGeneralFullyConnectedReturnsFalse) {
      OwningOpRef<ModuleOp> module_op =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 14 17:10:32 UTC 2024
    - 22.9K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/tf_saved_model_freeze_variables.cc

      llvm::SmallVector<TF::VarHandleOp, 4> variables;
      // Capture list of all read only variables.
      for (auto func : module.getOps<func::FuncOp>()) {
        if (func == session_init_func) continue;
        for (auto var_handle_op : func.getOps<TF::VarHandleOp>()) {
          if (!analyzer.IsPotentiallyWritten(var_handle_op.getResource())) {
            variables.push_back(var_handle_op);
          }
        }
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 09:56:53 UTC 2024
    - 19.4K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/stablehlo/passes/replace_stablehlo_ops_in_main_function_with_xla_call_module_ops.cc

        if (!main_func) continue;
    
        SymbolTable symbol_table(module_op);
        for (auto call_op : main_func.getOps<TF::PartitionedCallOp>()) {
          func_ops.push_back(dyn_cast_or_null<func::FuncOp>(symbol_table.lookup(
              mlir::cast<FlatSymbolRefAttr>(call_op.getFAttr()).getValue())));
        }
        for (auto call_op : main_func.getOps<TF::StatefulPartitionedCallOp>()) {
          func_ops.push_back(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_main_function.cc

      bool need_prefix_for_output_name = false;
      std::vector<StringRef> fn_input_name_vec, fn_output_name_vec;
      StringSet<> input_name_set, output_name_set;
      for (auto func_op : module_op.getOps<func::FuncOp>()) {
        if (!ShouldIncludeInMainFunction(func_op)) continue;
        if (auto tf_attrs =
                func_op->getAttrOfType<DictionaryAttr>(kEntryFunctionAttr)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/stablehlo/passes/quantization_patterns.cc

    template <typename GemmStyleOp>
    // Match for all gemm_style op and check for possible fusions.
    LogicalResult MatchGemmStyleOp(func::FuncOp entry_func_op) {
      const auto op_iterator_range = entry_func_op.getOps<GemmStyleOp>();
      if (op_iterator_range.empty()) {
        LLVM_DEBUG(llvm::dbgs() << "Function does not have "
                                << GemmStyleOp::getOperationName() << " op.\n");
        return failure();
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 06:04:36 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_tf_xla_call_module_to_stablehlo_pass.cc

          }
        }
        Builder stablehlo_builder(stablehlo_module_op.get().getContext());
        // Rename XlaCallModuleOp's functions to avoid naming conflicts.
        for (auto func_op : stablehlo_module_op.get().getOps<func::FuncOp>()) {
          const std::string new_func_name =
              CreateNewFuncName(func_op.getSymName(), parent_module_symbol_table);
          if (failed(stablehlo_module_symbol_table.replaceAllSymbolUses(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jan 25 09:43:18 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/xla_call_module_deserialization.cc

      // to store its `SymbolTable` to `SymbolTableCollection`.
      SymbolTable stablehlo_symbol_table(stablehlo_module);
    
      Builder builder(context);
      StringAttr main_func_name;
      for (auto func : stablehlo_module.getOps<func::FuncOp>()) {
        const bool is_main_func = func.getSymName() == kStablehloMainFunctionName;
        if (tf_symbol_table.lookup(func.getSymName())) {
          if (failed(stablehlo_symbol_table.renameToUnique(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 23 09:05:47 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/stablehlo/passes/insert_weight_param.cc

        if (function_name.contains("conv")) {
          return (*(func.getOps<mlir::stablehlo::ConvolutionOp>().begin()))
              .getDimensionNumbers()
              .getKernelOutputFeatureDimension();
        } else if (function_name.contains("dot_general")) {
          auto dot = *(func.getOps<mlir::stablehlo::DotGeneralOp>().begin());
          const ::mlir::stablehlo::DotDimensionNumbersAttr dimension_numbers =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 05:56:10 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  10. 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)
Back to top