GPU Compute Software
Ask questions about Intel® Graphics Compute software technologies, such as OpenCL* GPU driver and oneAPI Level Zero
493 Discussions

USM Allocations with more than 4G

marcelld
Beginner
44 Views

Hi,

 

I want to learn about how Intel USM works, because it looks similar to Nvidia UVM. I tried to run some code on my Intel ARC A770 in Ubuntu 26.04, but it seems like I am doing something wrong or I misunderstood the concept. Whenever I try to allocate more than 4G using USM it fails with CL_OUT_OF_RESOURCES. Allocating more than 4G without using USM succeeds. I am using the flasg "-ze-intel-greater-than-4GB-buffer-required" as option to build the kernel. Furthermore, I set the 23rd bit in the clBuffer options when using no USM. Allocating memory via clSharedMemAllocINTEL does not have an option to set the 23rd bit.

I have also tried the USM example code 300_smemhelloworld from https://github.com/bashbaug/SimpleOpenCLSamples/ and this also fails when increasing the buffer size over 4G.

Isn't it supposed to work also for larger buffers? As I understood the idea, the GPU can pagefault using shared memory and the driver will load pages into GPU memory. This looks like a solution for memory oversubscription to me. But when only buffers smaller than 4G are supported, this does not make any sense.

Best regards
Marcel

0 Kudos
1 Reply
marcelld
Beginner
24 Views

I posted the wrong error code. It's CL_INVALID_BUFFER_SIZE instead of CL_OUT_OF_RESOURCES.

0 Kudos
Reply