Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 46 for setInsertionPointAfter (0.46 sec)

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

            op_operand.set(builder.create<TF::CastOp>(
                op->getLoc(), ToBfloat16Type(op_operand.get().getType()),
                op_operand.get()));
          }
        }
        builder.setInsertionPointAfter(op);
        for (auto op_result : op->getOpResults()) {
          if (IsLargeFloatType(op_result.getType())) {
            const Type original_type = op_result.getType();
            op_result.setType(ToBfloat16Type(original_type));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 08:32:43 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/utils/fake_quant_utils.h

          quant_dim = input_type.getRank() - 1;
        }
        // Use the min/max from the operands and the num_bits and narrow_range
        // attribute to create the quantization parameter for the new quantize op.
        rewriter.setInsertionPointAfter(tf_op.getOperation());
        IntegerAttr num_bits = rewriter.getI64IntegerAttr(tf_op.getNumBits());
        BoolAttr narrow_range = rewriter.getBoolAttr(tf_op.getNarrowRange());
        Type res_type = tf_op.getType();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_driver.cc

      return true;
    }
    
    void QuantizationDriver::QuantizeOpResult(Operation* op, const int result_index,
                                              const QuantizedType quantized_type) {
      builder_.setInsertionPointAfter(op);
      const Value original_result = op->getResult(result_index);
      QuantizeValue(original_result, quantized_type, op->getLoc());
    }
    
    void QuantizationDriver::QuantizeArg(BlockArgument arg,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 38.1K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_composite_functions.cc

            return failure();
          }
        }
        if (call_op->use_empty()) return success();
    
        DenseMap<Value, quantfork::StorageCastOp> replace_map;
        rewriter.setInsertionPointAfter(call_op);
    
        SmallVector<Type, 4> result_types;
        for (Value result : call_op->getResults()) {
          TensorType result_type = mlir::dyn_cast<TensorType>(result.getType());
          if (!result_type) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 54.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/utils/fake_quant_utils.h

        }
        // Use the min/max from the operands and the num_bits and narrow_range
        // attribute to create the quantization parameter for the new quantize op.
        rewriter.setInsertionPointAfter(tf_op.getOperation());
        IntegerAttr num_bits = rewriter.getI64IntegerAttr(tf_op.getNumBits());
        BoolAttr narrow_range = rewriter.getBoolAttr(tf_op.getNarrowRange());
        Type res_type = tf_op.getType();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/quantization/tensorflow/tf_to_quant.cc

        }
        // Use the min/max from the operands and the num_bits and narrow_range
        // attribute to create the quantization parameter for the new quantize op.
        rewriter.setInsertionPointAfter(tf_op.getOperation());
        IntegerAttr num_bits = rewriter.getI64IntegerAttr(tf_op.getNumBits());
        BoolAttr narrow_range = rewriter.getBoolAttr(tf_op.getNarrowRange());
        Type res_type = tf_op.getType();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/tensorflow/passes/propagate_quantize_type.cc

                                 Type new_user_op_type) const {
        auto op_before_dequantize = original_dequantize_op.getOperand(0);
    
        // Create a new dequantize op that is propagated.
        rewriter.setInsertionPointAfter(user_op);
        TF::PartitionedCallOp new_dequantize_op =
            cast<TF::PartitionedCallOp>(rewriter.clone(*original_dequantize_op));
    
        // Skip the original dequant op and connect the op before dequantize to the
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/transforms/quantize_variables.cc

          auto read_variable_op = dyn_cast_or_null<ReadVariableOp>(var_handle_user);
          if (!read_variable_op) continue;
          // Add dequantize.
          builder.setInsertionPointAfter(read_variable_op);
          auto new_read_variable_op =
              builder.create<ReadVariableOp>(read_variable_op.getLoc(), ref_qtype,
                                             read_variable_op.getResourceId());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/stablehlo/passes/quantization_patterns.cc

            gemm_style_shape, accumulation_quantized_element_type);
      }
    
      gemm_style_op_result.setType(new_gemm_style_op_result_type);
    
      rewriter.setInsertionPointAfter(gemm_style_op);
    
      Operation* next_op = FindUserOfType<>(gemm_style_op);
    
      // If activation exists, omit clipping op.
      // Since out_scale and out_zp are computed based on clipped range,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 06:04:36 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.h

          if (legacy_float_scale) {
            quant_type = DownCastScale(quant_type, rmin, rmax, op->getLoc());
          }
        } else {
          return failure();
        }
    
        rewriter.setInsertionPointAfter(op.getOperation());
        Type result_type = quant_type.castFromExpressedType(op.getType());
        auto q =
            rewriter.create<QuantizeOpT>(op.getLoc(), result_type, op.getArg());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 20:30:06 UTC 2024
    - 41.7K bytes
    - Viewed (0)
Back to top