Skip to content

Commit

Permalink
Avoid gds build errors on ROCm (#6456)
Browse files Browse the repository at this point in the history
This PR is to avoid the below error during DeepSpeed build on ROCm. The
error is because of the incompatibility of GDSBuilder extension on ROCm.

```
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-lv1v39xc/setup.py", line 180, in <module>
        op_compatible = builder.is_compatible()
      File "/tmp/pip-req-build-lv1v39xc/op_builder/gds.py", line 47, in is_compatible
        CUDA_LIB64 = os.path.join(CUDA_HOME, "lib64")
      File "/opt/conda/envs/py_3.9/lib/python3.9/posixpath.py", line 76, in join
        a = os.fspath(a)
    TypeError: expected str, bytes or os.PathLike object, not NoneType
    Total number of unsupported CUDA function calls: 0


    Total number of replaced kernel launches: 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output
```

cc: @jithunnair-amd

---------

Co-authored-by: Logan Adams <[email protected]>
  • Loading branch information
rraminen and loadams authored Aug 29, 2024
1 parent 0cd9bf5 commit a7ffe54
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions op_builder/gds.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ def extra_ldflags(self):
return super().extra_ldflags() + ['-lcufile']

def is_compatible(self, verbose=False):
if self.is_rocm_pytorch():
if verbose:
self.warning(f'{self.NAME} is not compatible with ROCM')
return False

try:
import torch.utils.cpp_extension
except ImportError:
Expand Down

0 comments on commit a7ffe54

Please sign in to comment.