P4 to Git Change 1789549 by vsytchen@vsytchen-remote-ocl-win10 on 2019/05/30 10:15:29

SWDEV-188631 - Allocating large buffers produce wrong kernel result on Windows

	1. Set a limit for USWC allocations to 2GB on Windows.
	2. Allocations larger than the specified limit will get placed into pinned memory instead.

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

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#138 edit
... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#310 edit
Tento commit je obsažen v:
foreman
2019-05-30 10:28:59 -04:00
rodič 1a2d3ebbab
revize 66cda9d97a
2 změnil soubory, kde provedl 5 přidání a 1 odebrání
+2 -1
Zobrazit soubor
@@ -1511,7 +1511,8 @@ pal::Memory* Device::createBuffer(amd::Memory& owner, bool directAccess) const {
(settings().remoteAlloc_)) {
// Allocate remote memory if AHP allocation and context has just 1 device
if ((owner.getMemFlags() & CL_MEM_ALLOC_HOST_PTR) &&
(owner.getContext().devices().size() == 1)) {
(owner.getContext().devices().size() == 1) &&
(owner.getSize() < static_cast<size_t>(GPU_MAX_USWC_ALLOC_SIZE) * Mi)) {
if (owner.getMemFlags() &
(CL_MEM_READ_ONLY | CL_MEM_HOST_WRITE_ONLY | CL_MEM_HOST_NO_ACCESS)) {
// GPU will be reading from this host memory buffer,