Finish adding start/stop event support to hipHccModuleLaunchKernel.
Change interface to use hipEvent_t rather than hipEvent_t* Change-Id: I259062dc087a13d51dc27f84e1e8861f332a104d
This commit is contained in:
@@ -604,6 +604,7 @@ public:
|
||||
void attachToCompletionFuture(const hc::completion_future *cf, ihipEventType_t eventType);
|
||||
void setTimestamp();
|
||||
uint64_t timestamp() const { return _timestamp; } ;
|
||||
ihipEventType_t type() const { return _type; };
|
||||
|
||||
public:
|
||||
hipEventStatus_t _state;
|
||||
|
||||
@@ -368,7 +368,7 @@ hipError_t ihipModuleLaunchKernel(hipFunction_t f,
|
||||
uint32_t localWorkSizeX, uint32_t localWorkSizeY, uint32_t localWorkSizeZ,
|
||||
size_t sharedMemBytes, hipStream_t hStream,
|
||||
void **kernelParams, void **extra,
|
||||
hipEvent_t *startEvent, hipEvent_t *stopEvent)
|
||||
hipEvent_t startEvent, hipEvent_t stopEvent)
|
||||
{
|
||||
|
||||
auto ctx = ihipGetTlsDefaultCtx();
|
||||
@@ -455,10 +455,10 @@ hipError_t ihipModuleLaunchKernel(hipFunction_t f,
|
||||
|
||||
|
||||
if (startEvent) {
|
||||
(*startEvent)->attachToCompletionFuture(&cf, hipEventTypeStartCommand);
|
||||
startEvent->attachToCompletionFuture(&cf, hipEventTypeStartCommand);
|
||||
}
|
||||
if (stopEvent) {
|
||||
(*stopEvent)->attachToCompletionFuture (&cf, hipEventTypeStopCommand);
|
||||
stopEvent->attachToCompletionFuture (&cf, hipEventTypeStopCommand);
|
||||
}
|
||||
|
||||
|
||||
@@ -494,7 +494,7 @@ hipError_t hipHccModuleLaunchKernel(hipFunction_t f,
|
||||
uint32_t localWorkSizeX, uint32_t localWorkSizeY, uint32_t localWorkSizeZ,
|
||||
size_t sharedMemBytes, hipStream_t hStream,
|
||||
void **kernelParams, void **extra,
|
||||
hipEvent_t *startEvent, hipEvent_t *stopEvent)
|
||||
hipEvent_t startEvent, hipEvent_t stopEvent)
|
||||
{
|
||||
HIP_INIT_API(f, globalWorkSizeX, globalWorkSizeY, globalWorkSizeZ,
|
||||
localWorkSizeX, localWorkSizeY, localWorkSizeZ,
|
||||
|
||||
مرجع در شماره جدید
Block a user