foreman b02040e934 P4 to Git Change 1587799 by vsytchen@vsytchen-win10 on 2018/07/31 14:47:31
SWDEV-145570 - [HIP] refactor hipMemcpy* functions to correctly handle copies using prepinned memory

	The current implementation of hipMemcpy functions picks the copy type based on a flag that the user passes. However, one can use the hipMemcpyHostToDevice/hipMemcpyDeviceToHost flag in a combination with prepinned memory. By using the WriteMemoryCommand/ReadMemoyCommand in this case, we will pin the same host memory twice. This is fine on PAL/Linux, since pinning the same VA range is a noop, but this will start failing once we switch to using device memory with HIP/VDI/HSA.

	The solution is to ignore the hipMemcpyKind flag and let the runtime decide what kind of copy is best to do. Except for the case when hipMemcpyHostToHost is passed, since both host pointers may be prepinned.

	ReviewBoardURL = http://ocltc.amd.com/reviews/r/15482/diff/

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/hip/hip_memory.cpp#37 edit
2018-07-31 15:07:56 -04:00
S
Opis
No description provided
282 MiB
Languages
C++ 67.5%
C 20.6%
Python 6.6%
CMake 3.4%
Shell 0.6%
Pozostałe 1.1%