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
There were several error messages that appeared even if the hipEnvVarDriver.exe test passes and executes successfully. Now it is cleaned up. The following are those instances:
* When popen searches for directed_test directory but does not find it, it outputs an error, then finds the hipEnvVar at the same level. Currently the fix will prompt the test to only output an error if both searches for hipEnvVar fails.
* When assertion is used towards the later half of the test, conditions were set to specifically hide the devices, resulting in No Hip Device detected in the latter half of the test. The fix will make these errors not appear as they are intended to not find any devices. Assertions themselves are untouched.
HipEnvVarDriver.cpp has also been refactored. Reading HipEnvVar will now happen in a helper function for getDeviceNumber and getDevicePCIBusNumRemote, as the code to read HipEnvVar were really similar in them.
* Updated hipEnvVarDriver to work with Windows
* Cleaned up a bit of code
* Fixed a part where putenv was used for both win and linux
* Defines moved to test_common.h and cleaned up code
* Cleaned up some macro defines and used const char instead
* Got rid of some excess commenting
* directory paths are unconditional
* Cleaned some duplicate code, and variables are now declared and defined together
Added new memory API's hipMemAllocPitch, hipMemAllocHost, hipMemsetD16, hipMemsetD16Async, hipMemsetD8Async
Modified to support all scenarios hipMemcpyParam2DAsync, hipMemcpyParam2D.
- Ensure proper device is set before each command.
- Add command line switches:
+bool p_memcpyWithPeer = false; // use the peer device for the P2P copy
+bool p_mirrorPeers = false; // in addition to mapping current to peer
space, map peer to current space.
+int p_peerDevice = -1; // explicly specify which peer to use, else
use p_gpuDevice + 1.
Tracks device where memory is allocated, pinned-host or device, and
more.
Uses memory-range-based lookups - so pointers that exist anywhere in
the range of hostPtr + size will find the associated AmPointerInfo.
The insertions and lookups use a self-balancing binary tree and
should support O(logN) lookup speed.