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

Fix dpctl.lsplatform() to output in jupyter notebook #800

Merged
merged 4 commits into from
Mar 28, 2022

Conversation

vlad-perevezentsev
Copy link
Collaborator

@vlad-perevezentsev vlad-perevezentsev commented Mar 25, 2022

Closes #796

This PR changes DPCTLPlatformMgr_PrintInfo function to return char * instead of outputting it in libsyclinterface , and use that to print using CPython.

Copy link
Collaborator

@oleksandr-pavlyk oleksandr-pavlyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not change the API public functions. Instead extend the API and change the implementation of the API.

DPCTLPlatformMgr_PrintInfo calls internal routine to get std::string and outputs it as before.
DPCTLPlatformMgr_GetInfo calls internal routine to get std::string and copies the result into C-style string.

@github-actions
Copy link

@coveralls
Copy link
Collaborator

coveralls commented Mar 28, 2022

Coverage Status

Coverage increased (+0.04%) to 82.105% when pulling 49e3419 on fix_lsplatform into a20344b on master.

@oleksandr-pavlyk
Copy link
Collaborator

@vlad-perevezentsev Thank you for making the requested changes. DPCTLSyclInterface tests for DPCTLPlatformMgr_GetInfo are also needed.

The test would call a function and check that the returned const char * is not a nullptr.

Copy link
Collaborator

@oleksandr-pavlyk oleksandr-pavlyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to build the coverage workflow manually. I was also able to manually confirm that the original issue of output of dpctl.lsplatform() not showing in remotely connected jupyter notebook has been fixed.

LGTM! Waiting for the CI to run its course.

@oleksandr-pavlyk oleksandr-pavlyk merged commit a94e63b into master Mar 28, 2022
@oleksandr-pavlyk oleksandr-pavlyk deleted the fix_lsplatform branch March 28, 2022 21:35
@github-actions
Copy link

Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞

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 this pull request may close these issues.

dpctl.lsplatform() does not output in jupyter notebook
4 participants