SWDEV-546285 - add hipGetDriverEntryPoint (#855)
[ROCm/clr commit: 789e2029ca]
Cette révision appartient à :
@@ -82,6 +82,9 @@ THE SOFTWARE.
|
||||
#define hipStreamIsCapturing __HIP_API_SPT(hipStreamIsCapturing)
|
||||
#define hipStreamGetCaptureInfo __HIP_API_SPT(hipStreamGetCaptureInfo)
|
||||
#define hipStreamGetCaptureInfo_v2 __HIP_API_SPT(hipStreamGetCaptureInfo_v2)
|
||||
|
||||
// Driver Entry Point API
|
||||
#define hipGetDriverEntryPoint __HIP_API_SPT(hipGetDriverEntryPoint)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -192,6 +195,8 @@ hipError_t hipStreamGetCaptureInfo_v2_spt(hipStream_t stream, hipStreamCaptureSt
|
||||
const hipGraphNode_t** dependencies_out,
|
||||
size_t* numDependencies_out);
|
||||
hipError_t hipLaunchHostFunc_spt(hipStream_t stream, hipHostFn_t fn, void* userData);
|
||||
hipError_t hipGetDriverEntryPoint_spt(const char* symbol, void** funcPtr, unsigned long long flags,
|
||||
hipDriverEntryPointQueryResult* status);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -1073,6 +1073,13 @@ typedef hipError_t (*t_hipMemcpy3DBatchAsync) (size_t numOps, struct hipMemcpy3D
|
||||
typedef hipError_t (*t_hipMemcpy3DPeer) (hipMemcpy3DPeerParms *p);
|
||||
typedef hipError_t (*t_hipMemcpy3DPeerAsync) (hipMemcpy3DPeerParms *p, hipStream_t stream);
|
||||
|
||||
typedef hipError_t (*t_hipGetDriverEntryPoint)(const char* symbol, void** funcPtr,
|
||||
unsigned long long flags,
|
||||
hipDriverEntryPointQueryResult* status);
|
||||
typedef hipError_t (*t_hipGetDriverEntryPoint_spt)(const char* symbol, void** funcPtr,
|
||||
unsigned long long flags,
|
||||
hipDriverEntryPointQueryResult* status);
|
||||
|
||||
// HIP Compiler dispatch table
|
||||
struct HipCompilerDispatchTable {
|
||||
// HIP_COMPILER_API_TABLE_STEP_VERSION == 0
|
||||
@@ -1629,6 +1636,8 @@ struct HipDispatchTable {
|
||||
t_hipMemcpy3DBatchAsync hipMemcpy3DBatchAsync_fn;
|
||||
t_hipMemcpy3DPeer hipMemcpy3DPeer_fn;
|
||||
t_hipMemcpy3DPeerAsync hipMemcpy3DPeerAsync_fn;
|
||||
t_hipGetDriverEntryPoint hipGetDriverEntryPoint_fn;
|
||||
t_hipGetDriverEntryPoint_spt hipGetDriverEntryPoint_spt_fn;
|
||||
|
||||
// HIP_RUNTIME_API_TABLE_STEP_VERSION = 14
|
||||
// removed HIP_MEMSET_NODE_PARAMS replaced by hipMemsetParams
|
||||
|
||||
@@ -452,7 +452,8 @@ enum hip_api_id_t {
|
||||
HIP_API_ID_hipMemcpy3DPeer = 432,
|
||||
HIP_API_ID_hipMemcpy3DPeerAsync = 433,
|
||||
HIP_API_ID_hipMemcpyBatchAsync = 434,
|
||||
HIP_API_ID_LAST = 434,
|
||||
HIP_API_ID_hipGetDriverEntryPoint = 435,
|
||||
HIP_API_ID_LAST = 435,
|
||||
|
||||
HIP_API_ID_hipChooseDevice = HIP_API_ID_CONCAT(HIP_API_ID_,hipChooseDevice),
|
||||
HIP_API_ID_hipGetDeviceProperties = HIP_API_ID_CONCAT(HIP_API_ID_,hipGetDeviceProperties),
|
||||
@@ -465,6 +466,7 @@ enum hip_api_id_t {
|
||||
HIP_API_ID_hipDestroyTextureObject = HIP_API_ID_NONE,
|
||||
HIP_API_ID_hipDeviceGetCount = HIP_API_ID_NONE,
|
||||
HIP_API_ID_hipDeviceGetTexture1DLinearMaxWidth = HIP_API_ID_NONE,
|
||||
HIP_API_ID_hipGetDriverEntryPoint_spt = HIP_API_ID_NONE,
|
||||
HIP_API_ID_hipGetTextureAlignmentOffset = HIP_API_ID_NONE,
|
||||
HIP_API_ID_hipGetTextureObjectResourceDesc = HIP_API_ID_NONE,
|
||||
HIP_API_ID_hipGetTextureObjectResourceViewDesc = HIP_API_ID_NONE,
|
||||
@@ -602,6 +604,7 @@ static inline const char* hip_api_name(const uint32_t id) {
|
||||
case HIP_API_ID_hipGetDeviceFlags: return "hipGetDeviceFlags";
|
||||
case HIP_API_ID_hipGetDevicePropertiesR0000: return "hipGetDevicePropertiesR0000";
|
||||
case HIP_API_ID_hipGetDevicePropertiesR0600: return "hipGetDevicePropertiesR0600";
|
||||
case HIP_API_ID_hipGetDriverEntryPoint: return "hipGetDriverEntryPoint";
|
||||
case HIP_API_ID_hipGetErrorString: return "hipGetErrorString";
|
||||
case HIP_API_ID_hipGetFuncBySymbol: return "hipGetFuncBySymbol";
|
||||
case HIP_API_ID_hipGetLastError: return "hipGetLastError";
|
||||
@@ -1031,6 +1034,7 @@ static inline uint32_t hipApiIdByName(const char* name) {
|
||||
if (strcmp("hipGetDeviceFlags", name) == 0) return HIP_API_ID_hipGetDeviceFlags;
|
||||
if (strcmp("hipGetDevicePropertiesR0000", name) == 0) return HIP_API_ID_hipGetDevicePropertiesR0000;
|
||||
if (strcmp("hipGetDevicePropertiesR0600", name) == 0) return HIP_API_ID_hipGetDevicePropertiesR0600;
|
||||
if (strcmp("hipGetDriverEntryPoint", name) == 0) return HIP_API_ID_hipGetDriverEntryPoint;
|
||||
if (strcmp("hipGetErrorString", name) == 0) return HIP_API_ID_hipGetErrorString;
|
||||
if (strcmp("hipGetFuncBySymbol", name) == 0) return HIP_API_ID_hipGetFuncBySymbol;
|
||||
if (strcmp("hipGetLastError", name) == 0) return HIP_API_ID_hipGetLastError;
|
||||
@@ -1908,6 +1912,15 @@ typedef struct hip_api_data_s {
|
||||
hipDeviceProp_tR0600 prop__val;
|
||||
int deviceId;
|
||||
} hipGetDevicePropertiesR0600;
|
||||
struct {
|
||||
const char* symbol;
|
||||
char symbol__val;
|
||||
void** funcPtr;
|
||||
void* funcPtr__val;
|
||||
unsigned long long flags;
|
||||
hipDriverEntryPointQueryResult* driverStatus;
|
||||
hipDriverEntryPointQueryResult driverStatus__val;
|
||||
} hipGetDriverEntryPoint;
|
||||
struct {
|
||||
hipFunction_t* functionPtr;
|
||||
hipFunction_t functionPtr__val;
|
||||
@@ -4481,6 +4494,13 @@ typedef struct hip_api_data_s {
|
||||
cb_data.args.hipGetDevicePropertiesR0600.prop = (hipDeviceProp_tR0600*)prop; \
|
||||
cb_data.args.hipGetDevicePropertiesR0600.deviceId = (int)device; \
|
||||
};
|
||||
// hipGetDriverEntryPoint[('const char*', 'symbol'), ('void**', 'funcPtr'), ('unsigned long long', 'flags'), ('hipDriverEntryPointQueryResult*', 'driverStatus')]
|
||||
#define INIT_hipGetDriverEntryPoint_CB_ARGS_DATA(cb_data) { \
|
||||
cb_data.args.hipGetDriverEntryPoint.symbol = (symbol) ? strdup(symbol) : NULL; \
|
||||
cb_data.args.hipGetDriverEntryPoint.funcPtr = (void**)funcPtr; \
|
||||
cb_data.args.hipGetDriverEntryPoint.flags = (unsigned long long)flags; \
|
||||
cb_data.args.hipGetDriverEntryPoint.driverStatus = (hipDriverEntryPointQueryResult*)status; \
|
||||
};
|
||||
// hipGetErrorString[]
|
||||
#define INIT_hipGetErrorString_CB_ARGS_DATA(cb_data) { \
|
||||
};
|
||||
@@ -6496,6 +6516,8 @@ typedef struct hip_api_data_s {
|
||||
#define INIT_hipDeviceGetCount_CB_ARGS_DATA(cb_data) {};
|
||||
// hipDeviceGetTexture1DLinearMaxWidth()
|
||||
#define INIT_hipDeviceGetTexture1DLinearMaxWidth_CB_ARGS_DATA(cb_data) {};
|
||||
// hipGetDriverEntryPoint_spt()
|
||||
#define INIT_hipGetDriverEntryPoint_spt_CB_ARGS_DATA(cb_data) {};
|
||||
// hipGetTextureAlignmentOffset()
|
||||
#define INIT_hipGetTextureAlignmentOffset_CB_ARGS_DATA(cb_data) {};
|
||||
// hipGetTextureObjectResourceDesc()
|
||||
@@ -6969,6 +6991,12 @@ static inline void hipApiArgsInit(hip_api_id_t id, hip_api_data_t* data) {
|
||||
case HIP_API_ID_hipGetDevicePropertiesR0600:
|
||||
if (data->args.hipGetDevicePropertiesR0600.prop) data->args.hipGetDevicePropertiesR0600.prop__val = *(data->args.hipGetDevicePropertiesR0600.prop);
|
||||
break;
|
||||
// hipGetDriverEntryPoint[('const char*', 'symbol'), ('void**', 'funcPtr'), ('unsigned long long', 'flags'), ('hipDriverEntryPointQueryResult*', 'driverStatus')]
|
||||
case HIP_API_ID_hipGetDriverEntryPoint:
|
||||
if (data->args.hipGetDriverEntryPoint.symbol) data->args.hipGetDriverEntryPoint.symbol__val = *(data->args.hipGetDriverEntryPoint.symbol);
|
||||
if (data->args.hipGetDriverEntryPoint.funcPtr) data->args.hipGetDriverEntryPoint.funcPtr__val = *(data->args.hipGetDriverEntryPoint.funcPtr);
|
||||
if (data->args.hipGetDriverEntryPoint.driverStatus) data->args.hipGetDriverEntryPoint.driverStatus__val = *(data->args.hipGetDriverEntryPoint.driverStatus);
|
||||
break;
|
||||
// hipGetErrorString[]
|
||||
case HIP_API_ID_hipGetErrorString:
|
||||
break;
|
||||
@@ -9002,6 +9030,17 @@ static inline const char* hipApiString(hip_api_id_t id, const hip_api_data_t* da
|
||||
oss << ", deviceId="; roctracer::hip_support::detail::operator<<(oss, data->args.hipGetDevicePropertiesR0600.deviceId);
|
||||
oss << ")";
|
||||
break;
|
||||
case HIP_API_ID_hipGetDriverEntryPoint:
|
||||
oss << "hipGetDriverEntryPoint(";
|
||||
if (data->args.hipGetDriverEntryPoint.symbol == NULL) oss << "symbol=NULL";
|
||||
else { oss << "symbol="; roctracer::hip_support::detail::operator<<(oss, data->args.hipGetDriverEntryPoint.symbol__val); }
|
||||
if (data->args.hipGetDriverEntryPoint.funcPtr == NULL) oss << ", funcPtr=NULL";
|
||||
else { oss << ", funcPtr="; roctracer::hip_support::detail::operator<<(oss, data->args.hipGetDriverEntryPoint.funcPtr__val); }
|
||||
oss << ", flags="; roctracer::hip_support::detail::operator<<(oss, data->args.hipGetDriverEntryPoint.flags);
|
||||
if (data->args.hipGetDriverEntryPoint.driverStatus == NULL) oss << ", driverStatus=NULL";
|
||||
else { oss << ", driverStatus="; roctracer::hip_support::detail::operator<<(oss, data->args.hipGetDriverEntryPoint.driverStatus__val); }
|
||||
oss << ")";
|
||||
break;
|
||||
case HIP_API_ID_hipGetErrorString:
|
||||
oss << "hipGetErrorString(";
|
||||
oss << ")";
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur