SWDEV-518962 - Match hipCtxGetApiVersion signature with Cuda (#327)

[ROCm/clr commit: ee2d4a0358]
This commit is contained in:
Brzak, Branislav
2025-05-26 16:58:22 +02:00
committed by GitHub
parent 436c25aa47
commit d17388cd6b
5 changed files with 8 additions and 8 deletions
@@ -127,7 +127,7 @@ typedef hipError_t (*t_hipCtxCreate)(hipCtx_t* ctx, unsigned int flags, hipDevic
typedef hipError_t (*t_hipCtxDestroy)(hipCtx_t ctx);
typedef hipError_t (*t_hipCtxDisablePeerAccess)(hipCtx_t peerCtx);
typedef hipError_t (*t_hipCtxEnablePeerAccess)(hipCtx_t peerCtx, unsigned int flags);
typedef hipError_t (*t_hipCtxGetApiVersion)(hipCtx_t ctx, int* apiVersion);
typedef hipError_t (*t_hipCtxGetApiVersion)(hipCtx_t ctx, unsigned int* apiVersion);
typedef hipError_t (*t_hipCtxGetCacheConfig)(hipFuncCache_t* cacheConfig);
typedef hipError_t (*t_hipCtxGetCurrent)(hipCtx_t* ctx);
typedef hipError_t (*t_hipCtxGetDevice)(hipDevice_t* device);
@@ -1400,8 +1400,8 @@ typedef struct hip_api_data_s {
} hipCtxEnablePeerAccess;
struct {
hipCtx_t ctx;
int* apiVersion;
int apiVersion__val;
unsigned int* apiVersion;
unsigned int apiVersion__val;
} hipCtxGetApiVersion;
struct {
hipFuncCache_t* cacheConfig;
@@ -3843,10 +3843,10 @@ typedef struct hip_api_data_s {
cb_data.args.hipCtxEnablePeerAccess.peerCtx = (hipCtx_t)peerCtx; \
cb_data.args.hipCtxEnablePeerAccess.flags = (unsigned int)flags; \
};
// hipCtxGetApiVersion[('hipCtx_t', 'ctx'), ('int*', 'apiVersion')]
// hipCtxGetApiVersion[('hipCtx_t', 'ctx'), ('unsigned int*', 'apiVersion')]
#define INIT_hipCtxGetApiVersion_CB_ARGS_DATA(cb_data) { \
cb_data.args.hipCtxGetApiVersion.ctx = (hipCtx_t)ctx; \
cb_data.args.hipCtxGetApiVersion.apiVersion = (int*)apiVersion; \
cb_data.args.hipCtxGetApiVersion.apiVersion = (unsigned int*)apiVersion; \
};
// hipCtxGetCacheConfig[('hipFuncCache_t*', 'cacheConfig')]
#define INIT_hipCtxGetCacheConfig_CB_ARGS_DATA(cb_data) { \
+1 -1
View File
@@ -88,7 +88,7 @@ hipError_t hipCtxCreate(hipCtx_t* ctx, unsigned int flags, hipDevice_t device);
hipError_t hipCtxDestroy(hipCtx_t ctx);
hipError_t hipCtxDisablePeerAccess(hipCtx_t peerCtx);
hipError_t hipCtxEnablePeerAccess(hipCtx_t peerCtx, unsigned int flags);
hipError_t hipCtxGetApiVersion(hipCtx_t ctx, int* apiVersion);
hipError_t hipCtxGetApiVersion(hipCtx_t ctx, unsigned int* apiVersion);
hipError_t hipCtxGetCacheConfig(hipFuncCache_t* cacheConfig);
hipError_t hipCtxGetCurrent(hipCtx_t* ctx);
hipError_t hipCtxGetDevice(hipDevice_t* device);
+1 -1
View File
@@ -317,7 +317,7 @@ hipError_t hipCtxGetDevice(hipDevice_t* device) {
HIP_RETURN(hipErrorInvalidContext);
}
hipError_t hipCtxGetApiVersion(hipCtx_t ctx, int* apiVersion) {
hipError_t hipCtxGetApiVersion(hipCtx_t ctx, unsigned int* apiVersion) {
HIP_INIT_API(hipCtxGetApiVersion, apiVersion);
HIP_RETURN(hipErrorNotSupported);
}
@@ -144,7 +144,7 @@ hipError_t hipCtxDisablePeerAccess(hipCtx_t peerCtx) {
hipError_t hipCtxEnablePeerAccess(hipCtx_t peerCtx, unsigned int flags) {
return hip::GetHipDispatchTable()->hipCtxEnablePeerAccess_fn(peerCtx, flags);
}
hipError_t hipCtxGetApiVersion(hipCtx_t ctx, int* apiVersion) {
hipError_t hipCtxGetApiVersion(hipCtx_t ctx, unsigned int* apiVersion) {
return hip::GetHipDispatchTable()->hipCtxGetApiVersion_fn(ctx, apiVersion);
}
hipError_t hipCtxGetCacheConfig(hipFuncCache_t* cacheConfig) {