[Beignet] [PATCH V2 1/3] support CL_MEM_USE_HOST_PTR with userptr for cl buffer

Guo, Yejun yejun.guo at intel.com
Thu Nov 6 21:58:08 PST 2014


The runtime check is more about my second patch, to modify the host_unified_memory, will modify my these 2 patches as:

- add runtime check for userptr to decide the value of CL_DEVICE_HOST_UNIFIED_MEMORY

- if runtime shows userptr is supported, and the host_ptr is page aligned
   call drm_intel_bo_alloc_userptr to allocate bo,
   report CL_MEM_OBJECT_ALLOCATION_FAILURE if the allocated bo is NULL.
- otherwise
   use the old method.

-----Original Message-----
From: Zhenyu Wang [mailto:zhenyuw at linux.intel.com] 
Sent: Friday, November 07, 2014 1:43 PM
To: Zhigang Gong
Cc: Guo, Yejun; beignet at lists.freedesktop.org
Subject: Re: [Beignet] [PATCH V2 1/3] support CL_MEM_USE_HOST_PTR with userptr for cl buffer

On 2014.11.07 11:51:08 +0800, Zhigang Gong wrote:
> I have one major comment, what if the running system doesn't support userptr?
> We may need to check whether we can use userptr feature at runtime 
> rather than compile time, right?

It's already handled by libdrm interface that if you run old kernel without userptr support, you won't get bo alloc from libdrm, as in current method just fallback to copy case.

--
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827


More information about the Beignet mailing list