Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 93 for quant_type (0.19 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/ops/tf_quantize_op.cc

        tensorflow::quantization::QuantizationComponentSpec& weight_spec) {
      QuantizedType quant_type =
          CalculateUniformQuantParams(rewriter, op, weight_spec);
      if (!quant_type) return nullptr;
    
      std::optional<Value> quantized_val =
          AddUniformQuantizeOps(rewriter, op, quant_type);
      if (!quantized_val.has_value()) return std::nullopt;
    
      std::optional<TF::PartitionedCallOp> dequantized_val =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/transforms/prepare_quantize_helper.h

                /*isSigned=*/true);
          }
          if (quant_specs_.legacy_float_scale) {
            quant_type = quant::DownCastScale(quant_type, min, max, op.getLoc());
          }
        }
        rewriter.setInsertionPointAfter(stats_op);
        Type result_type = quant_type.castFromExpressedType(stats_op.getType());
        auto q =
            rewriter.create<Q>(stats_op.getLoc(), result_type, stats_op.getArg());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 18:01:23 UTC 2024
    - 28K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tfr/passes/rewrite_quantized_io.cc

        Block& block = func.front();
        Operation* terminator = block.getTerminator();
    
        // Replace input_arg(tensor<quant_type>) -> tfr.cast
        // with input_arg(tensor<storage_type>) -> tfr.cast
        for (BlockArgument arg : block.getArguments()) {
          Type arg_type = arg.getType();
          if (auto quant_type = arg_type.cast<TensorType>()
                                    .getElementType()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 08 01:19:25 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_quantize_drq.cc

                  is_narrow_range, is_legacy_float));
        }
        return insertQDQ(rewriter, op, quant_type, quant_op);
      }
    
      // Insert Quantize and Dequantize ops.
      bool insertQDQ(PatternRewriter& rewriter, arith::ConstantOp op,
                     QuantizedType quant_type, QuantizationUnit quant_op) const {
        if (!quant_type) return false;
    
        Operation* quantize_op = quant_op.first;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/prepare_quantize_dynamic_range.cc

                  is_narrow_range, is_legacy_float));
        }
        return insertQDQ(rewriter, op, quant_type, quant_op);
      }
    
      // Insert Quantize and Dequantize ops.
      bool insertQDQ(PatternRewriter& rewriter, arith::ConstantOp op,
                     QuantizedType quant_type,
                     std::pair<Operation*, int> quant_op) const {
        if (!quant_type) return false;
    
        Operation* quantize_op = quant_op.first;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 20.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/stablehlo/passes/insert_weight_param.cc

        }
    
        auto quant_type = dyn_cast<quant::QuantizedType>(weight_type);
        if (!quant_type) {
          op->emitError(
              "Failed to get weight quantization parameters for weight-only "
              "quantization.");
          return;
        }
    
        const Type expressed_type = op->getResult(0).getType();
        const Type quantized_type =
            quant_type.castFromExpressedType(expressed_type);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 05:56:10 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.h

            mins.push_back(rmin);
            maxs.push_back(rmax);
          }
          quant_type = quantfork::fakeQuantAttrsToType(
              op.getLoc(), num_bits, *op.getAxis(), mins, maxs, narrow_range,
              expressed, is_signed);
          if (legacy_float_scale) {
            quant_type = DownCastScale(quant_type, mins, maxs, op->getLoc());
          }
        } else if (auto stats =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 20:30:06 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/quantization/lite/quantize_weights.cc

    TfLiteStatus QuantizeWeights(flatbuffers::FlatBufferBuilder* builder,
                                 const tflite::Model* input_model,
                                 BufferType quant_type,
                                 bool use_updated_hybrid_scheme) {
      tflite::TensorType inference_type;
      switch (quant_type) {
        case BufferType::QUANTIZED_FLOAT16:
          inference_type = tflite::TensorType_FLOAT16;
          break;
        default:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 23:15:24 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/quantization/lite/quantize_weights.h

    TfLiteStatus QuantizeWeights(flatbuffers::FlatBufferBuilder* builder,
                                 const tflite::Model* input_model,
                                 BufferType quant_type = BufferType::QUANTIZED_INT8,
                                 bool use_updated_hybrid_scheme = true);
    
    TfLiteStatus QuantizeWeights(flatbuffers::FlatBufferBuilder* builder,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 23:15:24 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_driver.cc

            /*num_bits=*/8, is_signed_,
            /*narrow_range=*/is_weight, legacy_float_scale_);
      }
      if (const auto quant_type = mlir::dyn_cast_or_null<QuantizedType>(final_type);
          quant_type != nullptr) {
        return SetResultParams(op, /*result_index=*/0, quant_type);
      }
      return false;
    }
    
    bool QuantizationDriver::SetResultParams(Operation* op, const int result_index,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 38.1K bytes
    - Viewed (0)
Back to top