Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 114 for symbol_table_ (0.15 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/initialize_variables_in_session_init.cc

        // taking the init function corresponding to the first symbol in the
        // initializers list to be backwards-compatible, before
        // tf_saved_model.initializer_type attribute was introduced.
        SymbolTable symbol_table(module);
        return symbol_table.lookup<func::FuncOp>(
            mlir::cast<FlatSymbolRefAttr>(session_init_op.getInitializers()[0])
                .getValue());
      } else {
        return CreateSessionInitFunc(module);
      }
    }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 23 09:05:47 UTC 2024
    - 7K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/stablehlo/passes/insert_calibration_statistics_saver.cc

      for (Region& region : op->getRegions()) {
        if (!region.getOps<TF::CalibrationStatisticsSaverOp>().empty()) {
          return true;
        }
      }
    
      SymbolTable symbol_table(op->getParentOfType<ModuleOp>());
      // Check the functions associated to CaseOp, IfOp and WhileOp.
      for (const NamedAttribute& attr : op->getAttrs()) {
        FlatSymbolRefAttr symbol_attr =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 14 06:31:57 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/utils/visitor.h

    // callee cannot be resolved to `mlir::func::FuncOp`.
    mlir::WalkResult WalkReachableFunctions(
        mlir::func::FuncOp func,
        llvm::function_ref<mlir::WalkResult(mlir::func::FuncOp)> callback,
        mlir::SymbolTableCollection* symbol_table = nullptr);
    
    // Creates a new MLIR module that contains only the given functions and all
    // reachable functions from them.
    mlir::FailureOr<mlir::OwningOpRef<mlir::ModuleOp>> CreatePrunedModule(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 19 03:46:51 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/stablehlo/ops/stablehlo_op_quant_spec.cc

          }
        } else if (function_name.contains("dot_general")) {
          const auto module_op = call_op->getParentOfType<ModuleOp>();
    
          const SymbolTable symbol_table(module_op);
          auto entry_func_op =
              dyn_cast_or_null<func::FuncOp>(symbol_table.lookup(function_name));
          auto dot_general_op = *entry_func_op.getOps<DotGeneralOp>().begin();
          if (auto optional_dim = GetDotGeneralQuantizationDim(dot_general_op);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 05:56:10 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/freeze_saved_model_assets.cc

     private:
      std::string saved_model_dir;
    };
    
    void FreezeAssetsPass::runOnOperation() {
      auto module = getOperation();
      if (!tf_saved_model::HasTfSavedModelSemantics(module)) {
        return;
      }
      SymbolTable symbol_table(module);
    
      for (auto func : module.getOps<func::FuncOp>()) {
        llvm::BitVector args_to_erase(func.getNumArguments());
        OpBuilder builder(func.getBody());
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jan 30 01:12:09 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/passes/preprocess_op.cc

        op->setOperand(weight_operand_idx, reshape_op);
    
        // Create a new function with preprocessed types.
        ModuleOp module = op->getParentOfType<ModuleOp>();
        SymbolTable symbol_table(module);
        func::FuncOp float_func =
            dyn_cast<func::FuncOp>(symbol_table.lookup(function_name));
        OperandRange func_args = op.getArgs();
        func::FuncOp new_float_func = float_func.clone();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/analysis/resource_value_typed_analyzer.cc

    func::FuncOp GetSessionInitializerFunc(ModuleOp module) {
      auto session_init_op = tf_saved_model::GetSessionInitializerOp(module);
      if (session_init_op && !session_init_op.getInitializers().empty()) {
        SymbolTable symbol_table(module);
        func::FuncOp init_func_op = symbol_table.lookup<func::FuncOp>(
            mlir::cast<FlatSymbolRefAttr>(session_init_op.getInitializers()[0])
                .getValue());
        return init_func_op;
      }
      return nullptr;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 09:04:13 UTC 2024
    - 8K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_quantized_functions.cc

      for (func::FuncOp func : module_ref->getOps<func::FuncOp>()) {
        // Do nothing if the function already exists.
        if (symbol_table.lookup(func.getSymName()) != nullptr) continue;
    
        // Set the function to private and insert to the module.
        func::FuncOp new_func = func.clone();
        new_func.setPrivate();
        symbol_table.insert(new_func);
    
        // For consistency, we require all quantized composite function to have
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 22 05:52:39 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/add_dump_tensor_op.cc

        ModuleOp module = op->getParentOfType<ModuleOp>();
        SymbolTable symbol_table(module);
    
        const func::FuncOp ref_func =
            dyn_cast_or_null<func::FuncOp>(symbol_table.lookup(f_attr.getValue()));
        func::FuncOp new_ref_func = dyn_cast<func::FuncOp>(ref_func->clone());
        return symbol_table.insert(new_ref_func);
      }
    
      LogicalResult match(LiftedOpT op) const override {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 22 22:55:22 UTC 2024
    - 13K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/stablehlo/passes/insert_weight_param.cc

        const StringRef function_name = GetEntryFunctionName(op);
        const auto module_op = op->getParentOfType<ModuleOp>();
        const SymbolTable symbol_table(module_op);
        func::FuncOp func = symbol_table.lookup<func::FuncOp>(function_name);
    
        if (function_name.contains("conv")) {
          return (*(func.getOps<mlir::stablehlo::ConvolutionOp>().begin()))
              .getDimensionNumbers()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 05:56:10 UTC 2024
    - 10.2K bytes
    - Viewed (0)
Back to top