Skip to content

Commit

Permalink
Merge pull request vllm-project#9 from ri938/organise
Browse files Browse the repository at this point in the history
dont error if user doesnt have kernels installed
  • Loading branch information
ri938 authored Aug 24, 2023
2 parents 2617c55 + 5fcc1c4 commit 010b5bc
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions vllm/model_executor/layers/quant.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@


try:
import awq_inference_engine # with CUDA kernels
import awq_inference_engine
KERNELS_INSTALLED = True
except ImportError as ex:
raise ImportError(
"Unable to import awq_inference_engine: run setup.py"
" to install AWQ CUDA kernels")
KERNELS_INSTALLED = False


class ScaledActivation(nn.Module):
Expand All @@ -34,6 +33,11 @@ def __init__(
):
super().__init__()

if not KERNELS_INSTALLED:
raise ImportError(
"Unable to import awq_ext: run setup.py"
" to install AWQ CUDA kernels")

if w_bit not in [4]:
raise NotImplementedError("Only 4-bit are supported for now.")

Expand Down

0 comments on commit 010b5bc

Please sign in to comment.