Skip to content

Add a new utility function to return the device info as a C string object. - #620

Merged
diptorupd merged 2 commits into
IntelPython:masterfrom
diptorupd:add/device_info_str
Oct 5, 2021
Merged

diptorupd merged 2 commits into
IntelPython:masterfrom
diptorupd:add/device_info_str

Conversation

@diptorupd

@diptorupd diptorupd commented Oct 5, 2021 •

Copy link
Copy Markdown
Contributor

The PR adds a new helper function in dpctl_sycl_device_manager called DPCTLDeviceMgr_GetDeviceInfoStr. The function returns a C string containing the device attributes currently printed out by DPCTLDeviceMgr_PrintDeviceInfo. The change will unblock #542.

Added a helper to convert C++ strings to C strings, Reduces code duplication.

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

LGTM with small suggestions.

@oleksandr-pavlyk

Copy link
Copy Markdown
Contributor

By the way, the Python API should be changed too, in _sycl_device.pyx

@diptorupd

Copy link
Copy Markdown
Contributor Author

By the way, the Python API should be changed too, in _sycl_device.pyx

Let us add that in #542

@coveralls

coveralls commented Oct 5, 2021 •

Copy link
Copy Markdown
Collaborator

Coverage Status

Coverage decreased (-0.03%) to 74.416% when pulling a58afe9 on diptorupd:add/device_info_str into d469c84 on IntelPython:master.

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

Looks good.

@diptorupd
diptorupd merged commit 8e50395 into IntelPython:master Oct 5, 2021
@diptorupd
diptorupd deleted the add/device_info_str branch October 5, 2021 23:12
oleksandr-pavlyk added a commit that referenced this pull request Oct 6, 2021
no longer needed wit #620 merged
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.

3 participants