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

Always raise SubDeviceCreationError even when counts are zero #622

Merged
merged 1 commit into from
Oct 5, 2021

Conversation

oleksandr-pavlyk
Copy link
Collaborator

This now passes

SYCL_ENABLE_HOST_DEVICE=1 SYCL_DEVICE_FILTER=host:host python -m pytest dpctl/tests/test_sycl_device.py

@coveralls
Copy link
Collaborator

coveralls commented Oct 5, 2021

Coverage Status

Coverage decreased (-0.4%) to 74.042% when pulling cf618ec on fix-error-handling-create_sub_devices into d469c84 on master.

@oleksandr-pavlyk oleksandr-pavlyk force-pushed the fix-error-handling-create_sub_devices branch from 3666293 to cf618ec Compare October 5, 2021 21:30
if DVRef is NULL:
raise SubDeviceCreationError("Sub-devices were not created.")
raise SubDeviceCreationError(
"Sub-devices were not created." if (count > 0) else
Copy link
Contributor

Choose a reason for hiding this comment

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

The line is magic! :) Python 🥇

@diptorupd diptorupd merged commit 112b6be into master Oct 5, 2021
@diptorupd diptorupd deleted the fix-error-handling-create_sub_devices branch October 5, 2021 23:15
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