[Beignet] How to allocate SVM
Yang, Rong R
rong.r.yang at intel.com
Sat Feb 24 01:23:12 UTC 2018
Beignet only support CL_DEVICE_SVM_COARSE_GRAIN_BUFFER svm.
Thanks,
Yang Rong
From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of Sami Pietilä
Sent: Thursday, February 22, 2018 4:47 PM
To: beignet at lists.freedesktop.org
Subject: [Beignet] How to allocate SVM
Hi,
I have Skylake (and Broadwell) CPU and I am running beignet 1.3 platform. I have checked that device capabilities has CL_DEVICE_SVM_FINE_GRAIN_BUFFER flag.
Following code gives CL_INVALID_VALUE. Even removing CL_MEM_SVM_ATOMICS does not help. What could be wrong with the code? Additionally, how to the same SVM reservation by OpenCL C++ bindings (cl2.hpp)?
size_t SVM_size = 42;
void* p = clSVMAlloc (
context(),
CL_MEM_READ_WRITE | CL_MEM_SVM_FINE_GRAIN_BUFFER | CL_MEM_SVM_ATOMICS,
SVM_size,
0);
cl_int err = clEnqueueSVMMap(queue(), CL_TRUE, CL_MAP_READ | CL_MAP_WRITE, p, SVM_size, 0, NULL, NULL);
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/beignet/attachments/20180224/761c7dba/attachment.html>
More information about the Beignet
mailing list