Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 133 for ShapedType (0.17 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. tensorflow/compiler/mlir/tensorflow/transforms/rewrite_util.h

    }
    
    // Returns true if `value` is compile-time constant and its splat value equals
    // to `raw_value`.
    template <typename T>
    bool IsConstantValueOf(Value value, T raw_value) {
      auto element_type = mlir::cast<ShapedType>(value.getType()).getElementType();
      if (mlir::isa<FloatType>(element_type)) {
        DenseFPElementsAttr float_attr;
        if (matchPattern(value, m_Constant(&float_attr)) && float_attr.isSplat() &&
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 22 19:47:48 UTC 2024
    - 4K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/unroll_batch_matmul.cc

      }
    
      // Input dimensions must be defined. MatMulBCast does not support partial
      // shapes.
      for (auto dim : lhs_shape) {
        if (dim == mlir::ShapedType::kDynamic) {
          return failure();
        }
      }
      for (auto dim : rhs_shape) {
        if (dim == mlir::ShapedType::kDynamic) {
          return failure();
        }
      }
      // Ensure that batch shapes are broadcastable.
      tensorflow::MatMulBCast bcast(
    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