Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 46 for setInsertionPointAfter (0.3 sec)

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

                               ModuleOp module_op) {
      MLIRContext* ctx = module_op.getContext();
      OpBuilder builder(ctx);
      Operation* last_subgraph_op = reverse_subgraph.front();
      builder.setInsertionPointAfter(last_subgraph_op);
    
      // Create attributes used for creating an XlaCallModuleOp.
      SmallVector<Attribute> shape_attrs;
      for (const Type result_type : result_types) {
        shape_attrs.push_back(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/layout_optimization.cc

          op->setOperand(
              arg, builder.create<TransposeOp>(loc, op->getOperand(arg), arg_perm));
        }
    
        // Permute results back to the original data format.
        builder.setInsertionPointAfter(op);
        auto res_perm = builder.create<ConstOp>(loc, perm_attr(res_permutation));
    
        for (int64_t res : layout_sensitive_interface.GetLayoutDependentResults()) {
          OpResult result = op->getResult(res);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 19.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/quantization/import_quant_stats_pass.cc

        axis_stats = DenseFPElementsAttr::get(
            RankedTensorType::get(axis_stats_shape, b.getF32Type()), min_maxs);
        axis = b.getI64IntegerAttr(info.meta().quantize_axis());
      }
    
      b.setInsertionPointAfter(op);
      if (IsQuantizableResult(op, index)) {
        InsertStatsOpAtResult(b, op->getResult(index), layer_stats, axis_stats,
                              axis);
      } else {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 08 10:41:08 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize.cc

              output_types.push_back(result.getType());
            } else {
              // TODO(b/224691264): separate matching and rewriting clearly.
              return failure();
            }
          }
    
          rewriter.setInsertionPointAfter(quantizing_op);
          OperationState new_state(quantizing_op->getLoc(),
                                   quantizing_op->getName().getStringRef(), inputs,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 22 05:52:39 UTC 2024
    - 23.6K bytes
    - Viewed (0)
  5. 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}};
      auto func_type = FunctionType::get(context, arg_types, result_types);
    
    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/lite/stablehlo/odml_converter/transforms/outline_composites.cc

        auto func = BuildGELUDecomposition(
            rhs_add.getType().cast<RankedTensorType>(), rewriter, root.getBody());
    
        SymbolTable table(root);
        (void)table.renameToUnique(func, {});
    
        rewriter.setInsertionPointAfter(output_mul);
        auto composite_attrs = rewriter.getDictionaryAttr(
            {rewriter.getNamedAttr("approx", rewriter.getBoolAttr(false))});
        auto composite_op = rewriter.create<stablehlo::CompositeOp>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/stablehlo/passes/insert_weight_param.cc

          return;
        }
    
        const Type expressed_type = op->getResult(0).getType();
        const Type quantized_type =
            quant_type.castFromExpressedType(expressed_type);
    
        rewriter.setInsertionPointAfter(op);
        auto q = rewriter.create<quantfork::QuantizeCastOp>(
            op->getLoc(), quantized_type, op->getResult(0));
        auto dq = rewriter.create<quantfork::DequantizeCastOp>(op->getLoc(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 05:56:10 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/remove_unused_arguments.cc

      for (auto result : op->getResults()) {
        if (!erase[result.getResultNumber()]) {
          result_types.push_back(result.getType());
        }
      }
      OpBuilder builder(op);
      builder.setInsertionPointAfter(op);
      OperationState state(op->getLoc(), op->getName().getStringRef(),
                           op->getOperands(), result_types, op->getAttrs());
      for (int i = 0; i < op->getNumRegions(); ++i) {
        state.addRegion();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/preprocess_op.cc

        auto shape_spec_type =
            RankedTensorType::get({cur_rank}, rewriter.getIntegerType(64));
        auto new_shape_const_attr =
            DenseElementsAttr::get(shape_spec_type, new_shape.getShape());
        rewriter.setInsertionPointAfter(weight_op);
        auto new_shape_const = rewriter.create<arith::ConstantOp>(
            weight_op->getLoc(), shape_spec_type, new_shape_const_attr);
        auto reshape_op = rewriter.create<TF::ReshapeOp>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/stablehlo/passes/quantization_patterns.h

              outputs_replaced.insert({result, enumerated_result.index()});
              output_types.push_back(result.getType());
            } else {
              return failure();
            }
          }
    
          rewriter.setInsertionPointAfter(candidate_op);
          OperationState new_state(candidate_op->getLoc(),
                                   candidate_op->getName().getStringRef(), inputs,
                                   output_types, candidate_op->getAttrs());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.9K bytes
    - Viewed (0)
Back to top