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

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

Merged
merged 2 commits into from
Oct 5, 2021

Conversation

diptorupd
Copy link
Contributor

@diptorupd diptorupd commented Oct 5, 2021

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.

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.

LGTM with small suggestions.

@oleksandr-pavlyk
Copy link
Collaborator

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

@diptorupd
Copy link
Contributor Author

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

Let us add that in #542

@coveralls
Copy link
Collaborator

coveralls commented Oct 5, 2021

Coverage Status

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

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.

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