Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 29 for quantized_type (0.34 sec)

  1. tensorflow/compiler/mlir/quantization/common/uniform_quantized_types_test.cc

      const UniformQuantizedType quantized_type =
          CreateI8F32UniformQuantizedType(UnknownLoc::get(&ctx_), ctx_,
                                          /*scale=*/1.0, /*zero_point=*/0);
    
      EXPECT_TRUE(quantized_type.getExpressedType().isF32());
    }
    
    TEST_F(CreateI8F32UniformQuantizedTypeTest, SignedQuantizedTypeSucceeds) {
      const UniformQuantizedType quantized_type =
          CreateI8F32UniformQuantizedType(UnknownLoc::get(&ctx_), ctx_,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.8K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/stablehlo/passes/insert_weight_param.cc

                                          TF::XlaCallModuleOp op) {
        const QuantizedType& quantized_type =
            weight_only_ptq.input_quantized_types().at(1);
        if (quantized_type.dimension_specs().has_dimension()) {
          return quantized_type.dimension_specs().dimension();
        }
        return GetDefaultQuantizationDimension(op);
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 05:56:10 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_driver.cc

          operand_states[{op, index}] = cached->second;
        }
        return;
      }
    
      const QuantizedType quantized_type =
          QuantizedType::getQuantizedElementType(value.getType());
    
      const bool immutable = quantized_type != nullptr;
      const QuantizationDriver::QuantStateIndex next_state_index = states.size();
      states.push_back({quantized_type, immutable});
      if (as_result) {
        result_states[{op, index}] = next_state_index;
      } else {
    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/common/quantization_lib/quantization_driver.h

      // Inserts the Quantize and Dequantize ops after `arg`. The quantized element
      // type for `arg` is `quantized_type`.
      void QuantizeArg(BlockArgument arg, QuantizedType quantized_type);
    
      // Inserts the Quantize and Dequantize ops (i.e. QDQ) after `value`. The
      // quantized element type for `value` is `quantized_type`.
      void QuantizeValue(Value value, QuantizedType quantized_type, Location loc);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Mar 20 11:42:17 UTC 2024
    - 16.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/stablehlo/cc/config_test.cc

      EXPECT_THAT(weight_only_ptq_spec.input_quantized_types(),
                  UnorderedElementsAre(Pair(
                      1, Truly([](const auto& quantized_type) {
                        return quantized_type.has_dimension_specs() &&
                               !quantized_type.dimension_specs().has_dimension();
                      }))));
    }
    
    }  // namespace
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 06:59:34 UTC 2024
    - 12K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/ops/tf_quantize_op.cc

                                               QuantizedType quant_type) {
      DenseFPElementsAttr attr;
      if (!matchPattern(op->getResult(0), m_Constant(&attr))) {
        return nullptr;
      }
      Type expressed_type = op.getResult().getType();
      Type quantized_type = quant_type.castFromExpressedType(expressed_type);
      ShapedType shaped_quantized_type = mlir::cast<ShapedType>(quantized_type);
      DenseElementsAttr tensor_proto_attr =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/tf_to_tfl_flatbuffer.cc

      const ::tflite::Model* input_model = ::tflite::GetModel(buffer);
    
      ::tflite::optimize::BufferType quantized_type;
      switch (quant_specs.inference_type) {
        case DT_QINT8:
          quantized_type = ::tflite::optimize::BufferType::QUANTIZED_INT8;
          break;
        case DT_HALF:
          quantized_type = ::tflite::optimize::BufferType::QUANTIZED_FLOAT16;
          break;
        default:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 18:01:23 UTC 2024
    - 23.8K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/stablehlo/passes/quantize_weight.cc

          return;
        }
    
        TensorType old_result_type =
            mlir::dyn_cast<TensorType>(op.getResult().getType());
        const FloatType quantized_type = FloatType::getF16(op.getContext());
        const ShapedType new_result_type = old_result_type.clone(quantized_type);
    
        // Insert ConvertOp if it does not exist yet. Otherwise, just rewire without
        // creating a ConvertOp.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/transforms/prepare_quantize_dynamic_range.cc

          return;
        }
    
        // Get types
        TensorType old_result_type =
            mlir::dyn_cast<TensorType>(op.getResult().getType());
        FloatType quantized_type = FloatType::getF16(op.getContext());
        ShapedType new_result_type = old_result_type.clone(quantized_type);
    
        // Insert CastOp if it does not exist yet. Otherwise, just rewire without
        // creating a CastOp.
        for (auto& connected_op : op.getResult().getUses()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 20.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/transforms/post_quantize.cc

        auto arg = bb.getArgument(0);
    
        auto remove_quantize_op = [&](QuantizeOp quantize_op) {
          auto quantize_output = quantize_op.getOutput();
          auto quantize_type = quantize_output.getType();
          input_types.push_back(quantize_type);
          auto new_arg = bb.addArgument(quantize_type, loc);
          quantize_output.replaceAllUsesWith(new_arg);
          quantize_op.erase();
          arg.dropAllUses();
          bb.eraseArgument(0);
        };
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.1K bytes
    - Viewed (0)
Back to top