Skip to content

Commit

Permalink
Add latest rocblas api flag (SWDEV-275854) (#805)
Browse files Browse the repository at this point in the history
  • Loading branch information
ce1adon authored Mar 18, 2021
1 parent bdd81a2 commit 599ffde
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions src/gemm_v2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@
/// "disabled expansion of recursive macro" injected by rocblas headers.
#define AVOID_ROCBLAS_WRAPPERS_204 (MIOPEN_ROCBLAS_VERSION_DECIMAL >= 204)

/// Maintain API compatibility with various rocBLAS version
#define USE_GEMM_FLAGS_PACK_INT8X4 (MIOPEN_ROCBLAS_VERSION_DECIMAL >= 238)

template <class... Ts>
auto miopen_rocblas_gemm_ex(Ts... xs)
{
Expand Down Expand Up @@ -429,7 +432,12 @@ miopenStatus_t CallGemm(const Handle& handle,
rocblas_datatype::rocblas_datatype_i32_r,
rocblas_gemm_algo::rocblas_gemm_algo_standard,
0,
0);
#if USE_GEMM_FLAGS_PACK_INT8X4
rocblas_gemm_flags_pack_int8x4
#else
0
#endif
);
}
break;
case miopenInt32: break;
Expand Down Expand Up @@ -731,7 +739,12 @@ miopenStatus_t CallGemmStridedBatched(const Handle& handle,
rocblas_datatype::rocblas_datatype_i32_r,
rocblas_gemm_algo::rocblas_gemm_algo_standard,
0,
0);
#if USE_GEMM_FLAGS_PACK_INT8X4
rocblas_gemm_flags_pack_int8x4
#else
0
#endif
);
}
break;
case miopenInt32: break;
Expand Down Expand Up @@ -971,7 +984,12 @@ miopenStatus_t CallGemmStridedBatchedSequential(const Handle& handle,
rocblas_datatype::rocblas_datatype_i32_r,
rocblas_gemm_algo::rocblas_gemm_algo_standard,
0,
0);
#if USE_GEMM_FLAGS_PACK_INT8X4
rocblas_gemm_flags_pack_int8x4
#else
0
#endif
);
}
}
break;
Expand Down

0 comments on commit 599ffde

Please sign in to comment.