Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 123 for ShapedType (0.18 sec)

  1. tensorflow/compiler/mlir/lite/ir/tfl_ops.td

              CPred<"$_op.getOperand(0).getType().cast<ShapedType>().getRank() <= 1">,
              CPred<"$_op.getOperand(0).getType().cast<ShapedType>().getRank() == 2 && !$_op.getOperand(0).getType().cast<ShapedType>().hasStaticShape()">,
              CPred<"$_op.getOperand(0).getType().cast<ShapedType>().getRank() == 2 && $_op.getOperand(0).getType().cast<ShapedType>().getShape()[1] <= 4">]>>]> {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 06 19:09:08 UTC 2024
    - 186K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/utils/lstm_utils_test.cc

              .isExactlyValue(0.0f));
    
      EXPECT_EQ(fused_lstm_func_.getFunctionType().getNumResults(), 1);
      auto output_types = fused_lstm_func_.getFunctionType().getResults();
      SmallVector<int64_t, 2> output_shape{1, mlir::ShapedType::kDynamic};
      EXPECT_EQ(mlir::cast<RankedTensorType>(output_types[0]).getShape().size(),
                output_shape.size());
      for (int i = 0; i < output_shape.size(); i++) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/transforms/post_quantize.cc

          return failure();
        }
    
        // Remove identity reshape with both static result and input shape.
        auto result_type = mlir::cast<ShapedType>(op.getType());
        auto input_type = mlir::cast<ShapedType>(op.getInput().getType());
    
        // Constant folding
        // If the result type isn't static, tries to derive the result type from
        // the #2 operand.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/transforms/legalize_variables.cc

    // not.
    const char kLegalizeTflVariables[] = "tfl._legalize_tfl_variables";
    
    bool HasSupportedElementType(Operation* op) {
      return utils::IsSupportedVariableType(op);
    }
    
    bool IsSupportedElementType(ShapedType type) {
      return utils::IsSupportedVariableType(type);
    }
    
    #include "tensorflow/compiler/mlir/lite/transforms/generated_legalize_variables.inc"
    
    // Pass which legalizes TF variables which are already passed as bounded
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_ops_to_mhlo.cc

        const xla::ConvolutionDimensionNumbers &dnums, PatternRewriter &rewriter) {
      StringAttr conv_padding = op.getPaddingAttr();
      SmallVector<int64_t> padding_nums;
      ShapedType lhs_shape = mlir::cast<ShapedType>(op.getLhs().getType());
      ShapedType rhs_shape = mlir::cast<ShapedType>(op.getRhs().getType());
    
      // Handle only static shape cases.
      // TODO(b/260284866): Handle dynamic shape cases.
      if (!lhs_shape.hasStaticShape()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 30.9K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/stablehlo/transforms/composite_utils.h

    // returns the return type of the tfl.average_pool_2d emitted. Note that the
    // aten.avg_pool2d works with the NCHW layout while tfl.average_pool_2d assumes
    // NHWC.
    ShapedType GetNhwcReturnTypeFromNchw(Operation* old_op);
    
    }  // namespace odml
    
    }  // namespace mlir
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 29 18:33:05 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/quantization/import_quant_stats_pass.cc

        if (index < 0 || index >= static_cast<int>(op->getNumResults()))
          return false;
        Value res = op->getResult(index);
        return res.getType().isa<ShapedType>() &&
               res.getType().cast<ShapedType>().getElementType().isa<FloatType>();
      }
    
      // A method to retrieve the name for the given op.
      OperationToName op_to_name_;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 08 10:41:08 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/experimental/tac/common/utils.h

    // or if 'op' is null.
    bool NotTFLQuantDequantizeOp(Operation* op);
    
    // Returns true if it is a shaped type of f32 elements.
    inline bool IsF32ShapedType(Type t) {
      if (auto shaped_type = mlir::dyn_cast_or_null<ShapedType>(t)) {
        return shaped_type.getElementType().isF32();
      }
      return false;
    }
    
    // Return true when the given element_type is QI8.
    inline bool IsQI8Type(Type t) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.cc

                     std::back_inserter(real_values), [&](APFloat value) -> float {
                       return value.convertToFloat();
                     });
      const ShapedType new_dense_type = dyn_cast_or_null<ShapedType>(
          q_type.castExpressedToStorageType(real_values_attr.getType()));
      const int width = dyn_cast<IntegerType>(q_type.getStorageType()).getWidth();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 02:10:16 UTC 2024
    - 43.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf.cc

        // Slice each row of `i` and `v` to perform a separate dynamic-update-slice
        // on the contents of `x`.
        auto input_type = mlir::cast<ShapedType>(input.getType());
        auto updates_type = mlir::cast<ShapedType>(updates.getType());
        auto indices_type = mlir::cast<ShapedType>(indices.getType());
        if (!input_type.hasRank()) return failure();
        if (!updates_type.hasRank() || updates_type.isDynamicDim(0))
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 20:00:43 UTC 2024
    - 291.8K bytes
    - Viewed (0)
Back to top