Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for insertion_guard (0.17 sec)

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

                                             func::FuncOp callee_func_op,
                                             PatternRewriter& rewriter) {
      OpBuilder::InsertionGuard insertion_guard(rewriter);
    
      // Create a new `CallOp` that calls `callee_func_op`.
      rewriter.setInsertionPoint(xla_call_module_op);
      auto call_op =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 06:04:36 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/ops/tf_quantize_op.cc

                            {create_unknown_output_shape});
    
      func::FuncOp quantization_func =
          rewriter.create<func::FuncOp>(input_op->getLoc(), func_name, func_type);
    
      OpBuilder::InsertionGuard guard = OpBuilder::InsertionGuard(rewriter);
      ArrayRef<Type> inputs = quantization_func.getFunctionType().getInputs();
      Block* block = rewriter.createBlock(
          &quantization_func.getBody(), quantization_func.begin(), inputs,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/prepare_tpu_computation_for_tf_export.cc

        if (!host_module.empty()) {
          mlir::OwningOpRef<mlir::ModuleOp> module_for_func;
    
          func::FuncOp func = op.GetHostFunc(&module_for_func);
    
          OpBuilder::InsertionGuard guard(rewriter);
          rewriter.setInsertionPointAfter(op->getParentOfType<func::FuncOp>());
          cloned_func = llvm::dyn_cast_or_null<func::FuncOp>(
              rewriter.clone(*func.getOperation()));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/passes/merge_initializer_function_ops_to_main.cc

          /*controlInputs=*/control_dependencies);
      wrapper_island_op.getBody().emplaceBlock();
    
      // Create a NoOp inside the IslandOp.
      auto guard = OpBuilder::InsertionGuard(builder);
      builder.setInsertionPointToStart(&wrapper_island_op.GetBody());
    
      builder.create<TF::NoOp>(loc);
      builder.create<tf_executor::YieldOp>(loc);
    
      return wrapper_island_op;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun May 12 12:54:52 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_main_function.cc

            i, kTfSavedModelIndexPathAttr,
            ArrayAttr::get(context, {StringAttr::get(context, output_names[i])}));
      }
    
      // Creates PartitionedCall ops to call exported functions.
      auto guard = OpBuilder::InsertionGuard(builder);
      int arg_idx = 0;
      int result_idx = 0;
      llvm::SmallVector<Value> call_op_returns;
      for (auto func_op : module_op.getOps<func::FuncOp>()) {
        if (!ShouldIncludeInMainFunction(func_op)) continue;
    
    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/common/lift_as_function_call.cc

      // Create a private function and copy all ops between arguments and results.
      auto current_func = result_op->getParentOfType<func::FuncOp>();
      auto guard = OpBuilder::InsertionGuard(builder);
      builder.setInsertionPointAfter(current_func);
      TypeRange arg_types{ValueRange{arguments}};
      TypeRange result_types{ValueRange{results}};
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize.cc

              "StorageCastOp must have the same quantized type");
          return failure();
        }
    
        // Cast to float type before the AvgPool op.
        OpBuilder::InsertionGuard g(rewriter);
        rewriter.setInsertionPointAfter(preceding_sc_op);
        auto fcast_op = rewriter.create<TF::CastOp>(
            preceding_sc_op->getLoc(), dq_arg_type.clone(rewriter.getF32Type()),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 22 05:52:39 UTC 2024
    - 23.6K bytes
    - Viewed (0)
Back to top