We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0a4457c commit 55b4caeCopy full SHA for 55b4cae
op_builder/gds.py
@@ -36,7 +36,13 @@ def extra_ldflags(self):
36
return super().extra_ldflags() + ['-lcufile']
37
38
def is_compatible(self, verbose=False):
39
- import torch.utils.cpp_extension
+ try:
40
+ import torch.utils.cpp_extension
41
+ except ImportError:
42
+ if verbose:
43
+ self.warning("Please install torch if trying to pre-compile GDS")
44
+ return False
45
+
46
CUDA_HOME = torch.utils.cpp_extension.CUDA_HOME
47
CUDA_LIB64 = os.path.join(CUDA_HOME, "lib64")
48
gds_compatible = self.has_function(funcname="cuFileDriverOpen",
0 commit comments