Skip to content

Commit

Permalink
[Bugfix] Fix the fp8 kv_cache check error that occurs when failing to…
Browse files Browse the repository at this point in the history
… obtain the CUDA version. (vllm-project#4173)

Signed-off-by: AnyISalIn <[email protected]>
  • Loading branch information
AnyISalIn authored and dtrifiro committed May 7, 2024
1 parent e6f4756 commit 3e2c2dc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vllm/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ def _verify_cache_dtype(self) -> None:
elif self.cache_dtype == "fp8":
if not is_hip():
nvcc_cuda_version = get_nvcc_cuda_version()
if nvcc_cuda_version < Version("11.8"):
if nvcc_cuda_version is not None \
and nvcc_cuda_version < Version("11.8"):
raise ValueError(
"FP8 is not supported when cuda version is"
"lower than 11.8.")
Expand Down

0 comments on commit 3e2c2dc

Please sign in to comment.