Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 602 for func_ops (0.12 sec)

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

    #include <utility>
    
    #include "llvm/ADT/StringExtras.h"
    #include "mlir/Dialect/Func/IR/FuncOps.h"  // from @llvm-project
    
    namespace mlir {
    namespace quant {
    
    constexpr StringRef kTfEntryFunctionAttr = "tf.entry_function";
    
    void AddEntryFunctionInput(StringRef input_name, func::FuncOp func_op) {
      auto entry_func_attr =
          func_op->getAttrOfType<DictionaryAttr>(kTfEntryFunctionAttr);
      if (!entry_func_attr) return;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 26 01:13:26 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/passes/mark_functions_noinline.cc

      const StringSet<> noinline_functions = GetNoinlineFunctionsSet();
    
      func::FuncOp func_op = getOperation();
      Builder builder(&getContext());
    
      // Adds the `tf._noinline = true` attribute to the function if the name
      // matches.
      if (noinline_functions.contains(func_op.getSymName())) {
        func_op->setAttr(kTfNoinlineAttr, builder.getBoolAttr(true));
        LLVM_DEBUG(llvm::dbgs()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jan 18 02:52:57 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  3. 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)
  4. tensorflow/compiler/mlir/tfrt/analysis/tensor_array_side_effect_analysis.h

      // Return if the function contains only non-side-effecting ops or TensorArray
      // ops.
      bool HasAtMostTensorArrayEffect(mlir::func::FuncOp func_op) const {
        return set_.count(func_op) > 0;
      }
    
     private:
      llvm::DenseSet<mlir::func::FuncOp> set_;
    };
    
    }  // namespace tfrt_compiler
    }  // namespace tensorflow
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Mar 30 02:12:49 UTC 2022
    - 2K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tfrt/analysis/cost_analysis.h

    class CostAnalysis {
     public:
      explicit CostAnalysis(
          mlir::func::FuncOp func_op,
          const tfrt_stub::CostRecorder* cost_recorder = nullptr) {
        cost_recorder_ = cost_recorder;
        AnalyzeArguments(func_op);
        AnalyzeBlock(&func_op.front());
      }
    
      int64_t GetCost(mlir::Operation* op) const;
    
     private:
      void AnalyzeArguments(mlir::func::FuncOp func_op);
      void AnalyzeBlock(mlir::Block* block);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 06 03:08:33 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tfrt/analysis/test_cost_analysis_pass.cc

        return "Add remarks based on cost analysis for testing purpose.";
      }
      void runOnOperation() override {
        const auto& cost_analysis = getAnalysis<CostAnalysis>();
    
        auto func_op = getOperation();
        for (auto& op : func_op.front()) {
          op.emitRemark() << "Cost: " << cost_analysis.GetCost(&op);
        }
      }
    };
    
    static mlir::PassRegistration<TestCostAnalysis> pass;
    
    }  // namespace tfrt_compiler
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 01 23:46:29 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  7. 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)
  8. 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)
  9. tensorflow/compiler/mlir/tensorflow/transforms/tensor_device_copy_conversion.cc

    };
    
    // Folds tf.IdentityOp and tf.IdentityNOp if op device and the argument devices
    // from the defining ops match.
    void TensorDeviceCopyConversionPass::runOnOperation() {
      func::FuncOp func_op = getOperation();
    
      auto should_fold_op_func = [&func_op](const Value &arg,
                                            const StringAttr &op_device) {
        // In TFRT TPU, tensor transfer is handled specifically by D2H and
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tf2xla/internal/passes/verify_input_dialect_to_executor_pass.cc

      return op->getName().getStringRef().str() == kClusterFuncOpName;
    }
    
    void VerifyInputDialectToExecutorPass::runOnOperation() {
      Operation* func_op = getOperation();
    
      auto walk_result = func_op->walk([&](Operation* op) {
        if (!tensorflow::tf2xla::internal::IsInBridgeAcceptableDialects(op)) {
          std::string error = "op is in dialect " +
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Dec 08 16:32:56 UTC 2023
    - 2.7K bytes
    - Viewed (0)
Back to top