Altera_Forum
Honored Contributor
10 years agoProblems with Shared Virtual Memory
Did anyone get SVM to work? I'm having trouble with it both in the emulator and on the SoC.
Using the function "clGetDeviceInof" to query SVM capabilities I get the following positives:
CL_DEVICE_SVM_COARSE_GRAIN_BUFFER
CL_DEVICE_SVM_FINE_GRAIN_BUFFER
CL_DEVICE_SVM_FINE_GRAIN_SYSTEM
As far as I know this means I should be able to allocate memory with "clSVMAllocAltera", however the following call always returns NULL (emulator):
clSVMAllocAltera(context, CL_MEM_READ_WRITE | CL_MEM_SVM_FINE_GRAIN_BUFFER, 1024, 0)
Specifying an alignment value does not seem to help either. Unfortunately I don't know of any way to get further Information about what error occurred. I get a valid pointer when I remove the CL_MEM_SVM_FINE_GRAIN_BUFFER flag, but according to the device info call fine grained buffers should be available. When building for the SoC I get various linker errors, so I haven't been able to test it there yet.