diff --git a/projects/hip/tests/src/runtimeApi/module/hipExtModuleLaunchKernel.cpp b/projects/hip/tests/src/runtimeApi/module/hipExtModuleLaunchKernel.cpp index 9a6719d392..c040d7320c 100755 --- a/projects/hip/tests/src/runtimeApi/module/hipExtModuleLaunchKernel.cpp +++ b/projects/hip/tests/src/runtimeApi/module/hipExtModuleLaunchKernel.cpp @@ -1,5 +1,5 @@ /* -Copyright (c) 2019-Present Advanced Micro Devices, Inc. All rights reserved. +Copyright (c) 2019 -> Present Advanced Micro Devices, Inc. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights @@ -34,14 +34,6 @@ using namespace std::chrono; #define kernel_name1 "matmulK" #define kernel_name2 "WaitKernel" -//hipDeviceReset() call is used to clear all the allocations in case of any api failure. -#define HIP_CHECK(status) \ - if (status != hipSuccess) { \ - std::cout << "Got Status: " << hipGetErrorString(status) << " at Line: " << __LINE__ << std::endl; \ - hipDeviceReset(); \ - exit(0); \ - } - int main() { @@ -55,32 +47,32 @@ int *C; hipDeviceptr_t *Ad,*Bd; for(int i=0;i(stop-start); start=high_resolution_clock::now(); -HIP_CHECK(hipExtModuleLaunchKernel(Function2, 1,1, 1, 1,1 ,1 , 0, stream1, NULL, (void**)&config2, NULL, NULL,1 )); -HIP_CHECK(hipExtModuleLaunchKernel(Function1, N,N, 1, 32,32 ,1 , 0, stream1, NULL, (void**)&config1, NULL, NULL,1 )); -HIP_CHECK(hipStreamSynchronize(stream1)); +HIPCHECK(hipExtModuleLaunchKernel(Function2, 1,1, 1, 1,1 ,1 , 0, stream1, NULL, (void**)&config2, NULL, NULL,1 )); +HIPCHECK(hipExtModuleLaunchKernel(Function1, N,N, 1, 32,32 ,1 , 0, stream1, NULL, (void**)&config1, NULL, NULL,1 )); +HIPCHECK(hipStreamSynchronize(stream1)); stop=high_resolution_clock::now(); auto duration2=duration_cast(stop-start); bool TEST_STATUS = true; -if(! (duration2.count() < duration1.count())){ +if(! (duration2.count() < duration1.count())) { std::cout<<"Test failed as there was no time gain observed when two kernels were launched using hipExtModuleLaunchKernel() with flag 1."<