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

bug: Jan doesn't auto detect GPU on Windows #981

Closed
hahuyhoang411 opened this issue Dec 13, 2023 · 8 comments
Closed

bug: Jan doesn't auto detect GPU on Windows #981

hahuyhoang411 opened this issue Dec 13, 2023 · 8 comments
Assignees
Labels
P0: critical Mission critical type: bug Something isn't working

Comments

@hahuyhoang411
Copy link
Contributor

hahuyhoang411 commented Dec 13, 2023

Jan Windows v0.4.0-41
CPU: i7-12700
CUDA: 12.3 Driver Version: 545.92
RAM 32GB

Describe the bug
Jan will run on the CPU on my computer by default. I and @vuonghoainam did a quick sync on this. It turns out I can't run the Nitro GPU because of it's missing cudart

Screenshots
image

@hiro-v
Copy link
Contributor

hiro-v commented Dec 14, 2023

The solution is:

  • Nitro extension onLoad to download respective cuda runtime from https://github.com/janhq/nitro/releases/tag/v0.1.27 (pls change with version in bin/version.txt). Please only install CUDA 12 for now, no need to install cuda 11, we can fix later.
    CleanShot 2023-12-14 at 08 42 29@2x
  • Unzip in the bin/win-cuda/ with flat file
  • Done, this will make sure that:
    • Nitro running is decoupled with OS cuda toolkit
    • Any incompatibility
    • The problem that may arise with cuda toolkit on windows/ linux that even CUDA is there but cannot access
  • Use Rex laptop to test.

@freelerobot freelerobot added this to the Jan on Windows milestone Dec 14, 2023
@freelerobot freelerobot moved this to Triaged (Backlog) in Menlo Dec 14, 2023
@freelerobot freelerobot moved this from Triaged (Backlog) to Todo in Menlo Dec 15, 2023
@louis-menlo
Copy link
Contributor

Rescheduled to 0.4.3

@hiro-v hiro-v moved this from Todo to In Progress in Menlo Dec 16, 2023
@hiento09 hiento09 moved this from In Progress to Todo in Menlo Dec 18, 2023
@freelerobot freelerobot added the P0: critical Mission critical label Dec 18, 2023
@freelerobot freelerobot moved this from Planned to In Progress in Menlo Dec 22, 2023
@freelerobot
Copy link
Contributor

Is this fixed? @hiento09 If so, can you close this issue?

@hiento09
Copy link
Collaborator

Not yet @0xSage, I may need to re-schedule this bug to next sprint since it relates to nvidia driver + cuda dependency/compability.

@hiento09 hiento09 moved this from In Progress to Planned in Menlo Dec 22, 2023
@hiento09
Copy link
Collaborator

Subtask:

@louis-menlo louis-menlo moved this from Planned to In Progress in Menlo Dec 26, 2023
@hiento09
Copy link
Collaborator

For the GPU detection issue, the current approach for the Jan app is as suggestion bellow:

1. In Nitro inference plugin, try execute the nvidia-smi command to check for the presence of a GPU. If a GPU is detected, proceed to verify CUDA. This involves checking if CUDA's DLL files exist in the environment. If they do, Nitro will automatically start.

If no GPU is found, a warning will be automatically issued to the user, indicating the absence of a GPU.

2. Warning Message Contents:

  • The warning message will include the following:
    • Instructions on installing NVIDIA drivers directly from Jan's official guidelines, tailored to the CUDA version used for building Nitro, and guidance on building from source for users.
    • Steps to replace the Nitro binary file within the Jan app, with a caution that building from source will not include Jan's Windows code signing.

3. Links and Resources:

  • The warning will also provide a link to the official CUDA installation page.
  • A CUDA and NVIDIA driver compatibility matrix will be included for user reference.

Additional Notes:

  • An option to manually check NVIDIA and GPU status might be added to the guidance bar, if needed.
  • If a GPU is detected, an option to start Nitro specifying which GPU(s) to use (either one or up to three) can be considered for future implementation.

@tikikun
Copy link
Contributor

tikikun commented Dec 26, 2023

I think we should switch to an explicit GPU support by having something like a "Hardware acceleration" dropdown (Jellyfin example in the image) to reduce edge case, rather than automatic.
-Jan will try to find the most suitable option for the dropdown

  • If not succeed in automation, then user specify their hardware acceleration.

There are many other edge cases to solve for and it's very high chance that the hardware owner knows what hardware they're having.

@tikikun
Copy link
Contributor

tikikun commented Dec 26, 2023

I created an issue here for this feature request for tracking
#1208

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0: critical Mission critical type: bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

7 participants