Merge commit 'b0519e8441273e20bbcbe1bb7b56cdf55369f514' into develop
This commit is contained in:
commit
bc455989d9
52 files changed
+1439
-6178
No files matched your search
@@ -371,8 +371,8 @@ TEST_CASE("Unit_hipMallocFromPoolAsync_ReleaseThreshold_Mgpu") {
|
||||
/**
|
||||
* Local Thread Functions
|
||||
*/
|
||||
static void threadQAsyncCommands(streamMemAllocTest* testObj,
|
||||
hipStream_t strm) {
|
||||
static void threadQAsyncCommands(streamMemAllocTest* testObj, hipStream_t strm, int idx) {
|
||||
HIP_CHECK(hipSetDevice(idx));
|
||||
// Create host buffer with test data.
|
||||
testObj->createHostBufferWithData();
|
||||
// Allocate device memory and transfer data to it asyncronously on stream.
|
||||
@@ -616,7 +616,7 @@ TEST_CASE("Unit_hipMallocFromPoolAsync_Multidevice_Concurrent") {
|
||||
// Queue commands in each device
|
||||
for (int idx = 0; idx < num_devices; idx++) {
|
||||
HIP_CHECK(hipSetDevice(idx));
|
||||
std::thread test(threadQAsyncCommands, tesObjBuf[idx], stream_buf[idx]);
|
||||
std::thread test(threadQAsyncCommands, tesObjBuf[idx], stream_buf[idx], idx);
|
||||
test.join();
|
||||
}
|
||||
// Wait for the streams
|
||||
@@ -675,10 +675,10 @@ TEST_CASE("Unit_hipMallocFromPoolAsync_Multidevice_MultiStream") {
|
||||
// Queue commands in each device
|
||||
for (int idx = 0; idx < num_devices; idx++) {
|
||||
HIP_CHECK(hipSetDevice(idx));
|
||||
std::thread test1(threadQAsyncCommands, tesObjBuf[streamPerAsic*idx],
|
||||
stream_buf[streamPerAsic*idx]);
|
||||
std::thread test2(threadQAsyncCommands, tesObjBuf[streamPerAsic*idx + 1],
|
||||
stream_buf[streamPerAsic*idx + 1]);
|
||||
std::thread test1(threadQAsyncCommands, tesObjBuf[streamPerAsic * idx],
|
||||
stream_buf[streamPerAsic * idx], idx);
|
||||
std::thread test2(threadQAsyncCommands, tesObjBuf[streamPerAsic * idx + 1],
|
||||
stream_buf[streamPerAsic * idx + 1], idx);
|
||||
test1.join();
|
||||
test2.join();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user