[Beignet] How to allocate SVM
Sami Pietilä
sami.pietila at gmail.com
Sat Feb 24 08:14:05 UTC 2018
Hi,
Why only CL_DEVICE_SVM_COARSE_GRAIN_BUFFER is supported? Capabilities flag
seem to indicate that the Intel device is capable for fine grain memory.
At the moment, Is it possible to get support for fine grain memory features
on Intel platform, perhaps by switching to different OpenCL SDK? I am
running Ubuntu 17.10 and soon going to upgrade to 18.04 LTS.
Thanks
2018-02-24 3:23 GMT+02:00 Yang, Rong R <rong.r.yang at intel.com>:
> 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/d3b554ae/attachment.html>
More information about the Beignet
mailing list