Skip to content

Commit

Permalink
Change false bool to string
Browse files Browse the repository at this point in the history
  • Loading branch information
Pikurrot committed Jul 11, 2024
1 parent e876f48 commit 2a9951f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ def enablePrint():

# ensure gpu_support has correct value
gpu_support, error = read_config_value("gpu_support")
if error or gpu_support not in (False, "cuda", "rocm"):
if gpu_support is False:
write_config_value("gpu_support", "false")
gpu_support = "false"
if error or gpu_support not in ("false", "cuda", "rocm"):
result = subprocess.run(["nvidia-smi"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
if result.returncode == 0:
write_config_value("gpu_support", "cuda")
Expand Down

0 comments on commit 2a9951f

Please sign in to comment.