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

[vulkan] Use TI_VISIBLE_DEVICE to select vulkan device #4255

Merged
merged 5 commits into from
Feb 14, 2022

Conversation

qiao-bo
Copy link
Contributor

@qiao-bo qiao-bo commented Feb 10, 2022

Add an env var option TI_VISIBLE_DEVICE to enable user selected vulkan device. The identifier is device id, can be obtained by querying vulkaninfo.

@netlify
Copy link

netlify bot commented Feb 10, 2022

✔️ Deploy Preview for docsite-preview ready!

🔨 Explore the source changes: 4a9a7a0

🔍 Inspect the deploy log: https://app.netlify.com/sites/docsite-preview/deploys/6204be92538aeb000784d5e8

😎 Browse the preview: https://deploy-preview-4255--docsite-preview.netlify.app

@qiao-bo
Copy link
Contributor Author

qiao-bo commented Feb 10, 2022

/format

@qiao-bo
Copy link
Contributor Author

qiao-bo commented Feb 10, 2022

/format

Copy link
Contributor

@ailzhang ailzhang left a comment

Choose a reason for hiding this comment

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

sorry this might be a dumb question, how do I list all my vulkan devices before setting? ;)

@qiao-bo
Copy link
Contributor Author

qiao-bo commented Feb 10, 2022

sorry this might be a dumb question, how do I list all my vulkan devices before setting? ;)

legitimate question! vulkaninfo can be used. similar to clinfo or devicequery for cuda. The idea is to have a unique identifier rather than 0, 1 ,2... Please suggest if there are better options~

@bobcao3
Copy link
Collaborator

bobcao3 commented Feb 11, 2022

Should probably rename to TI_USE_VULKAN_DEVICE since "visible device" is quite confusing.

@k-ye
Copy link
Member

k-ye commented Feb 13, 2022

Should probably rename to TI_USE_VULKAN_DEVICE since "visible device" is quite confusing.

I suggest to remove the specific mentioning of VULKAN_, since many other APIs support GPU selection as well.

@qiao-bo
Copy link
Contributor Author

qiao-bo commented Feb 14, 2022

Should probably rename to TI_USE_VULKAN_DEVICE since "visible device" is quite confusing.

I suggest to remove the specific mentioning of VULKAN_, since many other APIs support GPU selection as well.

this is the intention, same switch could be used for other APIs.

Copy link
Collaborator

@bobcao3 bobcao3 left a comment

Choose a reason for hiding this comment

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

LGTM

@bobcao3 bobcao3 merged commit f0660d0 into taichi-dev:master Feb 14, 2022
@qiao-bo qiao-bo deleted the device branch March 8, 2022 05:22
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.

5 participants