@@ -1944,30 +1944,36 @@ mkldnn_status_t MKLDNN_API mkldnn_sgemm(
19441944 const float * B , mkldnn_dim_t ldb ,
19451945 float beta , float * C , mkldnn_dim_t ldc );
19461946
1947- /// gemm_s8u8s32 and gemm_s8s8s32 perform a matrix-matrix multiplication
1948- /// operation and add the result to a scalar-matrix product. For the final
1949- /// result, a vector is added to each row or column of the output matrix.
1947+ /// mkldnn_gemm_u8s8s32() and mkldnn_gemm_s8s8s32() perform a matrix-matrix
1948+ /// multiplication operation and add the result to a scalar-matrix product.
1949+ /// For the final result, a vector is added to each row or column of the output
1950+ /// matrix.
1951+ ///
19501952/// The operation is defined as:
19511953///
1952- /// C := alpha*(op(A) - A_offset) * (op(B) - B_offset) + beta*C + C_offset
1954+ /// - ` C := alpha*(op(A) - A_offset) * (op(B) - B_offset) + beta*C + C_offset`
19531955///
19541956/// where
1955- /// - op( X ) = X or op( X ) = X**T,
1956- /// - A_offset is an m-by-k matrix with every element equal to the value oa,
1957- /// - B_offset is an k-by-n matrix with every element equal to the value ob,
1958- /// - C_offset is an m-by-n matrix defined by the oc array, size len:
1959- /// - if offsetc = F: len must be at least 1
1960- /// - if offsetc = C: len must be at least max(1, m)
1961- /// - if offsetc = R: len must be at least max(1, n)
1962- /// - alpha and beta are scalars, and A, B and C are matrices, with op( A )
1963- /// an m-by-k matrix, op( B ) a k-by-n matrix and C an m-by-n matrix.
1964- ///
1965- /// The matrices are assumed to be stored in column-major order (the elements
1966- /// in a matrix columns are contiguous in memory).
1957+ /// - `op( X ) = X` or `op( X ) = X**T`,
1958+ /// - `A_offset` is an m-by-k matrix with every element
1959+ /// equal to the value `ao`,
1960+ /// - `B_offset` is an k-by-n matrix with every element
1961+ /// equal to the value `bo`,
1962+ /// - `C_offset` is an m-by-n matrix defined by the `co` array of size `len`:
1963+ /// - if `offsetc = F`: `len` must be at least `1`,
1964+ /// - if `offsetc = C`: `len` must be at least `max(1, m)`,
1965+ /// - if `offsetc = R`: `len` must be at least `max(1, n)`,
1966+ /// - `alpha` and `beta` are scalars, and
1967+ /// - `A`, `B` and `C` are matrices, with `op( A )` an m-by-k matrix,
1968+ /// `op( B )` a k-by-n matrix and `C` an m-by-n matrix.
1969+ ///
1970+ /// The matrices are assumed to be stored in row-major order (the elements
1971+ /// in a matrix rows are contiguous in memory).
19671972///
19681973/// @note
1969- /// The API is different compared with the standard BLAS routine
1970- /// because it returns mkldnn_status_t for error handling.
1974+ /// The API is different compared with the standard BLAS routine.
1975+ /// In particular, the function returns @ref mkldnn_status_t for
1976+ /// error handling.
19711977/// XERBLA is not supported: no error message will be printed
19721978/// in case of incorrect parameters.
19731979///
@@ -1983,13 +1989,17 @@ mkldnn_status_t MKLDNN_API mkldnn_gemm_u8s8s32(
19831989 const int8_t * B , mkldnn_dim_t ldb , int8_t bo ,
19841990 float beta , int32_t * C , mkldnn_dim_t ldc , const int32_t * co );
19851991
1986- /// gemm_s8u8s32 and gemm_s8s8s32 perform a matrix-matrix multiplication
1987- /// operation and add the result to a scalar-matrix product. For the final
1988- /// result, a vector is added to each row or column of the output matrix.
1992+ /// mkldnn_gemm_u8s8s32() and mkldnn_gemm_s8s8s32() perform a matrix-matrix
1993+ /// multiplication operation and add the result to a scalar-matrix product.
1994+ /// For the final result, a vector is added to each row or column of the output
1995+ /// matrix.
19891996///
19901997/// For full description, see mkldnn_gemm_u8s8s32().
19911998///
1992- /// @sa dev_guide_int8_computations
1999+ /// @warning
2000+ /// On some architectures the intermediate saturation might happen,
2001+ /// which would lead to unexpected results. For more details, refer to
2002+ /// @ref dev_guide_int8_computations.
19932003mkldnn_status_t MKLDNN_API mkldnn_gemm_s8s8s32 (
19942004 char transa , char transb , char offsetc ,
19952005 mkldnn_dim_t M , mkldnn_dim_t N , mkldnn_dim_t K ,
0 commit comments