diff --git a/docs/source/notes/windows.rst b/docs/source/notes/windows.rst index d8648b33f9a..428932b7ec7 100644 --- a/docs/source/notes/windows.rst +++ b/docs/source/notes/windows.rst @@ -113,9 +113,7 @@ This type of extension has better support compared with the previous one. However, it still needs some manual configuration. First, you should open the **x86_x64 Cross Tools Command Prompt for VS 2017**. -And then, you can open the Git-Bash in it. It is -usually located in ``C:\Program Files\Git\git-bash.exe``. -Finally, you can start your compiling process. +And then, you can start your compiling process. Installation ------------ diff --git a/test/run_test.py b/test/run_test.py index 6e91b38ea31..c82fa31776d 100644 --- a/test/run_test.py +++ b/test/run_test.py @@ -404,9 +404,8 @@ def get_selected_tests(options): selected_tests = exclude_tests(options.exclude, selected_tests) if sys.platform == 'win32' and not options.ignore_win_blacklist: - ostype = os.environ.get('MSYSTEM') target_arch = os.environ.get('VSCMD_ARG_TGT_ARCH') - if ostype != 'MINGW64' or target_arch != 'x64': + if target_arch != 'x64': WINDOWS_BLACKLIST.append('cpp_extensions') selected_tests = exclude_tests(WINDOWS_BLACKLIST, selected_tests, 'on Windows') diff --git a/torch/utils/cpp_extension.py b/torch/utils/cpp_extension.py index 86175b60a00..801c3c0f2f3 100644 --- a/torch/utils/cpp_extension.py +++ b/torch/utils/cpp_extension.py @@ -318,7 +318,7 @@ class BuildExtension(build_ext, object): '/wd4819', '-Xcompiler', '/MD' ] + include_list + cflags elif isinstance(self.cflags, dict): - cflags = self.cflags['cxx'] + cflags = self.cflags['cxx'] + ['/MD'] cmd += cflags elif isinstance(self.cflags, list): cflags = self.cflags