зеркало из https://github.com/microsoft/DeepSpeed.git
add pip install cutlass version check (#6393)
fix this issue: https://github.com/microsoft/DeepSpeed/issues/6006 cc. @tjruwase
This commit is contained in:
Родитель
0f0f231e8a
Коммит
51da191eb5
|
@ -52,11 +52,27 @@ class EvoformerAttnBuilder(CUDAOpBuilder):
|
|||
if verbose:
|
||||
self.warning("Please specify the CUTLASS repo directory as environment variable $CUTLASS_PATH")
|
||||
return False
|
||||
with open(f'{self.cutlass_path}/CHANGELOG.md', 'r') as f:
|
||||
if '3.1.0' not in f.read():
|
||||
if os.path.exists(f'{self.cutlass_path}/CHANGELOG.md'):
|
||||
with open(f'{self.cutlass_path}/CHANGELOG.md', 'r') as f:
|
||||
if '3.1.0' not in f.read():
|
||||
if verbose:
|
||||
self.warning("Please use CUTLASS version >= 3.1.0")
|
||||
return False
|
||||
else:
|
||||
# pip install nvidia-cutlass package
|
||||
try:
|
||||
import cutlass
|
||||
except ImportError:
|
||||
if verbose:
|
||||
self.warning("Please pip install nvidia-cutlass if trying to pre-compile kernels")
|
||||
return False
|
||||
cutlass_major, cutlass_minor = cutlass.__version__.split('.')[:2]
|
||||
cutlass_compatible = (int(cutlass_major) >= 3 and int(cutlass_minor) >= 1)
|
||||
if not cutlass_compatible:
|
||||
if verbose:
|
||||
self.warning("Please use CUTLASS version >= 3.1.0")
|
||||
return False
|
||||
|
||||
cuda_okay = True
|
||||
if not self.is_rocm_pytorch() and torch.cuda.is_available(): #ignore-cuda
|
||||
sys_cuda_major, _ = installed_cuda_version()
|
||||
|
|
Загрузка…
Ссылка в новой задаче