SWDEV-283930 - Fix bugs in HIP Tests on Windows
Windows doesn't have headers unistd.h, sys/wait.h, so remove them for _WIN64. Also, Windows doesn't have rand_r so define it. Fixes builds for HIP tests: d2dMemCpyWithPinnedHostMemory, hipMemset3DFunctional, hipModuleLoadMultProcessOnMultGPU, hipModuleLoadUnloadStress, hipModuleNegative, hipStreamACb_ThrdBehaviour, hipMemcpyNegativeMThrdMSize, hipStreamACb_MStrm_Mgpu, StreamAddCallback, hipStreamACb_StrmSyncTiming, hipStreamACb_MultiCalls, hipMallocConcurrency, hipMemset3DRegressMultiThread, and hipSetGetDevice. Change-Id: Id2f98d664716026c590d879e464ba467d4c071be
This commit is contained in:
1 parent
9c07201c6b
commit
9edd31100d
12 files changed
+38
-7
No files matched your search
@@ -40,8 +40,10 @@
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
#ifdef __linux__
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include "test_common.h"
|
||||
|
||||
int sequence_num = 0;
|
||||
@@ -275,7 +277,7 @@ bool testValidDevices(int numDevices, bool useRocrEnv, int *deviceList,
|
||||
testResult = false;
|
||||
}
|
||||
#else
|
||||
printf("skipping testcase for non unix system \n)";
|
||||
printf("skipping testcase for non unix system \n");
|
||||
#endif
|
||||
return testResult;
|
||||
}
|
||||
@@ -365,7 +367,7 @@ bool testMaxRvdMinHvd(int numDevices, int *deviceList, int count) {
|
||||
testResult = false;
|
||||
}
|
||||
#else
|
||||
printf("skipping testcase for non unix system \n)";
|
||||
printf("skipping testcase for non unix system \n");
|
||||
#endif
|
||||
return testResult;
|
||||
}
|
||||
@@ -409,7 +411,7 @@ bool testRvdCvd(int numDevices, int *deviceList, int count) {
|
||||
testResult = false;
|
||||
}
|
||||
#else
|
||||
printf("skipping testcase for non unix system \n)";
|
||||
printf("skipping testcase for non unix system \n");
|
||||
#endif
|
||||
return testResult;
|
||||
}
|
||||
@@ -457,7 +459,7 @@ bool testMinRvdMaxHvd(int numDevices, int *deviceList, int count) {
|
||||
testResult = false;
|
||||
}
|
||||
#else
|
||||
printf("skipping testcase for non unix system \n)";
|
||||
printf("skipping testcase for non unix system \n");
|
||||
#endif
|
||||
return testResult;
|
||||
}
|
||||
@@ -540,7 +542,7 @@ bool testDeviceListSequence(int numDevices, bool useRocrEnv,
|
||||
testResult = false;
|
||||
}
|
||||
#else
|
||||
printf("skipping testcase for non unix system \n)";
|
||||
printf("skipping testcase for non unix system \n");
|
||||
#endif
|
||||
return testResult;
|
||||
}
|
||||
|
||||
@@ -69,9 +69,10 @@ Testcase Scenarios :
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifdef __linux__
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#endif
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <limits>
|
||||
|
||||
@@ -31,7 +31,9 @@ THE SOFTWARE.
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
#ifdef __linux__
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <atomic>
|
||||
#include <vector>
|
||||
#include "test_common.h"
|
||||
|
||||
@@ -40,8 +40,10 @@ Testcase Scenarios :
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifdef __linux__
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <vector>
|
||||
#include "test_common.h"
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#include <stdio.h>
|
||||
#include <hip/hip_runtime.h>
|
||||
#ifdef __linux__
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include "test_common.h"
|
||||
#include <atomic>
|
||||
|
||||
|
||||
@@ -27,7 +27,9 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#ifdef __linux__
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
#include "hip/hip_runtime.h"
|
||||
|
||||
@@ -28,7 +28,9 @@
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#ifdef __linux__
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <mutex>
|
||||
#include <atomic>
|
||||
#include "hip/hip_runtime.h"
|
||||
|
||||
@@ -28,7 +28,9 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#ifdef __linux__
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <chrono>
|
||||
#include <atomic>
|
||||
#include "hip/hip_runtime.h"
|
||||
|
||||
@@ -27,7 +27,9 @@
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
#ifdef __linux__
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include "hip/hip_runtime.h"
|
||||
#include "test_common.h"
|
||||
|
||||
@@ -44,7 +44,9 @@ THE SOFTWARE.
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
#ifdef __linux__
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <hip/hip_runtime.h>
|
||||
#include "test_common.h"
|
||||
|
||||
|
||||
Reference in new issue
Block a user