- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I try seeing how dpct handles cuda stream from a multi-stream example of https://developer.nvidia.com/blog/gpu-pro-tip-cuda-7-streams-simplify-concurrency/
dpct and dpcpp do not complain anything but running it I get the following message.
```
pure virtual method called
terminate called without an active exception
pure virtual method called
terminate called recursively
```
Even if I change
x[i] = sqrt(pow(3.14159,i)); // x[i] = sycl::sqrt(sycl::pown(3.14159, i));
Another thing from this example is different return type of `default_queue` and `create_queue`.
`default_queue()` returns object but `create_queue()` return a pointer.
dpct seems to convert cuda_stream_t to queue* correctly to fix the issue
Thanks,
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Could you please provide your OS details and oneAPI base-toolkit version that you have used?
I have migrated the cuda stream sample from the given link and I can compile/run the migrated code without any error. (tried on Ubuntu 18.04 with oneAPI beta08). Although I did not try to print anything to the output, the migrated dpct code as such is compilable.
Attaching the migrated file for reference.
Regards,
Rahul
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Could you please provide your OS details and oneAPI base-toolkit version that you have used?
I have migrated the cuda stream sample from the given link and I can compile/run the migrated code without any error. (tried on Ubuntu 18.04 with oneAPI beta08). Although I did not try to print anything to the output, the migrated dpct code as such is compilable.
Attaching the migrated file for reference.
Regards,
Rahul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ruhul,
I run it on devcloud. It also uses ubuntu 18.04 and dpct beta8.
The file you give is same as mine except for some comments.
After recompiling them, they all work.
I have no idea why it is failed or hangs for long time before.
Thanks a lot.
I attach my output and error from qsub in attachment although it may be helpless.
Thanks,
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is any comments on it?
Another thing from this example is different return type of `default_queue` and `create_queue`.
`default_queue()` returns object but `create_queue()` return a pointer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Hanging in between could be a Devcloud related issue in my opinion and not Dpc++/Dpct related.
default_queue(); will return a pointer's reference of a single sycl::queue of the default device. Its reference is captured in sycl::queue &q_ct1
But in your case, since its a multi-stream code, it would need additional queues of the same default device, for every additional stream.
sycl::queue *streams[num_streams];
streams[i] = dev_ct1.create_queue();
create_queue() will directly return a pointer to the queue of the default_device(). Since 8 streams are used, every element in the array (streams) will contain a pointer to the queue of the default device. Subsequently, submit methods to the newly created queues are called using streams[i]->submit.
Regards,
Rahul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Since you have accepted the solution, I'll go ahead and close this thread from my end. Intel will no longer monitor this thread. However, it will remain open for community discussion.
Feel free to post a new question, if you still face any issue.

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