- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To cut down initialization time, I would like to initialize both CPU and GPU devices concurrently.
Is this safe?
Thanks,
Aaron
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What do you mean by concurrent initialization? Actual initialization is done during platform load and Context creation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, Dmitry. My target system is intel CPU and AMD GPU, so data sharing
is not possible.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page