Skip to content

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

Merged
oleksandr-pavlyk merged 4 commits into
masterfrom
fix_lsplatform
Mar 28, 2022
Merged

oleksandr-pavlyk merged 4 commits into
masterfrom
fix_lsplatform

Conversation

@vlad-perevezentsev

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

Copy link
Copy Markdown
Collaborator

Closes #796

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

Comment thread dpctl/_backend.pxd Resolved

@oleksandr-pavlyk oleksandr-pavlyk left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown

@coveralls

coveralls commented Mar 28, 2022 •

Copy link
Copy Markdown
Collaborator

Coverage Status

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

@oleksandr-pavlyk

Copy link
Copy Markdown
Contributor

@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.

@oleksandr-pavlyk oleksandr-pavlyk left a comment •

Copy link
Copy Markdown
Contributor

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
Copy Markdown

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