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

Fixes for the c++ Simple and Extended examples in readme #108

Merged
merged 2 commits into from
Jan 4, 2021
Merged

Fixes for the c++ Simple and Extended examples in readme #108

merged 2 commits into from
Jan 4, 2021

Conversation

unexploredtest
Copy link
Contributor

There were some missed semi-colons and >s which prevented the Simple and Extended examples from compiling; also, the code was trying to print std::vector which is not feasible. I could run the first one successfully, but the Extended example(second one) though compiles successfully, crashes my system when trying to execute sq->eval(); , so I'm not sure. Hope this fix is useful, as I'm still trying to learn this library.

@unexploredtest unexploredtest changed the title Fixes for the c++ Simple and Extended examples Fixes for the c++ Simple and Extended examples in readme Jan 3, 2021
@axsaucedo axsaucedo self-requested a review January 4, 2021 19:05
@axsaucedo axsaucedo added the documentation Improvements or additions to documentation label Jan 4, 2021
@axsaucedo
Copy link
Member

Good catch @aliPMPAINT ! Thank you for the contribution!

@axsaucedo axsaucedo merged commit 1633351 into KomputeProject:master Jan 4, 2021
@unexploredtest
Copy link
Contributor Author

unexploredtest commented Jan 4, 2021

Thanks!
One last note @axsaucedo , kp::Manager mgr(0, { 2 }); with family index of 2 caused my system to freeze(and then I have to restart it), family index 1 and 0 worked fine.

@axsaucedo
Copy link
Member

@aliPMPAINT you are totally right, I also experienced this actually when putting together this blog post, I was going to raise it as an issue but I wasn't really sure where would be the best place to raise this, as ultimately it does seem to be a Vulkan issue - namely it shouldn't really crash your entire computer when a queue is added when it doesn't exist.

Given this has come up again it may be worth opening an issue in one of the Vulkan official repos

@unexploredtest
Copy link
Contributor Author

@axsaucedo , gotcha, which repository is appropriate?
And on the mean time, is it better to change the family index to 1 or 0?

@axsaucedo
Copy link
Member

You actually have to check which family indices are supported based on your graphics card, for example in my nvidia card I can use index 0 and 2 for compute and 1 for transfer http://vulkan.gpuinfo.org/displayreport.php?id=9700#queuefamilies. The blog post covers this in a bit more detail, but let me know if you have questions regarrding of why this is the case

@unexploredtest
Copy link
Contributor Author

Oh, got it. Sorry for my silly misconception.

@axsaucedo
Copy link
Member

No worries @aliPMPAINT definitely not a simple one, it took me a long time and a lot of asking to figure out the nuances with familyQueues and GPU queues, so definitely good questions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants