84aadb9274e30964c97a4168d154a7d4c79c29a8
When shareWithAll memory (e.g., host memory) is allocated, set appId in hc::AmPointerInfo to -1 to indicate that this memory is not mapped to any device. Peer checking in ihipStream_t::canSeeMemory is not necessary if memory is shared with all devices. Thus, it is skipped. Note that earlier host memory is always mapped to device 0 and HIP always performs peer checking for all kinds of hipMemcpy. Since the peer checking process requires context locking, hipMemcpy from/to host memory always grabs device 0's context lock. Therefore, if there is another thread holding the context lock of device 0 (e.g., hipDeviceSynchronize on device 0), hipMemcpy will have to wait for the lock until it can actually perform memcpy. This can significantly deteriorate execution performance. Signed-off-by: Sarunya Pumma <sarunya.pumma@amd.com>
Description
No description provided
Languages
C++
67.5%
C
20.6%
Python
6.6%
CMake
3.4%
Shell
0.6%
Other
1.1%