diff --git a/projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp b/projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp index 10fbac7c4c..1be76a0de6 100644 --- a/projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp +++ b/projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp @@ -321,6 +321,7 @@ Settings::create( if (oclVersion_ >= OpenCL20) { supportDepthsRGB_ = true; + customSvmAllocator_ = true; } if (use64BitPtr_) { if (GPU_ENABLE_LARGE_ALLOCATION) { @@ -387,7 +388,6 @@ Settings::create( imageSupport_ = true; singleHeap_ = true; - customSvmAllocator_ = true; // Use kernels for blit if appropriate blitEngine_ = BlitEngineKernel; diff --git a/projects/clr/rocclr/runtime/platform/context.cpp b/projects/clr/rocclr/runtime/platform/context.cpp index 61ea45fa19..b57f880c85 100644 --- a/projects/clr/rocclr/runtime/platform/context.cpp +++ b/projects/clr/rocclr/runtime/platform/context.cpp @@ -39,7 +39,9 @@ Context::Context( "is allowed per context"); customHostAllocDevice_ = device; } - if (device->customSvmAllocator()) { + if (device->customSvmAllocator() + && (customSvmAllocDevice_ == NULL)) + { customSvmAllocDevice_ = device; } }