Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 34 for FloatAttr (0.11 sec)

  1. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.cc

        for (auto it = mins.begin(); it != mins.end(); ++it) {
          min_value.push_back(FloatAttr::getValueAsDouble(*it));
        }
        for (auto it = maxs.begin(); it != maxs.end(); ++it) {
          max_value.push_back(FloatAttr::getValueAsDouble(*it));
        }
      } else {
        const auto fmin = dyn_cast<FloatAttr>(min);
        const auto fmax = dyn_cast<FloatAttr>(max);
        if (fmin && fmax) {
          min_value.push_back(fmin.getValueAsDouble());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 02:10:16 UTC 2024
    - 43.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.h

          if (!stats) return failure();
    
          for (auto it = stats.begin(), e = stats.end(); it != e; ++it) {
            double rmin = FloatAttr::getValueAsDouble(*it++);
            double rmax = FloatAttr::getValueAsDouble(*it);
            // The default nudging implementation of mlir quant library might cause
            // clamping during inference if the calibration range isn't wide enough.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 20:30:06 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/quantization/ir/ConvertConst.cc

      if (!quantizedElementType.isCompatibleExpressedType(
              qbarrier.getArg().getType())) {
        return failure();
      }
    
      // Is the constant value a type expressed in a way that we support?
      if (!mlir::isa<FloatAttr, DenseElementsAttr, SparseElementsAttr>(value)) {
        return failure();
      }
    
      Type newConstValueType;
      auto newConstValue =
          quantizeAttr(value, quantizedElementType, newConstValueType);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/utils/export_utils.cc

      return absl::OkStatus();
    }
    
    Status ConvertAttribute(const mlir::IntegerAttr& attr, AttrValue* value) {
      value->set_i(attr.getInt());
      return absl::OkStatus();
    }
    
    Status ConvertAttribute(const mlir::FloatAttr& attr, AttrValue* value) {
      value->set_f(attr.getValueAsDouble());
      return absl::OkStatus();
    }
    
    Status ConvertAttribute(const mlir::ElementsAttr& attr, AttrValue* value) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/ir/tf_arith_ops_folder.h

              ? 1
              : 0;
    
      Type element_ty = lhs_type.getElementType();
      Attribute identity_attr;
      if (auto ty = mlir::dyn_cast<FloatType>(element_ty)) {
        identity_attr = FloatAttr::get(ty, static_cast<double>(identity));
      } else if (auto ty = mlir::dyn_cast<IntegerType>(element_ty)) {
        identity_attr = IntegerAttr::get(ty, static_cast<int64_t>(identity));
      } else {
        return {};
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/utils/fake_quant_utils.h

    #include "tensorflow/compiler/mlir/tensorflow/ir/tf_ops_a_m.h"
    
    namespace mlir {
    namespace quant {
    
    template <class TFFakeQuantOp>
    struct FetchMinMaxAttrs {
      using AttrType = FloatAttr;
      bool operator()(TFFakeQuantOp tf_op, AttrType &min_value,
                      AttrType &max_value) const {
        min_value = tf_op.getMinAttr();
        max_value = tf_op.getMaxAttr();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/transforms/prepare_tf.cc

        {
          epsilon =
              fused_batch_norm_op->getAttrOfType<::mlir::FloatAttr>("epsilon");
          if (!epsilon)
            epsilon = rewriter.getFloatAttr(rewriter.getF32Type(), 0.0001f);
    
          if (!(((mlir::isa<::mlir::FloatAttr>(epsilon))) &&
                ((mlir::cast<::mlir::FloatAttr>(epsilon).getType().isF32())))) {
            return rewriter.notifyMatchFailure(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 21:49:50 UTC 2024
    - 64.6K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/utils/fake_quant_utils.h

    #include "tensorflow/compiler/mlir/tensorflow/ir/tf_ops_a_m.h"
    
    namespace mlir {
    namespace TFL {
    
    template <class TFFakeQuantOp>
    struct FetchMinMaxAttrs {
      using AttrType = FloatAttr;
      bool operator()(TFFakeQuantOp tf_op, AttrType &min_value,
                      AttrType &max_value) const {
        min_value = tf_op.getMinAttr();
        max_value = tf_op.getMaxAttr();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/experimental/tac/execution_metadata_exporter.cc

      for (const auto& kv : hardware_map) {
        auto cost_attr = device_costs_attr.getNamed(kv.first);
        if (!cost_attr.has_value()) return std::nullopt;
        float cost = mlir::dyn_cast_or_null<mlir::FloatAttr>(cost_attr->getValue())
                         .getValueAsDouble();
        device_costs[kv.second] = cost;
      }
      return device_costs;
    }
    
    flatbuffers::Offset<SubgraphMetadata> CreateSubgraphMetadata(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 06:11:34 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/utils/lstm_utils_test.cc

          mlir::cast<ElementsAttr>(mlir::cast<mlir::arith::ConstantOp>(
                                       it->getOpOperand(15).get().getDefiningOp())
                                       .getValue())
              .getValues<FloatAttr>()[0]
              .getValue()
              .isExactlyValue(0.0f));
    
      EXPECT_EQ(fused_lstm_func_.getFunctionType().getNumResults(), 1);
      auto output_types = fused_lstm_func_.getFunctionType().getResults();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10K bytes
    - Viewed (0)
Back to top