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.
1720 Discussions

Is it safe to inialize both CPU and GPU device concurrently?

ABoxe
Beginner
605 Views

To cut down initialization time, I would like to initialize both CPU and GPU devices concurrently.

Is this safe?

Thanks,

Aaron

0 Kudos
4 Replies
Dmitry_K_Intel
Employee
605 Views

What do you mean by concurrent initialization? Actual initialization is done during platform load and Context creation.

 

0 Kudos
ABoxe
Beginner
605 Views

I mean: launch one thread per device: each thread initializes one device.

I guess I mean: are the platform load and context creation methods thread safe?

0 Kudos
Dmitry_K_Intel
Employee
605 Views

Yes, OpenCL Runtime is thread safe.

What do you want to achieve by using multiple threads for initialization? Do you want to create different contexts for CPU and GPU? Is is because you want to avoid data sharing between GPU and CPU?

 

0 Kudos
ABoxe
Beginner
605 Views

Thanks, Dmitry. My target system is intel CPU and AMD GPU, so data sharing

is not possible. 

0 Kudos
Reply