terryzhao127 / tensorflow-windows-build-script

A script to automate building Tensorflow on Windows and solve some problems
GNU General Public License v3.0
102 stars 35 forks source link

Minor fix to allow script to compile 1.13.1 under VS2017 #14

Closed asbe closed 5 years ago

asbe commented 5 years ago

A small patch is needed in the source file op_kernel.h to allow the script to sucessfully compile v1.13.1 under Visual Studio 2017, see https://github.com/tensorflow/tensorflow/pull/25943

terryzhao127 commented 5 years ago

Is it better to use the Tensorflow's commit as a patch?

asbe commented 5 years ago

Maybe - the difference is only slight. And the script looks cleaner with a cherry-pick instead of shipping a patch. Will test when I have the time.

terryzhao127 commented 5 years ago

Waiting for your testing!

terryzhao127 commented 5 years ago

@asbe Hey, have you already tested?

asbe commented 5 years ago

Sorry - been extremely busy. Assuming that Invoke-WebRequest behaves like curl the following addition to script should work. Sorry I don't speak Powershell:

`} elseif ($buildVersion -eq "v1.13.1") {

(Invoke-WebRequest https://github.com/tensorflow/tensorflow/commit/ec727016282383aacf9d26386b01f6bdbd65b14b.patch).Content | git apply -v --ignore-space-change --ignore-white

}`

Have changed the script and will test a clean rebuild now.

terryzhao127 commented 5 years ago

Sorry - been extremely busy.

That's fine. I didn't mean to push you. 😉

You made duplicate codes in $BuildCppAPI which should be run outside once. So I removed them. Have a check, if nothing is wrong, this PR is ready to merge.