Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 156 for RankedTensorType (0.26 sec)

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

        }
        // Only push down the dequantize op when the output is smaller, so that it
        // can have smaller memory usage.
        auto input_type =
            mlir::dyn_cast<RankedTensorType>(dequantize_op.getOutput().getType());
        auto output_type = mlir::dyn_cast<RankedTensorType>(
            passthrough_op->getResult(0).getType());
        if (!input_type || !output_type ||
            get_num_elements(input_type) <= get_num_elements(output_type)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/tensor_array_ops_decomposition.cc

              // deduce the shape of TensorArray by dropping the 0th dim of
              // TensorArrayScatter `value`.
              auto t = scatter.getValue().getType().dyn_cast<RankedTensorType>();
              if (!t || t.getShape().empty()) return std::nullopt;
              return RankedTensorType::get(t.getShape().drop_front(),
                                           t.getElementType());
            } else if (auto gather =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Mar 02 20:41:19 UTC 2023
    - 40.2K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/stablehlo/utils/tf_type_utils_test.cc

      return context;
    }
    
    TEST(GetDenseAttrFromTensorProtoAttrTest, Qint8ToUQ8Succeeds) {
      auto context = CreateContext();
      TensorType result_tensor_type = RankedTensorType::get(
          {2, 2}, quant::UniformQuantizedType::get(
                      quant::QuantizationFlags::FlagValue::Signed,
                      IntegerType::get(context.get(), 8),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf.cc

    // left-padded broadcasting and static shapes. Its use should not be permitted
    // in new code.
    // May return nullptr on invalid static broadcast dimensions.
    // ABSL_DEPRECATED()
    static RankedTensorType GetStaticBroadcastType(
        RankedTensorType x, RankedTensorType y,
        DenseIntElementsAttr broadcast_dimensions_attr) {
      auto element_type = x.getElementType();
      auto shape_x = x.getShape();
      auto shape_y = y.getShape();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 20:00:43 UTC 2024
    - 291.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/utils/convert_tensor_test.cc

      EXPECT_TRUE(output_proto->shape().unknown_rank());
    }
    
    TEST(ConvertTypeToTensorSpecProtoTest, RankedTensorType) {
      mlir::MLIRContext context;
      mlir::Builder b(&context);
    
      auto output_proto = ConvertTypeToTensorSpecProto(
          mlir::RankedTensorType::get({1, 2, 3}, b.getF32Type()));
      TF_ASSERT_OK(output_proto.status());
      EXPECT_EQ(output_proto->dtype(), DT_FLOAT);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/transforms/optimize.cc

      RankedTensorType ty = mlir::RankedTensorType::get(
          {static_cast<int32_t>(values.size())}, builder->getIntegerType(32));
      return DenseIntElementsAttr::get(ty, values);
    }
    
    DenseIntElementsAttr GetI64ElementsAttr(ArrayRef<int64_t> values,
                                            Builder *builder) {
      RankedTensorType ty = RankedTensorType::get(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 00:40:15 UTC 2024
    - 102.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/stablehlo/transforms/composite_avg_pool.cc

      const int64_t w = pool.w_in + padding_values[2] + padding_values[3];
      llvm::SmallVector<int64_t> shape = {pool.n, h, w, pool.c};
    
      auto op_type = mlir::cast<RankedTensorType>(op->getResult(0).getType());
      return RankedTensorType::get(shape, op_type.getElementType());
    }
    
    StringAttr GetAvgPoolOpPadAttr(Builder& builder, CompositeOp op) {
      const TorchAvgPoolData pool = GetTorchAvgPoolData(op);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 23:16:05 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_n_z.cc

    }
    
    void ShapeOp::build(OpBuilder &builder, OperationState &result, Value input,
                        BoolAttr use32Bit) {
      auto rankedTensorType = input.getType().dyn_cast<RankedTensorType>();
      int64_t rank = rankedTensorType ? rankedTensorType.getRank() : -1;
      auto out_type = use32Bit.getValue() ? builder.getIntegerType(32)
                                          : builder.getIntegerType(64);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 22:07:10 UTC 2024
    - 170.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/batchmatmul_to_einsum.cc

        Value input_lhs = op.getX();
        Value input_rhs = op.getY();
    
        // LHS and RHS must be a ranked tensor type
        auto lhs_type = mlir::dyn_cast<RankedTensorType>(input_lhs.getType());
        auto rhs_type = mlir::dyn_cast<RankedTensorType>(input_rhs.getType());
    
        if (!lhs_type || !rhs_type) return failure();
    
        auto lhs_shape = lhs_type.getShape();
        auto rhs_shape = rhs_type.getShape();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tf2xla/transforms/verify_tfxla_legalization.cc

      if (mlir::isa<UnrankedTensorType>(type)) {
        return false;
      }
      if (mlir::isa<RankedTensorType>(type)) {
        auto ranked_tensor = mlir::dyn_cast<RankedTensorType>(type);
        if (ranked_tensor.hasStaticShape()) {
          return true;
        }
        return HasBounds(ranked_tensor);
      }
      return true;
    }
    
    bool EmitMustBeConstantError(Operation* op) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.1K bytes
    - Viewed (0)
Back to top