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

Raises an error when having no/exceeding vulkan device's limit #207

Merged
merged 2 commits into from
Apr 12, 2021

Conversation

unexploredtest
Copy link
Contributor

@unexploredtest unexploredtest commented Apr 12, 2021

Currently, if there are no Vulkan devices or if they use a physicalDeviceIndex that is not available(meaning that they exceed their device count), one would get a seg fault.
It would be more plausible if one would get an error with an explanation instead.

Copy link
Member

@axsaucedo axsaucedo left a comment

Choose a reason for hiding this comment

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

Nice one, good shout, I think this would be a good addition - added a minor comment on indentation but other than that should be good to merge

src/Manager.cpp Outdated

// This means there are no devices at all
if (deviceCount == 0) {
throw std::runtime_error("Failed to find GPUs with Vulkan support! "
Copy link
Member

Choose a reason for hiding this comment

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

Indentation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@unexploredtest
Copy link
Contributor Author

@axsaucedo Thanks!
The indentation is now fixed

@axsaucedo axsaucedo merged commit 943a281 into KomputeProject:master Apr 12, 2021
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.

2 participants