OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1663 Discussions

Does the intel-drm support the SVM through the IOMMU and PASID?

Jaehyuk_L_
Beginner
366 Views

Hi, I am a newbie on the intel-gfx and tries to use the shared virtual memory 

which is mentioned in several intel documents (vt-d and Intel-gfx-prm).

Following the above two documents,

shared virtual memory is supported as part of VT-d functionality, and

in detail, IOMMU walks the PASID table and translates the virtual address to physical address 

for the PCIe connected devices including the integrated GPUs. 

 

Following the Intel document ,

It seems that clSVMAlloc is a OpenCL function for zero copy,

but after I've checked the repository of the opencl-intel (beignet),

I found that it never calls any driver functions for managing  PASID table. 

Is the current intel-gfx supports the shared virtual memory 

through the IOMMU and PASID? 

If the clSVMAlloc is not a right library function for SVM through 

PASID and IOMMU, is there a function that satisfies my intention?

 

Best regards

Jaehyuk.

0 Kudos
3 Replies
Jeffrey_M_Intel1
Employee
366 Views

I am not an expert on Beignet, but the OpenCL implementations on our drivers page support shared virtual memory.  We have some samples showcasing SVM here: https://software.intel.com/en-us/intel-opencl-support/code-samples.

As for virtualization support, that is more limited.  No problems are expected with GVT-D (direct or "passthrough", one VM per physical GPU).  However, OpenCL and Media SDK are not fully supported with other forms of virtualization.

 

pang__raymond
Beginner
366 Views

Hi Jaehyuk,

I completely understand what you say!

I also wonder how Intel makes SVM work without IOMMU+PASID, especially there's 

some interfaces realated to PASID in linux kernel, like intel_svm_bind_mm().

I guess some GFX driver calls intel_svm_bind_mm(). But I cannot find any evidence.

 Do you have an answer now?

What's the correct driver?  Based on OpenCL?

 

Best Regards,

Raymond

Michael_C_Intel1
Moderator
366 Views

Hi RaymondP,

That drivers page is getting a refactor soon.  Intel is looking to highlight that Intel Processor Graphics stacks for Linux OSs are moving to the Intel Graphics Compute Runtime for OpenCL Driver (user mode runtime)... it's opensource... so you can check out OpenCL calls for SVM in particular in it's git repo.

Two places come to mind in understanding the stack:

Asking that kind of developer oriented question could yield more specifics directly on that github page.

Hope this is helpful.

-MichaelC

Reply