Skip to content

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

Closed

Description

@oleksandr-pavlyk

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.

Activity

  1. oleksandr-pavlyk commented on Mar 22, 2022

    @oleksandr-pavlyk
    ContributorAuthor

    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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions