Skip to content

Commit 37c2872

Browse files
Copilotmeizhong986
andcommitted
Improve CUDA version conversion comment clarity
Co-authored-by: meizhong986 <148393222+meizhong986@users.noreply.github.com>
1 parent 969be32 commit 37c2872

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

whisperjav/utils/preflight_check.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,9 @@ def _check_pytorch_cuda(self):
150150
runtime_cuda = torch.version.cuda
151151

152152
# Convert compiled_cuda integer to version string for comparison
153-
# compiled_cuda is an integer like 12090 representing version 12.0.90
154-
# runtime_cuda is a string like "12.9"
153+
# compiled_cuda is an integer like 12090 representing CUDA 12.9.0
154+
# We extract major.minor (12.9) to match runtime_cuda format (string "12.9")
155+
# Note: Patch version is intentionally truncated as runtime_cuda doesn't include it
155156
if isinstance(compiled_cuda, int):
156157
major = compiled_cuda // 1000
157158
minor = (compiled_cuda % 1000) // 10

0 commit comments

Comments
 (0)