Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 79 for getElementDtype (0.21 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/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)
  4. 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)
  5. 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)
  6. 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)
  7. tensorflow/compiler/mlir/lite/transforms/dense_to_sparse.cc

      int num_elements = type.getNumElements();
      int num_zeros = 0;
    
      if (mlir::isa<FloatType>(type.getElementType())) {
        for (const auto val : attr.getValues<APFloat>()) {
          if (val.isZero()) {
            num_zeros++;
          }
        }
      } else if (mlir::isa<quant::QuantizedType>(type.getElementType())) {
        for (const auto val : attr.getValues<int8_t>()) {
          if (val == 0) {
            num_zeros++;
          }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 16.1K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/unroll_batch_matmul.cc

      // Skip int8 x int8 => int32.
      if (lhs_type.getElementType().isInteger(8) &&
          rhs_type.getElementType().isInteger(8)) {
        return rewriter.notifyMatchFailure(op,
                                           "skip unrolling for int8 BatchMatMulV3");
      }
    
      auto element_type = lhs_type.getElementType();
    
      if (element_type != rhs_type.getElementType()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/stablehlo/transforms/optimize.cc

        if (dot.getLhs().getType().getElementType() !=
                first_dot.getLhs().getType().getElementType() ||
            dot.getRhs().getType().getElementType() !=
                first_dot.getRhs().getType().getElementType() ||
            dot.getType().getElementType() != first_dot.getType().getElementType())
          return rewriter.notifyMatchFailure(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 26.9K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/dot_general.cc

            RankedTensorType::get(lhs_flattened_shape, lhs_type.getElementType()),
            lhs_transposed.getResult());
      } else {
        auto lhs_flattend_shape_op = BuildDotOperandFlattenedShapeOp(
            lhs, lhs_dot_dimensions_info, builder, /*is_lhs=*/true);
        lhs_flattend = rewriter.create<mhlo::DynamicReshapeOp>(
            loc,
            RankedTensorType::get(lhs_flattened_shape, lhs_type.getElementType()),
            lhs_transposed, lhs_flattend_shape_op);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 19.2K bytes
    - Viewed (0)
Back to top