Skip to content

[SYCL][CUDA] Add backend_version device property #5802

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

Merged
merged 7 commits into from
Mar 17, 2022

Conversation

t4c1
Copy link
Contributor

@t4c1 t4c1 commented Mar 14, 2022

Adds backend_version device property that can be queried vie device.get_info() and implements it for CUDA to return compute capability.

@t4c1 t4c1 requested review from a team as code owners March 14, 2022 12:26
@t4c1 t4c1 requested a review from steffenlarsen March 14, 2022 12:26
Comment on lines +1158 to +1164
template <>
inline std::string get_device_info_host<info::device::backend_version>() {
throw runtime_error(
"Backend version feature is not supported on HOST device.",
PI_INVALID_DEVICE);
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Do I understand correctly that it's only a stub and going to be modified in follow-up patch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes it is a stub, but we currently do not have plans for implementing it for other backends. I am not even sure what it should return for host, as it is supposed to be defined by backend specification.

Copy link
Contributor

Choose a reason for hiding this comment

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

It could just throw an exception for host.

Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

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

Just a minor nit, but otherwise it LGTM.

@smaslov-intel - Do we have a plan for what to return in the L0 backend for this query?

steffenlarsen
steffenlarsen previously approved these changes Mar 16, 2022
Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

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

LGTM!

@bader bader requested review from s-kanaev and smaslov-intel March 16, 2022 17:01
s-kanaev
s-kanaev previously approved these changes Mar 17, 2022
Copy link
Contributor

@s-kanaev s-kanaev left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines +1158 to +1164
template <>
inline std::string get_device_info_host<info::device::backend_version>() {
throw runtime_error(
"Backend version feature is not supported on HOST device.",
PI_INVALID_DEVICE);
}

Copy link
Contributor

Choose a reason for hiding this comment

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

It could just throw an exception for host.

@t4c1 t4c1 dismissed stale reviews from s-kanaev and steffenlarsen via 54366d9 March 17, 2022 08:16
@bader bader merged commit 4b1a4bc into intel:sycl Mar 17, 2022
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.

4 participants