Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 94 for getOps (0.14 sec)

  1. tensorflow/compiler/mlir/quantization/stablehlo/passes/insert_calibration_statistics_saver.cc

        const std::unordered_set<std::string>& aggregator_ops_to_ignore,
        SmallVector<Value>& statistics_outputs, SmallVector<StringRef>& ids,
        SmallVector<int32_t>& calibration_methods) {
      for (auto op : region.getOps<TF::CustomAggregatorOp>()) {
        if (aggregator_ops_to_ignore.count(op.getId().str())) continue;
    
        ids.push_back(op.getId());
        calibration_methods.push_back(op.getCalibrationMethod());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 14 06:31:57 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  2. 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)
  3. tensorflow/compiler/mlir/tensorflow/transforms/optimize_global_tensors.cc

        }
      }
      return true;
    }
    
    GlobalTensorUsesMap CreateGlobalTensorUsesMap(ModuleOp module) {
      GlobalTensorUsesMap global_tensor_uses;
    
      SymbolTable symbol_table(module);
      for (auto func : module.getOps<func::FuncOp>()) {
        for (size_t i = 0, e = func.getNumArguments(); i < e; i++) {
          auto sym =
              func.getArgAttrOfType<SymbolRefAttr>(i, "tf_saved_model.bound_input");
          if (!sym) {
            continue;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  4. 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)
  5. tensorflow/compiler/mlir/tensorflow/transforms/freeze_global_tensors.cc

      TF::LoadResourceDataflowAnalysis(solver);
      if (failed(solver.initializeAndRun(module))) return signalPassFailure();
    
      DenseSet<GlobalTensorOp> remaining_global_tensor_ops;
      {
        auto ops = module.getOps<GlobalTensorOp>();
        remaining_global_tensor_ops.insert(ops.begin(), ops.end());
      }
    
      for (auto global_tensor : remaining_global_tensor_ops) {
        // This pass assumes that all global tensors as immutable (e.g. by a
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/lower_globals_to_ml_program.cc

    }
    
    static LogicalResult convertTFGlobals(ModuleOp module) {
      OpBuilder globalBuilder(module.getBodyRegion());
      DenseMap<Operation *, std::string> opToName;
      for (auto globalTensor : module.getOps<tf_saved_model::GlobalTensorOp>()) {
        auto exportedNames = tf_saved_model::GetExportedNames(globalTensor);
        std::string name;
        if (exportedNames.empty()) {
          name = "global_ml_" + globalTensor.getSymName().str();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/initialize_variables_in_session_init.cc

        return failure();
      }
    
      // Fetch all VarHandleOp.
      llvm::StringSet<> variable_names;
      llvm::SmallVector<TF::VarHandleOp, 4> var_ops;
      for (auto func_op : module.getOps<func::FuncOp>()) {
        for (auto var_handle_op : func_op.getOps<TF::VarHandleOp>()) {
          auto variable_name = GetVariableName(var_handle_op);
          if (variable_names.count(variable_name)) continue;
          var_ops.emplace_back(var_handle_op);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 23 09:05:47 UTC 2024
    - 7K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/tf_saved_model_asset_sinking_pass.cc

              mlir::cast<FlatSymbolRefAttr>(initializer).getValue());
          RewriteFunction(symbol_table, func);
        }
    
        // Clean up unused asset ops.
        for (auto asset : llvm::make_early_inc_range(module.getOps<AssetOp>())) {
          if (symbol_table.symbolKnownUseEmpty(asset, module)) {
            asset.erase();
          }
        }
      }
    
     private:
      // Replaces bounded-input arguments of the function with constant ops in the
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  9. 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)
  10. tensorflow/compiler/mlir/quantization/stablehlo/passes/lift_quantizable_spots_as_functions.cc

      const FunctionNameMatcher matcher(spec.matcher().function_name());
      // Iterate over all XlaCallModuleOp in all FuncOps.
      for (auto func : module_op.getOps<func::FuncOp>()) {
        for (auto xla_call_module_op : func.getOps<TF::XlaCallModuleOp>()) {
          if (!matcher.Match(xla_call_module_op)) continue;
    
          // Set the text representation of `Method` to matched
          // `TF::XlaCallModuleOp`.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 10 04:07:09 UTC 2024
    - 9.3K bytes
    - Viewed (0)
Back to top