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

Fix: Increase Vulkan detection timeout to 12 seconds #931

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

LSXPrime
Copy link

The previous timeout of 1 second for detecting the Vulkan GPU using vulkaninfo --summary was insufficient on some systems, leading to the command timing out and the inference falling back to the CPU. This commit increases the timeout to 12 seconds to accommodate systems where vulkaninfo takes longer to complete.

This change addresses an issue where the Vulkan backend would frequently fall back to CPU inference due to the vulkaninfo command timing out before it could return the necessary information to detect the GPU. The increased timeout ensures that the command has sufficient time to complete on a wider range of systems, enabling the Vulkan backend to correctly detect and utilize the GPU for inference.

The previous timeout of 1 second for detecting the Vulkan GPU using `vulkaninfo --summary` was insufficient on some systems, leading to the command timing out and the inference falling back to the CPU. This commit increases the timeout to 12 seconds to accommodate systems where `vulkaninfo` takes longer to complete.

This change addresses an issue where the Vulkan backend would frequently fall back to CPU inference due to the `vulkaninfo` command timing out before it could return the necessary information to detect the GPU. The increased timeout ensures that the command has sufficient time to complete on a wider range of systems, enabling the Vulkan backend to correctly detect and utilize the GPU for inference.
@martindevans
Copy link
Member

Thanks for investigating and fixing this 😁

@martindevans martindevans merged commit ce8b05c into SciSharp:master Oct 1, 2024
6 checks passed
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