Unverified Commit e58294dd authored by JGSweets's avatar JGSweets Committed by GitHub
Browse files

[Bugfix] Add verbose error if scipy is missing for blocksparse attention (#5695)

parent f1e15da6
...@@ -6,7 +6,14 @@ from functools import lru_cache ...@@ -6,7 +6,14 @@ from functools import lru_cache
import torch import torch
import triton import triton
from scipy import sparse
try:
from scipy import sparse
except ImportError as err:
raise ImportError("Please install scipy via "
"`pip install scipy` to use "
"BlockSparseAttention in "
"models such as Phi-3.") from err
def dense_to_crow_col(x: torch.Tensor): def dense_to_crow_col(x: torch.Tensor):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment