Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for has_same_scale_requirement (0.31 sec)

  1. tensorflow/compiler/mlir/quantization/stablehlo/ops/stablehlo_op_quant_spec.cc

                    mlir::stablehlo::ReshapeOp, mlir::stablehlo::SelectOp,
                    mlir::stablehlo::SliceOp, mlir::stablehlo::TransposeOp>(op)) {
        scale_spec->has_same_scale_requirement = true;
      }
      if (llvm::isa<mlir::stablehlo::DynamicSliceOp, mlir::stablehlo::GatherOp,
                    mlir::stablehlo::PadOp, mlir::stablehlo::SliceOp>(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)
  2. tensorflow/compiler/mlir/quantization/tensorflow/ops/tf_op_quant_spec.cc

              TF::ShapeOp,
              TF::SizeOp,
              TF::SqueezeOp,
              TF::TransposeOp
              // go/keep-sorted end
              // clang-format on
              >(op)) {
        scale_spec->has_same_scale_requirement = true;
      }
      return scale_spec;
    }
    
    }  // namespace quant
    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/stablehlo/passes/quantization_patterns.cc

          // same-scale ops are quantized only when they are connected to quantized
          // composite functions.
          if (!GetStableHloQuantConstraints(op_with_region)
                   ->has_same_scale_requirement ||
              !IsConnectedWithQuantizedCompsiteFunction(op_with_region)) {
            return failure();
          }
        }
        return success();
      }
    
      void rewrite(quantfork::DequantizeCastOp 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)
  4. tensorflow/compiler/mlir/quantization/stablehlo/passes/quantization_patterns.h

            return failure();
          }
    
          if (!IsOpQuantizableStableHlo(candidate_op)) {
            return failure();
          }
    
          if (GetStableHloQuantConstraints(candidate_op)
                  ->has_same_scale_requirement &&
              !IsConnectedWithQuantizedCompsiteFunction(candidate_op)) {
            return failure();
          }
    
          // Ops with regions will be quantized in a separate pattern.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_driver.cc

          // op with same scale requirements, and haven't been quantized are
          // weights.
          if (!biases.contains(operand_num) &&
              !scale_spec->has_same_scale_requirement &&
              !dyn_cast<quantfork::QuantizeCastOp>(user)) {
            // Needs to scan the content of weights to get the quantization
            // parameters if there are no quantization parameters (FakeQuant ops).
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 38.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize.cc

          if (quantizing_op->hasTrait<OpTrait::IsTerminator>()) {
            return failure();
          }
    
          if (!op_quant_scale_spec_getter_(quantizing_op)
                   ->has_same_scale_requirement) {
            continue;
          }
    
          if (target_opset_ == OpSet::XLA &&
              !IsConnectedWithCompsiteFunction(quantizing_op)) {
            continue;
          }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 22 05:52:39 UTC 2024
    - 23.6K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.cc

      }
      return false;
    }
    
    std::unique_ptr<OpQuantScaleSpec> GetDefaultQuantScaleSpec(Operation* op) {
      auto spec = std::make_unique<OpQuantScaleSpec>();
      if (isa<SameScalesOpInterface>(op)) {
        spec->has_same_scale_requirement = true;
        spec->required_same_scale_func = [op](const bool sign,
                                              const int bit_width) {
          return cast<SameScalesOpInterface>(op)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 02:10:16 UTC 2024
    - 43.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.h

    struct OpQuantScaleSpec {
      // Whether this op has a fixed range requirement (e.g. sigmoid)
      bool has_fixed_output_range = false;
      // Whether this op should have same operand and result scales (e.g. concat)
      bool has_same_scale_requirement = false;
      // Whether this op should have same operand and result type (e.g. gather)
      bool has_same_operand_and_result_type_requirement = false;
      // Returns the fixed output range, when has_fixed_output_range is set.
    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