Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeepSpeed windows install errors #6673

Open
xiezhipeng-git opened this issue Oct 27, 2024 · 10 comments
Open

DeepSpeed windows install errors #6673

xiezhipeng-git opened this issue Oct 27, 2024 · 10 comments
Assignees
Labels
install Installation and package dependencies windows

Comments

@xiezhipeng-git
Copy link

xiezhipeng-git commented Oct 27, 2024

os:windows cpu:13900ks and gpu:4090 torch:2.5.0-cuda
first try pip install with windows whl
get
ERROR: deepspeed-0.15.0-cp311-cp311-win_amd64.whl is not a supported wheel on this platform.

then try installl with source code
@loadams @jomayeri

PS D:\my\work\study\ai\DeepSpeed> python setup.py install
[2024-10-27 01:02:29,527] [INFO] [real_accelerator.py:219:get_accelerator] Setting ds_accelerator to cuda (auto detect)
Traceback (most recent call last):
File "D:\my\work\study\ai\DeepSpeed\setup.py", line 40, in
from op_builder import get_default_compute_capabilities, OpBuilder
File "D:\my\work\study\ai\DeepSpeed\op_builder_init_.py", line 18, in
import deepspeed.ops.op_builder # noqa: F401 # type: ignore
File "D:\my\work\study\ai\DeepSpeed\deepspeed_init_.py", line 25, in
from . import ops
File "D:\my\work\study\ai\DeepSpeed\deepspeed\ops_init_.py", line 11, in
from . import transformer
File "D:\my\work\study\ai\DeepSpeed\deepspeed\ops\transformer_init_.py", line 7, in
from .inference.config import DeepSpeedInferenceConfig
File "D:\my\work\study\ai\DeepSpeed\deepspeed\ops\transformer\inference_init_.py", line 7, in
from ....model_implementations.transformers.ds_transformer import DeepSpeedTransformerInference
File "D:\my\work\study\ai\DeepSpeed\deepspeed\model_implementations_init_.py", line 6, in
from .transformers.ds_transformer import DeepSpeedTransformerInference
File "D:\my\work\study\ai\DeepSpeed\deepspeed\model_implementations\transformers\ds_transformer.py", line 18, in
from deepspeed.ops.transformer.inference.triton.mlp import TritonMLP
File "D:\my\work\study\ai\DeepSpeed\deepspeed\ops\transformer\inference\triton_init_.py", line 10, in
from .ops import *
File "D:\my\work\study\ai\DeepSpeed\deepspeed\ops\transformer\inference\triton\ops.py", line 6, in
import deepspeed.ops.transformer.inference.triton.matmul_ext as matmul_ext
File "D:\my\work\study\ai\DeepSpeed\deepspeed\ops\transformer\inference\triton\matmul_ext.py", line 461, in
fp16_matmul = Fp16Matmul()
File "D:\my\work\study\ai\DeepSpeed\deepspeed\ops\transformer\inference\triton\matmul_ext.py", line 210, in init
class._read_autotune_table()
File "D:\my\work\study\ai\DeepSpeed\deepspeed\ops\transformer\inference\triton\matmul_ext.py", line 444, in _read_autotune_table
TritonMatmul._read_autotune_table(class.name + "_2d_kernel", class._2d_kernel)
File "D:\my\work\study\ai\DeepSpeed\deepspeed\ops\transformer\inference\triton\matmul_ext.py", line 165, in _read_autotune_table
cache_manager = AutotuneCacheManager(cache_key)
File "D:\my\work\study\ai\DeepSpeed\deepspeed\ops\transformer\inference\triton\matmul_ext.py", line 87, in init
TritonCacheDir.warn_if_nfs(self.cache_dir)
File "D:\my\work\study\ai\DeepSpeed\deepspeed\ops\transformer\inference\triton\matmul_ext.py", line 44, in warn_if_nfs
if is_nfs_path(cache_dir) and not TritonCacheDir._warning_printed:
File "D:\my\work\study\ai\DeepSpeed\deepspeed\ops\transformer\inference\triton\matmul_ext.py", line 27, in is_nfs_path
output = subprocess.check_output(['df', '-T', path], encoding='utf-8')
File "D:\my\env\python3.10.10\lib\subprocess.py", line 421, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "D:\my\env\python3.10.10\lib\subprocess.py", line 503, in run
with Popen(*popenargs, **kwargs) as process:
File "D:\my\env\python3.10.10\lib\subprocess.py", line 971, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "D:\my\env\python3.10.10\lib\subprocess.py", line 1440, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] 系统找不到指定的文件。
I have a similar problem.

Originally posted by @xiezhipeng-git in #6625

@xiezhipeng-git
Copy link
Author

xiezhipeng-git commented Oct 27, 2024

need change code in deepspeed/init.py file

from . import ops
from . import module_inject

to

from deepspeed import ops
from deepspeed import module_inject

then
change deepspeed\ops\transformer\inference\triton\matmul_ext.py

def is_nfs_path(path):
    # Normalize the path to get the absolute path
    path = os.path.abspath(path)

    if platform.system() == "Windows":
        # 在 Windows 上不执行 df 命令,直接返回 False
        return False
    else:
        # Use the 'df' command to find the file system type for the given path
        try:
            output = subprocess.check_output(['df', '-T', path], encoding='utf-8')
        except subprocess.CalledProcessError:
            return False  # Command failed

        # Process the output of 'df -T' to check for 'nfs' in the filesystem type column
        lines = output.strip().split('\n')
        if len(lines) > 1:  # The first line is headers
            fs_type = lines[1].split()[1].lower()  # File system type is the second column
            return 'nfs' in fs_type
        return False

then new error

Using d:\my\env\python3.10.10\lib\site-packages
Finished processing dependencies for deepspeed==0.15.4+unknown
deepspeed build time = 14.176020860671997 secs
Exception ignored in atexit callback: <function matmul_ext_update_autotune_table at 0x00000199AAC5E830>
Traceback (most recent call last):
  File "D:\my\work\study\ai\DeepSpeed\deepspeed\ops\transformer\inference\triton\matmul_ext.py", line 481, in matmul_ext_update_autotune_table
    fp16_matmul._update_autotune_table()
  File "D:\my\work\study\ai\DeepSpeed\deepspeed\ops\transformer\inference\triton\matmul_ext.py", line 458, in _update_autotune_table
    TritonMatmul._update_autotune_table(__class__.__name__ + "_2d_kernel", __class__._2d_kernel)
  File "D:\my\work\study\ai\DeepSpeed\deepspeed\ops\transformer\inference\triton\matmul_ext.py", line 187, in _update_autotune_table
    cache_manager.put(autotune_table)
  File "D:\my\work\study\ai\DeepSpeed\deepspeed\ops\transformer\inference\triton\matmul_ext.py", line 106, in put
    os.rename(self.file_path + ".tmp", self.file_path)
FileExistsError: [WinError 183] 当文件已存在时,无法创建该文件。: 'C:\\Users\\Admin\\.triton\\autotune\\Fp16Matmul_2d_kernel.pickle.tmp' -> 'C:\\Users\\Admin\\.triton\\autotune\\Fp16Matmul_2d_kernel.pickle'

then
skip copy

    # def put(self, table):
    #     if self.file_path:
    #         assert self.lock_path is not None
    #         with FileLock(self.lock_path):
    #             with open(self.file_path + ".tmp", 'wb') as handle:
    #                 pickle.dump(table, handle)
    #             os.rename(self.file_path + ".tmp", self.file_path)
    def put(self, table):
        if self.file_path:
            assert self.lock_path is not None
            with FileLock(self.lock_path):
                with open(self.file_path + ".tmp", 'wb') as handle:
                    pickle.dump(table, handle)
                if not os.path.exists(self.file_path):
                    os.rename(self.file_path + ".tmp", self.file_path)
                else:
                    os.remove(self.file_path + ".tmp")  # 删除临时文件

then run .\build_win.bat

then

D:\my\env\python3.10.10\lib\site-packages\torch\utils\cpp_extension.py:382: UserWarning: Error checking compiler version for cl: [WinError 2] 系统找不到指定的文件。
  warnings.warn(f'Error checking compiler version for {compiler}: {error}')
D:\my\env\python3.10.10\lib\site-packages\torch\utils\cpp_extension.py:416: UserWarning: The detected CUDA version (12.5) has a minor version mismatch with the version that was used to compile PyTorch (12.4). Most likely this shouldn't be a problem.
  warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
building 'deepspeed.ops.adam.fused_adam_op' extension
creating build\temp.win-amd64-cpython-310
creating build\temp.win-amd64-cpython-310\Release
creating build\temp.win-amd64-cpython-310\Release\csrc
creating build\temp.win-amd64-cpython-310\Release\csrc\adam
cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -ID:\my\work\study\ai\DeepSpeed\csrc\includes -ID:\my\work\study\ai\DeepSpeed\csrc\adam -ID:\my\env\python3.10.10\lib\site-packages\torch\include -ID:\my\env\python3.10.10\lib\site-packages\torch\include\torch\csrc\api\include -ID:\my\env\python3.10.10\lib\site-packages\torch\include\TH -ID:\my\env\python3.10.10\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.5\include" -ID:\my\env\python3.10.10\include -ID:\my\env\python3.10.10\Include /EHsc /Tpcsrc/adam/fused_adam_frontend.cpp /Fobuild\temp.win-amd64-cpython-310\Release\csrc/adam/fused_adam_frontend.obj /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /wd4624 /wd4067 /wd4068 /EHsc -O2 -DVERSION_GE_1_1 -DVERSION_GE_1_3 -DVERSION_GE_1_5 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=fused_adam_op -D_GLIBCXX_USE_CXX11_ABI=0 /std:c++17
error: command 'cl.exe' failed: None

add cl.exe to env path


LINK : fatal error LNK1181: 无法打开输入文件“aio.lib”
LINK : fatal error LNK1181: 无法打开输入文件“cufile.lib”
LINK : fatal error LNK1181: 无法打开输入文件“aio.lib”
...
running build_ext
D:\my\env\python3.10.10\lib\site-packages\torch\utils\cpp_extension.py:416: UserWarning: The detected CUDA version (12.5) has a minor version mismatch with the version that was used to compile PyTorch (12.4). Most likely this shouldn't be a problem.
  warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
building 'deepspeed.ops.adam.fused_adam_op' extension
"D:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\bin\Hostx64\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -ID:\my\work\study\ai\DeepSpeed\csrc\includes -ID:\my\work\study\ai\DeepSpeed\csrc\adam -ID:\my\env\python3.10.10\lib\site-packages\torch\include -ID:\my\env\python3.10.10\lib\site-packages\torch\include\torch\csrc\api\include -ID:\my\env\python3.10.10\lib\site-packages\torch\include\TH -ID:\my\env\python3.10.10\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.5\include" -ID:\my\env\python3.10.10\include -ID:\my\env\python3.10.10\Include /EHsc /Tpcsrc/adam/fused_adam_frontend.cpp /Fobuild\temp.win-amd64-cpython-310\Release\csrc/adam/fused_adam_frontend.obj /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /wd4624 /wd4067 /wd4068 /EHsc -O2 -DVERSION_GE_1_1 -DVERSION_GE_1_3 -DVERSION_GE_1_5 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=fused_adam_op -D_GLIBCXX_USE_CXX11_ABI=0 /std:c++17
fused_adam_frontend.cpp
D:\my\env\python3.10.10\lib\site-packages\torch\include\c10/core/DeviceType.h(10): fatal error C1083: 无法打开包括文件: “cstddef”: No such file or directory
error: command 'D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\Hostx64\\x64\\cl.exe' failed with exit code 2

@loadams
Is it torch error?

@loadams
Copy link
Contributor

loadams commented Oct 28, 2024

@xiezhipeng-git - For the reason why installing the whl is failing, can you please share the python version that you are using as well? The reason you are getting the "unsupported on this platform" error is because the whl must be built with a specific python/cuda, and if you aren't using the versions we used to build it, you will get this error.

@loadams loadams changed the title windows install deepspeed has very more issue. DeepSpeed windows install errors Oct 28, 2024
@xiezhipeng-git
Copy link
Author

xiezhipeng-git commented Oct 29, 2024

@loadams
No wsl, direct windows install.
BTW, there are so many bugs in this that changing the code I wrote would make it compatible with windows linux.The ones I changed you will need to change in a new version.
PyTorch version: 2.5.0+cu124
python 3.10.10

@loadams
Copy link
Contributor

loadams commented Oct 29, 2024

@xiezhipeng-git - are you trying to install the whl or install from source? Since your original post mentions installing the whl. If you want to do that, the whl is built with python 3.11 only, this means you need switch to python 3.11 to use it. We are working on getting more python whls published, but for now we only have one supporting 3.11, that's why you got this error. Switching to python 3.11 will resolve this.

ERROR: deepspeed-0.15.0-cp311-cp311-win_amd64.whl is not a supported wheel on this platform

@loadams loadams added the install Installation and package dependencies label Nov 1, 2024
@FurkanGozukara
Copy link

FurkanGozukara commented Nov 12, 2024

why python 3.10 is not supported @loadams ? it is still massively used

even kaggle google colab still python 3.10

@loadams
Copy link
Contributor

loadams commented Nov 12, 2024

@FurkanGozukara - python 3.10 is supported for building from source. We haven't published a Windows whl with that version yet since we need to support a large matrix of cuda/torch/python versions but we hope to publish a 3.10 whl soon.

@rsxdalv
Copy link

rsxdalv commented Nov 13, 2024

copying deepspeed\inference\v2\kernels\core_ops\core_ops.cpp -> build\lib.win-amd64-cpython-310\deepspeed\inference\v2\kernels\core_ops
copying deepspeed\inference\v2\kernels\core_ops\bias_activations\bias_activation.cpp -> build\lib.win-amd64-cpython-310\deepspeed\inference\v2\kernels\core_ops\bias_activations
copying deepspeed\inference\v2\kernels\core_ops\bias_activations\bias_activation_cuda.cu -> build\lib.win-amd64-cpython-310\deepspeed\inference\v2\kernels\core_ops\bias_activations
copying deepspeed\inference\v2\kernels\core_ops\cuda_layer_norm\layer_norm.cpp -> build\lib.win-amd64-cpython-310\deepspeed\inference\v2\kernels\core_ops\cuda_layer_norm
copying deepspeed\inference\v2\kernels\core_ops\cuda_layer_norm\layer_norm_cuda.cu -> build\lib.win-amd64-cpython-310\deepspeed\inference\v2\kernels\core_ops\cuda_layer_norm
copying deepspeed\inference\v2\kernels\core_ops\cuda_linear\linear_kernels.cpp -> build\lib.win-amd64-cpython-310\deepspeed\inference\v2\kernels\core_ops\cuda_linear
copying deepspeed\inference\v2\kernels\core_ops\cuda_linear\linear_kernels_cuda.cu -> build\lib.win-amd64-cpython-310\deepspeed\inference\v2\kernels\core_ops\cuda_linear
copying deepspeed\inference\v2\kernels\core_ops\cuda_rms_norm\rms_norm.cpp -> build\lib.win-amd64-cpython-310\deepspeed\inference\v2\kernels\core_ops\cuda_rms_norm
copying deepspeed\inference\v2\kernels\core_ops\cuda_rms_norm\rms_norm_cuda.cu -> build\lib.win-amd64-cpython-310\deepspeed\inference\v2\kernels\core_ops\cuda_rms_norm
copying deepspeed\inference\v2\kernels\core_ops\gated_activations\gated_activation_kernels.cpp -> build\lib.win-amd64-cpython-310\deepspeed\inference\v2\kernels\core_ops\gated_activations
copying deepspeed\inference\v2\kernels\core_ops\gated_activations\gated_activation_kernels_cuda.cu -> build\lib.win-amd64-cpython-310\deepspeed\inference\v2\kernels\core_ops\gated_activations
copying deepspeed\ops\sparse_attention\trsrc\matmul.tr -> build\lib.win-amd64-cpython-310\deepspeed\ops\sparse_attention\trsrc
copying deepspeed\ops\sparse_attention\trsrc\softmax_bwd.tr -> build\lib.win-amd64-cpython-310\deepspeed\ops\sparse_attention\trsrc
copying deepspeed\ops\sparse_attention\trsrc\softmax_fwd.tr -> build\lib.win-amd64-cpython-310\deepspeed\ops\sparse_attention\trsrc
running build_ext
building 'deepspeed.ops.adam.fused_adam_op' extension
"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\admin\Desktop\one-click-installers-tts-main\tts-generation-webui\temp\DeepSpeed\csrc\includes -IC:\Users\admin\Desktop\one-click-installers-tts-main\tts-generation-webui\temp\DeepSpeed\csrc\adam -IC:\Users\admin\Desktop\one-click-installers-tts-main\tts-generation-webui\installer_files\env\lib\site-packages\torch\include -IC:\Users\admin\Desktop\one-click-installers-tts-main\tts-generation-webui\installer_files\env\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\admin\Desktop\one-click-installers-tts-main\tts-generation-webui\installer_files\env\lib\site-packages\torch\include\TH -IC:\Users\admin\Desktop\one-click-installers-tts-main\tts-generation-webui\installer_files\env\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\include" -IC:\Users\admin\Desktop\one-click-installers-tts-main\tts-generation-webui\installer_files\env\include -IC:\Users\admin\Desktop\one-click-installers-tts-main\tts-generation-webui\installer_files\env\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\cppwinrt" /EHsc /Tpcsrc/adam/fused_adam_frontend.cpp /Fobuild\temp.win-amd64-cpython-310\Release\csrc/adam/fused_adam_frontend.obj /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /wd4624 /wd4067 /wd4068 /EHsc -O2 -DVERSION_GE_1_1 -DVERSION_GE_1_3 -DVERSION_GE_1_5 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=fused_adam_op -D_GLIBCXX_USE_CXX11_ABI=0 /std:c++17
fused_adam_frontend.cpp
"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin\nvcc" -c csrc/adam/multi_tensor_adam.cu -o build\temp.win-amd64-cpython-310\Release\csrc/adam/multi_tensor_adam.obj -IC:\Users\admin\Desktop\one-click-installers-tts-main\tts-generation-webui\temp\DeepSpeed\csrc\includes -IC:\Users\admin\Desktop\one-click-installers-tts-main\tts-generation-webui\temp\DeepSpeed\csrc\adam -IC:\Users\admin\Desktop\one-click-installers-tts-main\tts-generation-webui\installer_files\env\lib\site-packages\torch\include -IC:\Users\admin\Desktop\one-click-installers-tts-main\tts-generation-webui\installer_files\env\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\admin\Desktop\one-click-installers-tts-main\tts-generation-webui\installer_files\env\lib\site-packages\torch\include\TH -IC:\Users\admin\Desktop\one-click-installers-tts-main\tts-generation-webui\installer_files\env\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\include" -IC:\Users\admin\Desktop\one-click-installers-tts-main\tts-generation-webui\installer_files\env\include -IC:\Users\admin\Desktop\one-click-installers-tts-main\tts-generation-webui\installer_files\env\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\cppwinrt" -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4068 -Xcompiler /wd4067 -Xcompiler /wd4624 -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -O3 -DVERSION_GE_1_1 -DVERSION_GE_1_3 -DVERSION_GE_1_5 -allow-unsupported-compiler -lineinfo --use_fast_math -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_61,code=sm_61 -gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_80,code=sm_80 -gencode=arch=compute_86,code=sm_86 -gencode=arch=compute_90,code=sm_90 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=fused_adam_op -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17 --use-local-env
multi_tensor_adam.cu
C:\Users\admin\Desktop\one-click-installers-tts-main\tts-generation-webui\installer_files\env\Library\usr\bin\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Users\admin\Desktop\one-click-installers-tts-main\tts-generation-webui\installer_files\env\lib\site-packages\torch\lib "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\lib\x64" /LIBPATH:C:\Users\admin\Desktop\one-click-installers-tts-main\tts-generation-webui\installer_files\env\libs /LIBPATH:C:\Users\admin\Desktop\one-click-installers-tts-main\tts-generation-webui\installer_files\env /LIBPATH:C:\Users\admin\Desktop\one-click-installers-tts-main\tts-generation-webui\installer_files\env\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64" cublas.lib curand.lib c10.lib torch.lib torch_cpu.lib torch_python.lib cudart.lib c10_cuda.lib torch_cuda.lib /EXPORT:PyInit_fused_adam_op build\temp.win-amd64-cpython-310\Release\csrc/adam/fused_adam_frontend.obj build\temp.win-amd64-cpython-310\Release\csrc/adam/multi_tensor_adam.obj /OUT:build\lib.win-amd64-cpython-310\deepspeed\ops\adam\fused_adam_op.cp310-win_amd64.pyd /IMPLIB:build\temp.win-amd64-cpython-310\Release\csrc/adam\fused_adam_op.cp310-win_amd64.lib
/usr/bin/link: extra operand '/LTCG'

It might be supported, but it does not build

torch==2.3.1+cu118
Windows 10
CUDA 11.8
MSVC: Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30157 for x64 (2019 for CUDA 11.8)
Python: 3.10.11

@rsxdalv
Copy link

rsxdalv commented Nov 13, 2024

Note - the link error happens because a cygwin installation can interfere with MSVC which can be seen by doing "where.exe link" and checking if there is a non MSVC result on top. The fix should be to modify path such that MSVC comes before cygwin/conda.

Also, in order to compile this on Windows you will need the correct MSVC + CUDA + PyTorch.

@loadams
Copy link
Contributor

loadams commented Nov 15, 2024

Hi @rsxdalv - that's correct, the correct MSVC + CUDA + PyTorch is very important. And having cygwin installed makes sense that could interfere. Were you able to get it to build after you modified the path to MSVC to be first?

@rsxdalv
Copy link

rsxdalv commented Nov 15, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
install Installation and package dependencies windows
Projects
None yet
Development

No branches or pull requests

4 participants