Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MIOPEN_BETA_API defines around f8 #2430

Merged
merged 21 commits into from
Oct 11, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion include/miopen/miopen.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,13 @@ typedef enum
miopenStatusVersionMismatch = 10, /*!< Version mismatch of the supplied binary data argment. */
} miopenStatus_t;

#ifdef MIOPEN_BETA_API
typedef enum
{
miopenF8RoundingModeStandard = 0,
miopenF8RoundingModeStochastic = 1,
} miopenF8RoundingMode_t;
#endif

/*! @brief Get character string for an error code.
*
Expand Down Expand Up @@ -355,8 +357,13 @@ typedef enum
miopenBFloat16 = 5, /*!< 16-bit binary floating point (8-bit exponent, 7-bit fraction)
(Partially supported) */
miopenDouble = 6, /*!< 64-bit floating point (Partially supported) */
#ifdef MIOPEN_BETA_API
miopenFloat8 = 7,
miopenBFloat8 = 8
miopenBFloat8 = 8,
#else
miopenReserved1 = 7,
miopenReserved2 = 8,
#endif
cderb marked this conversation as resolved.
Show resolved Hide resolved
} miopenDataType_t;

/*! @ingroup tensor
Expand Down Expand Up @@ -601,11 +608,15 @@ typedef enum
MIOPEN_CONVOLUTION_ATTRIB_DETERMINISTIC =
1, /*!< Restrict MIOpen convolutions to kernels which produce numerically deterministic
results. 0 - disabled (default), 1 - enabled >*/
#ifdef MIOPEN_BETA_API
cderb marked this conversation as resolved.
Show resolved Hide resolved
MIOPEN_CONVOLUTION_ATTRIB_FP8_ROUNDING_MODE =
2, /*!<Specifies the rounding mode for the 8-bit floating data types. Currently, two
rounding modes are supported miopenF8RoundingModeStandard and
miopenF8RoundingModeStochastic. These are listed as part of the miopenF8RoundingMode_t
enum.>*/
#else
miopenReserved = 2,
#endif
} miopenConvolutionAttrib_t;

/** @addtogroup tensor
Expand Down Expand Up @@ -723,6 +734,7 @@ MIOPEN_EXPORT miopenStatus_t miopenSetTensorDescriptor(miopenTensorDescriptor_t
const int* dimsA,
const int* stridesA);

#ifdef MIOPEN_BETA_API
/*! @brief Set the tensor cast type
*
* For tensors where the cast_type attribute is set, the tensor elements would be converted to the
Expand All @@ -734,6 +746,7 @@ MIOPEN_EXPORT miopenStatus_t miopenSetTensorDescriptor(miopenTensorDescriptor_t
*/
MIOPEN_EXPORT miopenStatus_t miopenSetTensorCastType(miopenTensorDescriptor_t tensorDesc,
miopenDataType_t cast_type);
#endif

/*! @brief Set shape of N-dimensional tensor
*
Expand Down