diff --git a/src/brevitas/graph/gptq.py b/src/brevitas/graph/gptq.py index 716f2fb04..8f8ffb6ae 100644 --- a/src/brevitas/graph/gptq.py +++ b/src/brevitas/graph/gptq.py @@ -11,7 +11,12 @@ import warnings import torch -from torch.linalg import LinAlgError + +try: + from torch.linalg import LinAlgError +except: + LinAlgError = RuntimeError + import unfoldNd from brevitas.graph.calibrate import DisableEnableQuantization