SWDEV-1 - Rearrange error conditions in elapsed time
- when the first argument is null API should return hipErrorInvalidValue - but when first and second argument both are null API was returning hipErrorInvalidHandle causing catch2 event tests to fail Change-Id: I0978ce8b8462e4baa043be75a40b5bc45b036bb6
This commit is contained in:
@@ -259,14 +259,14 @@ hipError_t hipEventDestroy(hipEvent_t event) {
|
||||
hipError_t hipEventElapsedTime(float *ms, hipEvent_t start, hipEvent_t stop) {
|
||||
HIP_INIT_API(hipEventElapsedTime, ms, start, stop);
|
||||
|
||||
if (start == nullptr || stop == nullptr) {
|
||||
HIP_RETURN(hipErrorInvalidHandle);
|
||||
}
|
||||
|
||||
if (ms == nullptr) {
|
||||
HIP_RETURN(hipErrorInvalidValue);
|
||||
}
|
||||
|
||||
if (start == nullptr || stop == nullptr) {
|
||||
HIP_RETURN(hipErrorInvalidHandle);
|
||||
}
|
||||
|
||||
hip::Event* eStart = reinterpret_cast<hip::Event*>(start);
|
||||
hip::Event* eStop = reinterpret_cast<hip::Event*>(stop);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user