P4 to Git Change 1597023 by vsytchen@vsytchen-win10 on 2018/08/22 15:12:23

SWDEV-159881 - [OCL][ROCm] Add SVM coarse-grain buffer support with device memory

	1. Use the system memory pool for coarse grain allocations on APUs

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

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocmemory.cpp#39 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#64 edit
This commit is contained in:
foreman
2018-08-22 15:25:01 -04:00
parent bd9a437016
commit 1bf70582f0
2 changed files with 8 additions and 6 deletions
+4 -4
View File
@@ -1215,7 +1215,7 @@ void VirtualGPU::submitSvmCopyMemory(amd::SvmCopyMemoryCommand& cmd) {
profilingBegin(cmd);
// no op for FGS supported device
if (!dev().isFineGrainedSystem()) {
if (!dev().isFineGrainedSystem(true)) {
amd::Coord3D srcOrigin(0, 0, 0);
amd::Coord3D dstOrigin(0, 0, 0);
amd::Coord3D size(cmd.srcSize(), 1, 1);
@@ -1374,7 +1374,7 @@ void VirtualGPU::submitSvmMapMemory(amd::SvmMapMemoryCommand& cmd) {
profilingBegin(cmd);
// no op for FGS supported device
if (!dev().isFineGrainedSystem() &&
if (!dev().isFineGrainedSystem(true) &&
!dev().forceFineGrain(cmd.getSvmMem())) {
// Make sure we have memory for the command execution
Memory* memory = dev().getRocMemory(cmd.getSvmMem());
@@ -1410,7 +1410,7 @@ void VirtualGPU::submitSvmUnmapMemory(amd::SvmUnmapMemoryCommand& cmd) {
profilingBegin(cmd);
// no op for FGS supported device
if (!dev().isFineGrainedSystem() &&
if (!dev().isFineGrainedSystem(true) &&
!dev().forceFineGrain(cmd.getSvmMem())) {
Memory* memory = dev().getRocMemory(cmd.getSvmMem());
const device::Memory::WriteMapInfo* writeMapInfo = memory->writeMapInfo(cmd.svmPtr());
@@ -1700,7 +1700,7 @@ void VirtualGPU::submitSvmFillMemory(amd::SvmFillMemoryCommand& cmd) {
amd::Memory* dstMemory = amd::MemObjMap::FindMemObj(cmd.dst());
if (!dev().isFineGrainedSystem() ||
if (!dev().isFineGrainedSystem(true) ||
((dstMemory != nullptr) &&
!dev().forceFineGrain(dstMemory))) {
size_t patternSize = cmd.patternSize();