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
C1002 error when building on Windows 10 64 bit, with vs 2017 #11096
Comments
My computer has 16 GB of memory, and during the course of the compilation, the memory usage is below 55%. |
Edit: Misread and thought this was CUDA related. However the builds below should still be valid. Additionally I also provide builds from my repo aluo-x/tensorflow_windows |
@mrry, could you take a quick look? |
HI @davidshen84 , This may or may not help you. I've encountered several heap errors with VS2015 when trying to build tensorflow. The problem was that I was using the 32bits compiler instead of the 64bits one. This is mentioned as one of the first step in You can easily check by looking at the Task Manager when compiling. In Windows 10, go to the Details tab and add the Platform column. See if the CL.EXE instances are 32bits or 64bits. In order to use the 64bits CL.EXE, I had to start MSBUILD on the command line via "VS2015 x64 Native Tools Command Prompt". I haven't tried VS2017 yet, but have a look at "x64 Native Tools Command Prompt for VS 2017" in your start menu. Tell us if that works. PS. I am now stuck with the CUDA compiler error mentioned above by @aluo-x. |
I am sure I was using the Native 64 Command Tools. I also double confirmed by:
More over, I used the Visual Studio 15 2017 Win64 cmake generator. I think the compilation process won't be able to start if the compiler is 32 bit. Thanks. |
I tried not using SIMD options, and I still get similar errors
Maybe it is a problem with vs 2017 compiler, not with tensorflow code? |
So after testing my successful CPU only AVX enabled build using VS 2015, I have found that it is seriously broken. Specifically I believe there is something with batchnorm. There is a discussion here. Tensorflow throws errors in a number of different ways non-deterministically. The exact same code runs fine with batchnorm removed, or with the batchnorm layer but on a stock build. Extra note, my CPU only builds are built using unmodified code, unlike my GPU builds which contain modifications to work around the imaginary number error. |
I just tried building with VS 2015, got the same error...maybe it is the master branch that is broken? I will try tag v1.2. |
Finally, I got the build pass. I think the problem is not related to the I guess some of the unit tests are really complicate and relies on features only available on gcc. It would be nice to verify the build with unit test on Windows, but I do not think it is of high priority. :) |
@davidshen84 Could you try running the code I linked to here, but with the batch norm layer. My builds were successful, but did not have correct behavior when running batch norm. |
@aluo-x , I uncommented your code and used
The training is slow, but no error so far. But in terms of normalization, I think you should have a separated step to normalize all your data at once and save it some where; then use the normalized data, rather than normalize the data as they are loaded. |
The code was meant to be a functional test. Could you give the full configuration for your build? VS version, python version, commands used etc. |
VS version
cmake command
python version
Command used to build
After that, I created a python virtual environment and installed the output |
Thank you so much. The CPU AVX build using VS2017 and Python 3.5.3 from Anaconda seems to working fine. MSVC failed a few times with C1060 out of heap space, consistently with cwise_op_*, but eventually it worked. GPU + AVX build is still failing with VS 2017 with internal compiler errors (compared to VS 2015 which created partially functional builds). Edit: |
@aluo-x In the link you given, you use |
To clarify I am using VS 2017. The CPU build failed the first few times but eventually worked. GPU version is still not working (either internal compiler error or 2nd pass out of heap space). In contrast to VS 2015, where both the CPU and GPU version were able to be built without error first go. |
I followed the steps by @davidshen84 with a few differences:
|
@kalengi Did you successfully build the CPU-only version? Did you try building the GPU-version? |
I built the CPU-only version successfully on Windows 7. Haven't tried building the GPU version yet. |
@aluo-x Building GPU version is not working for me as well. Did you have any solutions? |
Did anyone has similar error messages? |
@chrisplyn I did not attempt a build of 1.3.0 because #11865 never got a reply. I will try again once 1.4.0 gets released with cudnn 7 compatibility. |
@aluo-x I can't even build the CPU version with AVX enable, do you know what might cause that? |
@kalengi I can't build CPU version, I encountered can't open pywrap_lib error ... |
@chrisplyn By the time you see the message
|
@chrisplyn @kalengi I have 1.4.0 AVX2 (VS2017), Python 3.6.3 builds on my repo here. |
It has been 14 days with no activity and the |
1 similar comment
It has been 14 days with no activity and the |
Looks like @aluo-x has figured out a solution. 👍 |
Please go to Stack Overflow for help and support:
http://stackoverflow.com/questions/tagged/tensorflow
If you open a GitHub issue, here is our policy:
Here's why we have that policy: TensorFlow developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.
System information
Have I written custom code (as opposed to using a stock example script provided in TensorFlow): N/A
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10 64 bit, version 1511
TensorFlow installed from (source or binary): source
TensorFlow version (use command below): master branch, commit 90b2a38
Bazel version (if compiling from source): N/A
CUDA/cuDNN version: N/A
GPU model and memory: CPU only
Exact command to reproduce:
You can collect some of this information using our environment capture script:
https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.shYou can obtain the TensorFlow version with
python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"Describe the problem
Describe the problem clearly here. Be sure to convey here why it's a bug in TensorFlow or a feature request.
Issued above build command, and got the following error at last.
For the warnings, there are two kinds:
and
I saw there're many complains about compiler is out of heap space in pass 2 error, and some say adding "/Zm2000" to the compiler would solve the problem. I applied this patch:
But did not solve this problem.
Source code / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem.
The text was updated successfully, but these errors were encountered: