{"action":"created","issue":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/14801","repository_url":"https://api.github.com/repos/tensorflow/tensorflow","labels_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/14801/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/14801/comments","events_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/14801/events","html_url":"https://github.com/tensorflow/tensorflow/issues/14801","id":276130886,"number":14801,"title":"On the way to latest CMake, VS2017, CUDA 9, cudNN 7, Win10","user":{"login":"sylvain-bougnoux","id":6706662,"avatar_url":"https://avatars1.githubusercontent.com/u/6706662?v=4","gravatar_id":"","url":"https://api.github.com/users/sylvain-bougnoux","html_url":"https://github.com/sylvain-bougnoux","followers_url":"https://api.github.com/users/sylvain-bougnoux/followers","following_url":"https://api.github.com/users/sylvain-bougnoux/following{/other_user}","gists_url":"https://api.github.com/users/sylvain-bougnoux/gists{/gist_id}","starred_url":"https://api.github.com/users/sylvain-bougnoux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sylvain-bougnoux/subscriptions","organizations_url":"https://api.github.com/users/sylvain-bougnoux/orgs","repos_url":"https://api.github.com/users/sylvain-bougnoux/repos","events_url":"https://api.github.com/users/sylvain-bougnoux/events{/privacy}","received_events_url":"https://api.github.com/users/sylvain-bougnoux/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-11-22T16:30:20Z","updated_at":"2017-11-24T23:58:17Z","closed_at":null,"author_association":"NONE","body":"As many of us (#14126,#14691,#12052), I am trying to get TF1.4 build successfully on windows using the latest version of everything. As far as I can judge **I could do it** but with some hacks. As it is too long for me to complete, I would like to share what I did for help finalizing. It is too early for a PR.\r\n\r\nI am using CMake 3.9.6 (though 3.10 came out). I have low cmake skill level.\r\nI am not trying the python bindings.\r\nVS2017 is the community edition.\r\n\r\nWithout GPU it is easy. The only issue is the heap overflow (C1002 or C1006 #11096). The trick is to reduce parallel build by `msbuild /m:4 /p:CL_MPCount=2 ...` such that 4*2 is approximately the number of core you really have (at least it worked for me). Using `/Zm2000` did not work for me, despite a lot of available memory (32G).\r\n\r\nWith GPU it is more tricky: the `tf_core_gpu_kernels.vcxproj` does not compile at all. AFAIU, the CMake strategy changed from v3.6, to allow parallel computing. CUDA is now treated as another language. Without modifications nvcc simply returns with code error 1 (or nothing happen I am not sure). Here are my modifications (from v1.4).\r\n\r\nFrom `tensorflow/tensorflow/contrib/cmake/`\r\n1/ adapt `cmakelists.txt` a little: \r\n- Change `CUDA 8.0` to `CUDA 9.0` l.223.\r\n- Add `enable_language(\"CUDA\")` l.224.\r\n- **The `set(CUDA_NVCC_FLAGS ...)` directives do not work anymore**. See below.\r\n- Add capabilities 6.0 and 6.1 in l.232, as well l.246. Might not be needed (it is only for performance).\r\n- Change `64_80` to `64_90` and `64_6` to `64_7` l.247 and 248, similarly in l.272-276.\r\n\r\n2/ in `tf_core_kernels.cmake`:\r\n- Add `set_source_files_properties(${tf_core_gpu_kernels_srcs} PROPERTIES LANGUAGE CUDA)` to recognize '.cu.cc' extensions as cuda files in l.209.\r\n- Rename `cuda_add_library(...)` as `add_library(...)` l.210.\r\n\r\n3/ edit **(this is the trick)** `tf_core_gpu_kernels.vcxproj`, in the release section:\r\n- Encompass cl.exe flags, ie `/bigobj /nologo ... -Ob2`  with the `-Xcompiler=\"/bigobj ... -Ob2\"` directive l.147. These former flags are for the c++ compiler not for nvcc and result in the crash.\r\n- Add just before `--expt-relaxed-constexpr`, still in the `AdditionalOptions`.\r\n- Switch `PerformDeviceLink`from `false` to `true` l.164.\r\n\r\nThen everything compile (msbuild on  tf_tutorials_example_trainer.vcxproj) (and this tuto works). The remaining point before PR is to avoid third step, i.e. give the right directives to nvcc, by understanding how the CUDA_NVCC_FLAGS works, and add the linking. Hope this solution will work without missing symbols (#6396).\r\n\r\nOtherwise it is a nightmare: both CUDA 8 and CMake 3.6 are not aware of VS2017. CMake compilation is not incremental (#14194) and takes about 4-5H (could use precompiled headers especially in tf_core_kernels)...\r\n"},"comment":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/comments/346907520","html_url":"https://github.com/tensorflow/tensorflow/issues/14801#issuecomment-346907520","issue_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/14801","id":346907520,"user":{"login":"aluo-x","id":15619682,"avatar_url":"https://avatars1.githubusercontent.com/u/15619682?v=4","gravatar_id":"","url":"https://api.github.com/users/aluo-x","html_url":"https://github.com/aluo-x","followers_url":"https://api.github.com/users/aluo-x/followers","following_url":"https://api.github.com/users/aluo-x/following{/other_user}","gists_url":"https://api.github.com/users/aluo-x/gists{/gist_id}","starred_url":"https://api.github.com/users/aluo-x/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aluo-x/subscriptions","organizations_url":"https://api.github.com/users/aluo-x/orgs","repos_url":"https://api.github.com/users/aluo-x/repos","events_url":"https://api.github.com/users/aluo-x/events{/privacy}","received_events_url":"https://api.github.com/users/aluo-x/received_events","type":"User","site_admin":false},"created_at":"2017-11-24T23:58:17Z","updated_at":"2017-11-24T23:58:17Z","author_association":"NONE","body":"@sylvain-bougnoux I don't believe the WHOLEARCHIVE flag is used when building a Python whl, am I mistaken? "}}
{"actor":{"display_login":"aluo-x"}}