Skip to content

Conversation

@justingilpin
Copy link

@justingilpin justingilpin commented May 21, 2023

These flags could be put into the code but I thought I'd make them visible so that you and others could decide if they are needed for their setup.

@virchau13
Copy link
Owner

I don't have a PRIME laptop, so unfortunately I can't test this, but thanks for the PR!

Just one question: what's nvidia-offload? I can't find it referenced anywhere online, and no package in Nixpkgs seems to provide it.

@justingilpin
Copy link
Author

This has been tested and works on my machine. Figured it may help others as it took me down a rabit hole.

I forgot to mention that nvidia-offload is the default command that many would use if they have Nvidia Prime. Comes from github.com/NixOS/nixos-hardware (very popular for laptop users) May help to reference that Nvidia Prime and/or those git pkgs.

@virchau13
Copy link
Owner

I'm trying to reformat these commands, and I'm not so sure that --precision full --no-half is required. Does it work on your laptop if you use NO_TCMALLOC=True nvidia-offload bash ./webui.sh --skip-torch-cuda-test?

@justingilpin
Copy link
Author

justingilpin commented May 21, 2023 via email

@justingilpin
Copy link
Author

justingilpin commented May 22, 2023 via email

@virchau13
Copy link
Owner

Yeah, PRIME is a pain at the best of times.

I'm taking a look at the webui, and it seems to support selection of one among multiple graphics cards using --device-id. Can you try running the following and check if it works?

nix-shell
NO_TCMALLOC=True ./webui.sh --medvram --no-half --device-id 0 # The 'device-id' arg is the important bit here

If that doesn't work, can you post the output of the following Python code (inside the nix-shell)? This should list all available CUDA devices that PyTorch sees.

import torch
for i in range(torch.cuda.device_count()):
   print(i, ':', torch.cuda.get_device_properties(i).name)

@justingilpin
Copy link
Author

justingilpin commented May 22, 2023 via email

@justingilpin
Copy link
Author

justingilpin commented May 22, 2023 via email

@justingilpin
Copy link
Author

justingilpin commented May 22, 2023 via email

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