SWDEV-320901 - Added HIP_INIT_API_NO_RETURN

Change-Id: Ic79acc21f6a92fcb24527d4f121ae96b13192f75
This commit is contained in:
Sarbojit Sarkar
2022-01-31 11:33:18 +00:00
committad av Sarbojit Sarkar
förälder a01b481e45
incheckning 3e2cc04da5
2 ändrade filer med 6 tillägg och 2 borttagningar
+2 -2
Visa fil
@@ -196,7 +196,7 @@ hipError_t hipCtxGetSharedMemConfig(hipSharedMemConfig* pConfig) {
}
hipError_t hipRuntimeGetVersion(int *runtimeVersion) {
HIP_INIT_API(hipRuntimeGetVersion, runtimeVersion);
HIP_INIT_API_NO_RETURN(hipRuntimeGetVersion, runtimeVersion);
if (!runtimeVersion) {
HIP_RETURN(hipErrorInvalidValue);
@@ -264,7 +264,7 @@ hipError_t hipCtxPushCurrent(hipCtx_t ctx) {
}
hipError_t hipDriverGetVersion(int* driverVersion) {
HIP_INIT_API(hipDriverGetVersion, driverVersion);
HIP_INIT_API_NO_RETURN(hipDriverGetVersion, driverVersion);
if (!driverVersion) {
HIP_RETURN(hipErrorInvalidValue);
+4
Visa fil
@@ -108,6 +108,10 @@ static amd::Monitor g_hipInitlock{"hipInit lock"};
ClPrint(amd::LOG_INFO, amd::LOG_API, "%s: Returned %s : %s", \
__func__, ihipGetErrorName(err), ToString( __VA_ARGS__ ).c_str());
#define HIP_INIT_API_NO_RETURN(cid, ...) \
HIP_API_PRINT(__VA_ARGS__) \
HIP_INIT_VOID()
// This macro should be called at the beginning of every HIP API.
#define HIP_INIT_API(cid, ...) \
HIP_API_PRINT(__VA_ARGS__) \