File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 2222from setuptools .command .build_ext import build_ext
2323from pkg_resources import packaging # type: ignore
2424
25- BUILD_SPLIT_CUDA = os .getenv ('BUILD_SPLIT_CUDA' )
2625IS_WINDOWS = sys .platform == 'win32'
2726LIB_EXT = '.pyd' if IS_WINDOWS else '.so'
2827EXEC_EXT = '.exe' if IS_WINDOWS else ''
28+ CLIB_PREFIX = '' if IS_WINDOWS else 'lib'
29+ CLIB_EXT = '.dll' if IS_WINDOWS else '.so'
2930SHARED_FLAG = '/DLL' if IS_WINDOWS else '-shared'
3031
3132_HERE = os .path .abspath (__file__ )
3233_TORCH_PATH = os .path .dirname (os .path .dirname (_HERE ))
3334TORCH_LIB_PATH = os .path .join (_TORCH_PATH , 'lib' )
3435
36+
37+ BUILD_SPLIT_CUDA = os .getenv ('BUILD_SPLIT_CUDA' ) or (os .path .exists (os .path .join (
38+ TORCH_LIB_PATH , f'{ CLIB_PREFIX } torch_cuda_cu{ CLIB_EXT } ' )) and os .path .exists (os .path .join (TORCH_LIB_PATH , f'{ CLIB_PREFIX } torch_cuda_cpp{ CLIB_EXT } ' )))
39+
3540# Taken directly from python stdlib < 3.9
3641# See https://github.com/pytorch/pytorch/issues/48617
3742def _nt_quote_args (args : Optional [List [str ]]) -> List [str ]:
You can’t perform that action at this time.
0 commit comments