Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for insertion_guard (0.2 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/tf2xla/transforms/utils.h

    namespace mhlo {
    
    // Builds body for reduce op by using the template binary op as the
    // reducer op.
    template <typename Op>
    void BuildReduceBody(Type element_type, Region* body, OpBuilder* builder) {
      OpBuilder::InsertionGuard guard(*builder);
      Block* block = builder->createBlock(body);
    
      // Block arguments are scalars of the given element type.
      Type type = RankedTensorType::get(/*shape=*/{}, element_type);
      Location loc = body->getLoc();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  3. 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)
  4. tensorflow/compiler/mlir/quantization/tensorflow/passes/lift_hashtable_ops_as_args.cc

                                            block.getArgumentTypes(),
                                            func_type.getResults()));
    
      IRMapping mapping;
      OpBuilder builder(module_op);
      OpBuilder::InsertionGuard g(builder);
      // The function has been checked to have at least one use.
      auto function_uses =
          SymbolTable::getSymbolUses(target_func, &module_op.getBodyRegion());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf.cc

                                                     init_values_with_loop_iv);
      auto ivs_count = init_types_with_loop_iv.size();
    
      {
        OpBuilder::InsertionGuard guard(*builder);
    
        // Build up the only block in the condition region.
        Region &condition = while_op.getCond();
        Block *block = builder->createBlock(&condition);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 20:00:43 UTC 2024
    - 291.8K bytes
    - Viewed (0)
Back to top