Windows build error
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 9k
- Forks
- 1.5k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 3
Description
I don't know why the error happened.
Here is the error description:
C:\Users\wangxin\anaconda3\envs\vpred\lib\site-packages\torch\include\torch\csrc\api\include\torch/torch.h(8): warning C4010: single-line comment contains line-continuation character
csrc/mlp.cpp(57): warning C4244: 'argument': conversion from 'int64_t' to 'int', possible loss of data
csrc/mlp.cpp(60): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
csrc/mlp.cpp(60): warning C4244: 'argument': conversion from 'int64_t' to 'int', possible loss of data
csrc/mlp.cpp(88): error C2275: 'scalar_t': illegal use of this type as an expression
csrc/mlp.cpp(88): note: see declaration of 'scalar_t'
csrc/mlp.cpp(88): error C2059: syntax error: ')'
csrc/mlp.cpp(67): warning C4996: 'detail::scalar_type': was declared deprecated
C:\Users\wangxin\anaconda3\envs\vpred\lib\site-packages\torch\include\ATen/Dispatch.h(47): note: see declaration of 'detail::scalar_type'
csrc/mlp.cpp(115): warning C4244: 'argument': conversion from 'int64_t' to 'int', possible loss of data
csrc/mlp.cpp(158): error C2275: 'scalar_t': illegal use of this type as an expression
csrc/mlp.cpp(158): note: see declaration of 'scalar_t'
csrc/mlp.cpp(158): error C2059: syntax error: ')'
csrc/mlp.cpp(158): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
csrc/mlp.cpp(158): warning C4244: 'argument': conversion from 'int64_t' to 'int', possible loss of data
csrc/mlp.cpp(124): warning C4996: 'detail::scalar_type': was declared deprecated
C:\Users\wangxin\anaconda3\envs\vpred\lib\site-packages\torch\include\ATen/Dispatch.h(47): note: see declaration of 'detail::scalar_type'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "C:\Users\wangxin\anaconda3\envs\vpred\lib\site-packages\colorama\ansitowin32.py", line 59, in closed
return stream.closed
ValueError: underlying buffer has been detached
Running setup.py install for apex ... error
ERROR: Command errored out with exit status 1: 'C:\Users\wangxin\anaconda3\envs\vpred\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\wangxin\AppData\Local\Temp\pip-req-build-cuvjvz_r\setup.py'"'"'; file='"'"'C:\Users\wangxin\AppData\Local\Temp\pip-req-build-cuvjvz_r\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' --cpp_ext --cuda_ext install --record 'C:\Users\wangxin\AppData\Local\Temp\pip-record-bfja18za\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\wangxin\anaconda3\envs\vpred\Include\apex' Check the logs for full command output.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with csrc/mlp.cpp at the reported errors on lines 88 and 158, then inspect the setup.py install command using the Windows MSVC compiler. Reproduce the --cpp_ext --cuda_ext installation and determine what is required for the Apex build to complete successfully on Windows.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100