Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dpctl.lsplatform() does not output in jupyter notebook #796

Closed
oleksandr-pavlyk opened this issue Mar 21, 2022 · 1 comment · Fixed by #800
Closed

dpctl.lsplatform() does not output in jupyter notebook #796

oleksandr-pavlyk opened this issue Mar 21, 2022 · 1 comment · Fixed by #800
Assignees

Comments

@oleksandr-pavlyk
Copy link
Collaborator

dpctl.lsplatform() produces an intended output when called in a terminal, but produces no output when called from jupyter notebook.

At the same time dev.print_device_info() works fine from both.

The issue is for lsplatform to also work from jupyter notebook.

@oleksandr-pavlyk
Copy link
Collaborator Author

dpctl.lsplatform() uses std::cout stream to output platform information, https://github.com/IntelPython/dpctl/blob/master/dpctl/_sycl_platform.pyx#L350
while SyclDevice.print_device_info() uses Python's stream:
https://github.com/IntelPython/dpctl/blob/master/dpctl/_sycl_device.pyx#L289

The fix would be to introduce SYCLInterface function to return "char *" instead of outputting it, and use that to print using CPython.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants