"git@developer.sourcefind.cn:change/sglang.git" did not exist on "286e6540a6efe9a838b2dee8f41e139a55084d77"
Commit e83d4177 authored by moto's avatar moto Committed by Facebook GitHub Bot
Browse files

Allow whitespace as TORCH_CUDA_ARCH_LIST delimiter (#2050)

Summary:
Resolves https://github.com/pytorch/audio/issues/2049, https://github.com/pytorch/audio/issues/1940

Pull Request resolved: https://github.com/pytorch/audio/pull/2050

Reviewed By: nateanl

Differential Revision: D32712513

Pulled By: mthrok

fbshipit-source-id: e1db81786bcca67605ff765d27e0527e20967d1c
parent fce431cd
...@@ -101,7 +101,7 @@ class CMakeBuild(build_ext): ...@@ -101,7 +101,7 @@ class CMakeBuild(build_ext):
if _TORCH_CUDA_ARCH_LIST is not None: if _TORCH_CUDA_ARCH_LIST is not None:
# Convert MAJOR.MINOR[+PTX] list to new style one # Convert MAJOR.MINOR[+PTX] list to new style one
# defined at https://cmake.org/cmake/help/latest/prop_tgt/CUDA_ARCHITECTURES.html # defined at https://cmake.org/cmake/help/latest/prop_tgt/CUDA_ARCHITECTURES.html
_arches = _TORCH_CUDA_ARCH_LIST.replace('.', '').split(";") _arches = _TORCH_CUDA_ARCH_LIST.replace('.', '').replace(' ', ';').split(";")
_arches = [arch[:-4] if arch.endswith("+PTX") else f"{arch}-real" for arch in _arches] _arches = [arch[:-4] if arch.endswith("+PTX") else f"{arch}-real" for arch in _arches]
cmake_args += [f"-DCMAKE_CUDA_ARCHITECTURES={';'.join(_arches)}"] cmake_args += [f"-DCMAKE_CUDA_ARCHITECTURES={';'.join(_arches)}"]
......
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