Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 446 for func_ops (0.2 sec)

  1. tensorflow/compiler/mlir/quantization/stablehlo/cc/pre_calibration_test.cc

      EXPECT_THAT(pre_calibration_result, IsOk());
    
      SmallVector<func::FuncOp> func_ops;
      for (auto func_op : pre_calibration_result->getOps<func::FuncOp>()) {
        func_ops.push_back(func_op);
      }
      ASSERT_THAT(func_ops, SizeIs(2));
      EXPECT_THAT(func_ops, Contains(HasSymName("main")));
      EXPECT_THAT(func_ops, Contains(HasSymName("composite_dot_general_fn_1")));
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Mar 28 21:41:08 UTC 2024
    - 6K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/stablehlo/passes/replace_stablehlo_ops_in_main_function_with_xla_call_module_ops.cc

      func::FuncOp main_func = FindMainFuncOp(module_op);
      if (!main_func) return;
    
      // In case the model has tf.StatefulPartitionedCallOp or tf.PartitionedCallOp,
      // we recursively find called functions and process StableHLO ops in them.
      SmallVector<func::FuncOp> func_ops;
      func_ops.push_back(main_func);
      int stablehlo_func_id = -1;
      while (!func_ops.empty()) {
        auto main_func = func_ops.back();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/tensorflow/passes/merge_save_function_ops_to_main.cc

    };
    
    // Returns true iff func_op has either no Region or the body has no Blocks.
    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 {};
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tfrt/tests/tf_to_corert/batch_function_deduplicate_failed.mlir

      func.return %0#0 : tensor<*xi32>
    }
    
    // compute_3 has different argument types from compute_1, thus error is reported.
    // CHECK: error: func_ops for BatchFunctionOp with the same shared name are different
    func.func private @compute_3(%arg0: tensor<?x1xi32> {tf._user_specified_name = "0"}, %arg1: tensor<?x1xi32>) -> (tensor<?x1xi32>, tensor<?x1xi32>) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Aug 14 15:35:49 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/common/lift_as_function_call.cc

      return false;
    }
    
    SmallVector<func::FuncOp> GetSortedFunctions(ModuleOp module_op) {
      auto iterator_range = module_op.getOps<func::FuncOp>();
      SmallVector<func::FuncOp> func_ops(iterator_range.begin(),
                                         iterator_range.end());
      absl::c_sort(func_ops, [](func::FuncOp op1, func::FuncOp op2) {
        return op1.getName() < op2.getName();
      });
      return func_ops;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/common/func.cc

    // Returns true iff the function's symbol is public.
    bool IsPublicFuncOp(func::FuncOp func_op) {
      return SymbolTable::getSymbolVisibility(&*func_op) ==
             SymbolTable::Visibility::Public;
    }
    
    }  // namespace
    
    func::FuncOp FindMainFuncOp(ModuleOp module_op) {
      if (const auto main_func_op = module_op.lookupSymbol<func::FuncOp>(
              kImportModelDefaultGraphFuncName);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Feb 19 06:55:11 UTC 2024
    - 2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/stablehlo/passes/unwrap_xla_call_module_op.cc

                                   TF::kStablehloEntryFunctionAttrName)
                               .getValue();
      func::FuncOp func_op = symbol_table.lookup<func::FuncOp>(function_name);
    
      // We should not unwrap if the function is not from
      // ReplaceStablehloOpsInMainFunctionWithXlaCallModuleOpsPass.
      if (!func_op->hasAttr(TF::kFromXlaCallModuleAttrName)) {
        return;
      }
    
      MLIRContext* context = call_op.getContext();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 07:39:40 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/executor_tpuv1_inline_tpu_island.cc

      Block &nested_block = nested_module->getRegion(0).front();
      for (func::FuncOp func_op :
           llvm::make_early_inc_range(nested_block.getOps<func::FuncOp>())) {
        if (!symbol_table.lookupSymbolIn(getOperation(), func_op.getName())) {
          nested_block.getOperations().remove(func_op.getOperation());
          symbol_table.insert(func_op.getOperation());
        }
      }
      nested_module->erase();
    }
    
    }  // namespace
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Dec 19 08:06:04 UTC 2023
    - 4K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_tf_xla_call_module_to_stablehlo_pass.cc

        }
        return failure();
      }
    };
    
    namespace {
    
    bool IsShloMainFuncOp(func::FuncOp func_op) {
      if (func_op == nullptr) {
        return false;
      }
    
      if (!func_op.getSymName().contains(kStablehloModuleDefaultEntryFuncName)) {
        return false;
      }
    
      if (func_op.getSymVisibility() == "nested" ||
          func_op.getSymVisibility() == "private") {
        return false;
      }
    
      return true;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jan 25 09:43:18 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/stablehlo/passes/remove_sharding_custom_call.cc

    };
    
    void RemoveShardingCustomCallPass::runOnOperation() {
      func::FuncOp func_op = getOperation();
      MLIRContext& ctx = getContext();
    
      RewritePatternSet patterns(&ctx);
      populateWithGenerated(patterns);
    
      FrozenRewritePatternSet frozen_patterns(std::move(patterns));
      if (failed(applyPatternsAndFoldGreedily(func_op, frozen_patterns))) {
        func_op.emitWarning() << "Failed to converge "
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Mar 13 07:04:47 UTC 2024
    - 2.3K bytes
    - Viewed (0)
Back to top