diff options
| author | Joachim Gehweiler <44170764+jgehw@users.noreply.github.com> | 2021-09-30 05:43:32 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-29 20:43:32 -0700 |
| commit | 8ad33ead9075cd8d6d357e0b870ba8d501efe35c (patch) | |
| tree | ab3a6b7785b5b34da890e0db63f50bbe60362bf6 /ports/tensorflow-common/fix-windows-build.patch | |
| parent | dd991ef5b82051cb7481a92c71dc5706325ba7c2 (diff) | |
| download | vcpkg-8ad33ead9075cd8d6d357e0b870ba8d501efe35c.tar.gz vcpkg-8ad33ead9075cd8d6d357e0b870ba8d501efe35c.zip | |
[tensorflow] update to 2.6 (#20015)
* Revert "incorporate changes from microsoft:master"
* Revert "Revert "incorporate changes from microsoft:master""
* WIP: update to tensorflow 2.6
* update patch
* update more patches
* fix patch again
* fix new Windows compile/linkage errors
* fix patch
* fix patch again
* temporarily revert Windows build option fix to test whether upstream fix doesn't work
* check if constexpr is sufficient (is_same_v requires C++17)
* try patch for build parameters
* remove fastbuild patch and improve constexpr patch (no C++17 requirement)
(fastbuild patch didn't work because bazel overrides it with /DEBUG:FULL)
* x-add-version
* add C++17 preprocessor switch for "if constexpr"
* x-add-version
* remove pre-processor switch (doesn't work without)
* x-add-version
* work-around toolchain issues on macOS
* x-add-version
* fix Windows build options (must be string, not list)
* x-add-version
* temporarily add code to debug CI
* temporarily add more debug output as build doesn't even start on macOS CI
* remove debug code, add switch for linker parameters on macOS and re-introduce old behaviour (some platforms still use old behaviour)
* x-add-version
* fix broken string termination
* x-add-version
* fix function name
* x-add-version
Co-authored-by: jgehw <Joachim_Gehweiler@McAfee.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
Diffstat (limited to 'ports/tensorflow-common/fix-windows-build.patch')
| -rw-r--r-- | ports/tensorflow-common/fix-windows-build.patch | 65 |
1 files changed, 55 insertions, 10 deletions
diff --git a/ports/tensorflow-common/fix-windows-build.patch b/ports/tensorflow-common/fix-windows-build.patch index 89536836f..8450299e8 100644 --- a/ports/tensorflow-common/fix-windows-build.patch +++ b/ports/tensorflow-common/fix-windows-build.patch @@ -1,12 +1,57 @@ -diff --git a/core/platform/default/logging.h b/core/platform/default/logging.h ---- a/tensorflow/core/platform/default/logging.h -+++ b/tensorflow/core/platform/default/logging.h -@@ -13,6 +13,8 @@ - limitations under the License. - ==============================================================================*/ +diff --git a/tensorflow/core/kernels/depthtospace_op.cc b/tensorflow/core/kernels/depthtospace_op.cc +--- a/tensorflow/core/kernels/depthtospace_op.cc ++++ b/tensorflow/core/kernels/depthtospace_op.cc +@@ -112,7 +112,7 @@ + auto Tinput = input.tensor<T, kDims>(); + auto Toutput = outputs_tensor->tensor<T, kDims>(); + +- if (std::is_same<Device, GPUDevice>::value) { ++ if constexpr (std::is_same<Device, GPUDevice>::value) { + if (is_int8x4) { + // NCHW_VECT_C with 4 x qint8 can be treated as NCHW int32. + auto Tinput_v = input.template reinterpret_last_dimension<int32, 4>(); +@@ -173,15 +173,6 @@ + } + }; + +-#ifdef WIN32 +-template <typename T> +-struct DepthToSpaceOpFunctor<CPUDevice, T, FORMAT_NCHW> { +- void operator()(const CPUDevice& d, typename TTypes<T, 4>::ConstTensor input, +- int block_size, typename TTypes<T, 4>::Tensor output) { +- LOG(FATAL) << "Trivial implementation to make debug build compile."; +- } +-}; +-#endif + } // namespace functor + + #define REGISTER(type) \ -+#pragma warning(disable:4716) -+ - #ifndef TENSORFLOW_CORE_PLATFORM_DEFAULT_LOGGING_H_ - #define TENSORFLOW_CORE_PLATFORM_DEFAULT_LOGGING_H_ +diff --git a/tensorflow/core/kernels/spacetodepth_op.cc b/tensorflow/core/kernels/spacetodepth_op.cc +--- a/tensorflow/core/kernels/spacetodepth_op.cc ++++ b/tensorflow/core/kernels/spacetodepth_op.cc +@@ -126,7 +126,7 @@ + output_width, output_depth), + &outputs_tensor)); + +- if (std::is_same<Device, GPUDevice>::value) { ++ if constexpr (std::is_same<Device, GPUDevice>::value) { + using RT = typename RawType<T>::type; + if (data_format_ == FORMAT_NCHW_VECT_C) { + // NCHW_VECT_C with 4 x qint8 can be treated as NCHW int32. +@@ -189,15 +189,6 @@ + } + }; + +-#ifdef WIN32 +-template <typename T> +-struct SpaceToDepthOpFunctor<CPUDevice, T, FORMAT_NCHW> { +- void operator()(const CPUDevice& d, typename TTypes<T, 4>::ConstTensor input, +- int block_size, typename TTypes<T, 4>::Tensor output) { +- LOG(FATAL) << "Trivial implementation to make debug build compile."; +- } +-}; +-#endif + } // namespace functor + #define REGISTER(type) \ |
