Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 171 for getElementDtype (0.22 sec)

  1. tensorflow/compiler/mlir/lite/transforms/legalize_tensorlist.cc

        element_type = reserve.getElementDtype();
      }
      if (auto stack = llvm::dyn_cast_or_null<TF::TensorListStackOp>(op)) {
        element_type = stack.getElementDtype();
      }
      if (auto set_item = llvm::dyn_cast_or_null<TF::TensorListSetItemOp>(op)) {
        element_type = set_item.getElementDtype();
      }
      if (auto from_tensor =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 07 23:04:40 UTC 2024
    - 10.6K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/tensor_list_ops_decomposition.cc

          return list.emitOpError("unknown tensor list element shape");
        }
      }
      if (failed(cutil::CreateInitBufferValue(
              element_shape, list.getMaxNumElements(), list, list.getElementDtype(),
              builder, &buffer))) {
        return failure();
      }
      Value size = cutil::GetR1Const({0LL}, builder, list.getLoc());
      list.getHandle().replaceAllUsesWith(buffer);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 39.2K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/transforms/lower_static_tensor_list.cc

        return UnrankedTensorType::get(
            variant_ty.getSubtypes()[0].getElementType());
      }
      Type value_type = value.getType();
      Type element_type;
      variant_ty = value_type.dyn_cast<TF::VariantType>();
      if (variant_ty && !variant_ty.getSubtypes().empty()) {
        element_type = variant_ty.getSubtypes()[0].getElementType();
      } else {
        element_type = getElementTypeOrSelf(value_type);
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 20:00:43 UTC 2024
    - 70.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/utils/tftext_utils.cc

      if (!RankEquals(value_type, 1) ||
          !mlir::isa<StringType>(value_type.getElementType())) {
        return func.emitError() << "1st output should be string tensor";
      }
      if (func.getNumResults() > 1) {
        auto offset_type = GetResultType(func, 1);
        if (!RankEquals(offset_type, 1) ||
            !offset_type.getElementType().isInteger(64)) {
          return func.emitError() << "2nd output should be int64 tensor";
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.4K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/decompose_hybrid_quantization.cc

          allTypesQuantizedOrInt &=
              (mlir::isa<quant::QuantizedType>(type.getElementType()) ||
               mlir::isa<IntegerType>(type.getElementType()));
        }
    
        for (auto result : op->getResults()) {
          ShapedType type = mlir::cast<ShapedType>(result.getType());
          allTypesFp &= !mlir::isa<quant::QuantizedType>(type.getElementType());
          allTypesQuantizedOrInt &=
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/flatbuffer_operator.h

    // we're just returning empty vector
    template <>
    inline std::vector<bool> GetVector(DenseElementsAttr elements) {
      auto type = elements.getType();
      auto elemType = type.getElementType();
      if (elemType.isSignlessInteger(1)) {
        auto vec = llvm::to_vector(
            llvm::map_range(elements.getValues<bool>(),
                            [&](bool value) -> uint8_t { return value ? 1 : 0; }));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 16 21:00:09 UTC 2024
    - 11.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/utils/variables_utils.cc

                   .getType()
                   .cast<ShapedType>()
                   .getElementType()
                   .cast<TF::TensorFlowTypeWithSubtype>()
                   .GetSubtypes()
                   .back();
      }
      return IsSupportedVariableType(type);
    }
    
    bool IsSupportedVariableType(ShapedType type) {
      auto element_type = type.getElementType();
      // Check complex types.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jun 21 19:32:03 UTC 2021
    - 2.6K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform_patterns.cc

      int64_t num_units = output_type.getDimSize(output_type.getRank() - 1);
      auto bias_type =
          mlir::RankedTensorType::get({num_units}, output_type.getElementType());
    
      mlir::DenseElementsAttr bias_attr;
      if (output_type.getElementType().isF32()) {
        float val = 0.0;
        bias_attr = mlir::DenseFPElementsAttr::get(bias_type, val);
      } else {
        // TODO(renjieliu): Refactor this and share the logic with
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 25.4K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize.cc

            if (type.getElementType().isa<FloatType>()) {
              return false;
            }
            if (type.getElementType().isa<QuantizedType>()) {
              has_quantized_types = true;
            }
          }
        }
        for (Value output : call_op.getOutput()) {
          if (auto type = output.getType().dyn_cast<TensorType>()) {
            if (type.getElementType().isa<FloatType>()) {
              return false;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 22 05:52:39 UTC 2024
    - 23.6K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/utils/attribute_utils.cc

    namespace mlir {
    namespace TFL {
    
    FloatAttr ExtractSingleElementAsFloat(ElementsAttr attr) {
      if (attr.getShapedType().getNumElements() != 1 ||
          !mlir::isa<FloatType>(attr.getShapedType().getElementType())) {
        return {};
      }
      return attr.getSplatValue<FloatAttr>();
    }
    
    FloatAttr GetSingleElementAsFloatOrSelf(Attribute attr) {
      if (auto m = mlir::dyn_cast_or_null<ElementsAttr>(attr)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 1.6K bytes
    - Viewed (0)
Back to top