Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 86 for GetShape (0.18 sec)

  1. tensorflow/compiler/mlir/lite/utils/lstm_utils.cc

                                              axis_op);
    }
    
    ArrayRef<int64_t> GetRankedTensorShape(Value value) {
      return mlir::cast<RankedTensorType>(value.getType()).getShape();
    }
    
    Value SliceRankedTensor(OpBuilder* builder, Value input,
                            ArrayRef<int64_t> begin_shape,
                            ArrayRef<int64_t> begin_values,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 36.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/stablehlo/transforms/hlo_matchers.cc

      DenseIntElementsAttr iota_const_attr;
      if (!matchPattern(iota, m_Constant(&iota_const_attr))) return false;
    
      auto iota_type = iota_const_attr.getType();
      auto iota_shape = iota_type.getShape();
      auto reduce_dim = (*dimensions.value_begin<APInt>()).getSExtValue();
      if (reduce_dim < 0) reduce_dim += iota_type.getRank();
    
      auto index =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tf2xla/api/v1/compile_mlir_util.cc

      auto ranked_ty = mlir::dyn_cast_or_null<mlir::RankedTensorType>(ty);
      if (!ranked_ty) return {};
    
      int64_t rank = ranked_ty.getRank();
      llvm::SmallVector<int64_t, 4> dims = llvm::to_vector<4>(ranked_ty.getShape());
      auto encoding = mlir::dyn_cast_or_null<mlir::mhlo::TypeExtensionsAttr>(
          ranked_ty.getEncoding());
      if (encoding && !encoding.getBounds().empty()) {
        for (int64_t dim = 0; dim < rank; ++dim) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 17:24:39 UTC 2024
    - 45.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tf2xla/transforms/tf2xla_rewriter.cc

          return op_->emitRemark()
                 << "skipping legalization due to unsupported type "
                 << operand.getType();
        }
    
        auto shape_or = expr.GetShape();
        if (!shape_or.ok()) {
          return op_->emitRemark()
                 << "failed to get shape for expression. " << expr.HumanString();
        }
    
        tensors.emplace_back(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:16:07 UTC 2024
    - 18.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/layout_optimization.cc

    // Revert the permutation applied in `type`.
    static mlir::ShapedType ReversePermuteShapedType(
        mlir::ShapedType type, ArrayRef<int64_t> permutation) {
      if (!type.hasRank()) return type;
    
      auto shape = type.getShape();
      SmallVector<int64_t, 4> new_shape(shape.size());
    
      for (int i = 0; i < permutation.size(); ++i) {
        int64_t index = permutation[i];
        assert(index < shape.size());
        new_shape[index] = shape[i];
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 19.3K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/transforms/prepare_quantize_helper.h

            aqtype.getZeroPoints(), new_out_quant_dim, /*narrow_range=*/true);
        auto new_tensor_type = RankedTensorType::getChecked(
            transpose_op.getLoc(), transpose_op.getType().getShape(), new_qtype);
        rewriter.setInsertionPointAfter(transpose_op);
        auto new_q_op = rewriter.create<quantfork::QuantizeCastOp>(
            transpose_op.getLoc(), new_tensor_type, q_op.getArg());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 18:01:23 UTC 2024
    - 28K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/ir/tfl_ops.td

          ".getShape()[" # dim # " ] == " # size>]>;
    
    // Returns true if the n-th operand is ranked and has a dimension length <=
    // size at the rank dim.
    class TFL_OperandDimIsAtMost<int n, int dim, int size> : And<[
      TFL_OperandIsRankedAndHasDimPred<n, dim>,
      CPred<"$_op.getOperand(" # n # ").getType().cast<ShapedType>()"
          ".getShape()[" # dim # " ] <= " # size>]>;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 06 19:09:08 UTC 2024
    - 186K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/stack_ops_decomposition.cc

      if (!elem_type.has_value()) {
        return stack.emitOpError("cannot infer element shape of stack");
      }
      OpBuilder builder(stack);
      Value buffer;
      if (failed(cutil::CreateInitBufferValue(
              elem_type->getShape(), stack.getMaxSize(), stack,
              elem_type->getElementType(), builder, &buffer))) {
        return failure();
      }
      auto size_var_type = GetSizeVarType(builder);
      auto var_type = RankedTensorType::get(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 23.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/c/c_api_unified_experimental_mlir.cc

      }
      elt_type = TensorFlowRefType::get(elt_type);
      if (RankedTensorType tensor_type = mlir::dyn_cast<RankedTensorType>(type)) {
        *output_type = RankedTensorType::get(tensor_type.getShape(), elt_type);
      }
      *output_type = UnrankedTensorType::get(elt_type);
      return absl::OkStatus();
    }
    
    Status MlirAbstractOp::Create(ArrayRef<Value> operands,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tf2xla/internal/passes/extract_outside_compilation.cc

      if (!ranked_type)
        return context_op->emitOpError()
               << "A map_outside_compilation op's input and output types must be "
                  "ranked tensors.";
      ArrayRef<int64_t> in_shape = ranked_type.getShape();
      if (in_shape.empty() || in_shape[0] < 0) {
        return context_op->emitOpError()
               << "A map_outside_compilation op's input and output shapes must "
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 21:25:12 UTC 2024
    - 68.3K bytes
    - Viewed (0)
Back to top