Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 485 for element_types (0.23 sec)

  1. tensorflow/compiler/mlir/tensorflow/translate/import_model.cc

        auto* output_shapes = node.attrs().Find("output_shapes");
        auto* element_types = node.attrs().Find("T");
        if (output_shapes && !output_shapes->list().shape().empty()) {
          const auto& output_shape = output_shapes->list().shape(idx);
          const auto& element_type = element_types->list().type(idx);
          return ConvertToMlirTensorType(output_shape, element_type, &builder);
        }
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 01 11:17:36 UTC 2024
    - 183.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf.cc

        }
    
        Location loc = op.getLoc();
        Type element_type = input_ty.getElementType();
    
        // Only float, int, and complex types are currently supported.
        if (!mlir::isa<FloatType>(element_type) &&
            !mlir::isa<IntegerType>(element_type) &&
            !mlir::isa<ComplexType>(element_type)) {
          return rewriter.notifyMatchFailure(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 20:00:43 UTC 2024
    - 291.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/collection_ops_util.cc

                          size_const});
      if (keep_slice_shape) return slice;
      auto element_type = tensorflow::GetTypeFromTFTensorShape(
          buffer_type.getShape().drop_front(), buffer_type.getElementType());
      auto reshape = builder.create<TF::ReshapeOp>(
          loc, ArrayRef<Type>{element_type},
          ArrayRef<Value>{slice,
                          GetR1Const(element_type.getShape(), builder, loc)});
      return reshape.getOutput();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.5K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/transforms/lower_static_tensor_list.cc

        int64_t result_rank = -1;  // -1 means unknown result rank.
        Type element_dtype = op.getElementDtype();
        Type result_type = UnrankedTensorType::get(element_dtype);
        Value leading_dim = GetNumElements(op, adaptor.getOperands(), &rewriter);
        if (auto element_type =
                op.element_type().template dyn_cast<RankedTensorType>()) {
          result_rank = element_type.getRank() + 1;
          int64_t leading_dim_v = -1;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 20:00:43 UTC 2024
    - 70.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/passes/unfreeze_constants.cc

      for (auto& [const_op, shared_name] : const_op_name_map) {
        const auto element_type = TF::ResourceType::get(
            /*subtypes=*/llvm::ArrayRef<TensorType>{const_op.getType()},
            builder.getContext());
    
        const auto ranked_tensor_type = RankedTensorType::get(
            /*shape=*/{}, /*elementType=*/element_type);
        auto var_handle_op =
            builder.create<TF::VarHandleOp>(const_op.getLoc(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Aug 16 15:04:53 UTC 2023
    - 14K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/utils/variables_utils.cc

            (quant_type.getStorageTypeIntegralWidth() == 32 &&
             quant_type.isSigned()))
          return true;
      }
      return element_type.isF32() || element_type.isF64() ||
             element_type.isInteger(1) || element_type.isInteger(8) ||
             element_type.isInteger(32) || element_type.isSignlessInteger(64);
    }
    
    }  // namespace utils
    }  // namespace TFL
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jun 21 19:32:03 UTC 2021
    - 2.6K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/transforms/legalize_tensorlist.cc

        element_type = push_back.getElementDtype();
      }
    
      if (!element_type.has_value()) return false;
      // TODO(b/288302706) add support for all types handled in the
      // `lower_static_tensor_list` pass.
      return element_type->isF32() || element_type->isInteger(64) ||
             element_type->isInteger(32) || element_type->isInteger(1);
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 07 23:04:40 UTC 2024
    - 10.6K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/utils/constant_utils.cc

      Type element_type = shaped_type.getElementType();
      if (element_type.isF16()) {
        auto floatType = mlir::FloatType::getF16(element_type.getContext());
        auto floatAttr = mlir::FloatAttr::get(floatType, static_cast<float>(value));
        std::vector<Attribute> floatValues({floatAttr});
        return DenseElementsAttr::get(shaped_type, floatValues);
      } else if (element_type.isBF16()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/stablehlo/transforms/tflite_legalize_hlo.cc

        auto element_type = attr.getType().getElementType();
        if (attr.getNumElements() != 1 || !element_type.isIntOrFloat())
          return false;
        if (mlir::isa<FloatType>(element_type)) {
          auto value = *attr.value_begin<APFloat>();
          return value.isNegative() && value.isInfinity();
        } else if (element_type.isInteger(1)) {
          auto value = *attr.value_begin<APInt>();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/unroll_batch_matmul.cc

    TF::ReshapeOp ConvertTFBatchMatMulOp<BatchMatMulOpType>::createReshapeOp(
        Value value, ArrayRef<int64_t> shape, Type element_type, Location loc,
        PatternRewriter& rewriter) {
      int64_t shape_rank = shape.size();
      auto shape_spec_type =
          RankedTensorType::get({shape_rank}, rewriter.getIntegerType(64));
      Type resultType = RankedTensorType::get(shape, element_type);
      auto constant_attr = DenseElementsAttr::get(shape_spec_type, shape);
      auto shape_tensor =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.6K bytes
    - Viewed (0)
Back to top