diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-06-06 23:18:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-06 23:18:32 +0200 |
commit | e36580428c904851d18bd5e72399b54a01538acc (patch) | |
tree | 02c3c5622098a035524658d7a729eb0db84222cc /thirdparty | |
parent | ca5519c430574805ce074bc5c9e594afe768b820 (diff) | |
parent | 38a200f1e327c516f785ba5db598a4638fd73cd5 (diff) |
Merge pull request #39346 from akien-mga/oidn-fix-vs-2017
oidn: Fix build for VS 2017
Diffstat (limited to 'thirdparty')
-rw-r--r-- | thirdparty/README.md | 6 | ||||
-rw-r--r-- | thirdparty/oidn/mkl-dnn/src/cpu/rnn/rnn_reorders.hpp | 2 | ||||
-rw-r--r-- | thirdparty/oidn/mkl-dnn/src/cpu/simple_concat.hpp | 6 | ||||
-rw-r--r-- | thirdparty/oidn/patches/godot-changes-c58c5216.patch (renamed from thirdparty/oidn/godot-changes-c58c5216.patch) | 0 | ||||
-rw-r--r-- | thirdparty/oidn/patches/mkl-dnn-fix-vs2017-build.patch | 45 |
5 files changed, 52 insertions, 7 deletions
diff --git a/thirdparty/README.md b/thirdparty/README.md index 9dff2eb37c..c69ca17fd0 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -446,7 +446,7 @@ Files extracted from the upstream source: ## oidn - Upstream: https://github.com/OpenImageDenoise/oidn -- Version: 1.1.0 (c58c5216db05ceef4cde5a096862f2eeffd14c06) +- Version: 1.1.0 (c58c5216db05ceef4cde5a096862f2eeffd14c06, 2019) - License: Apache 2.0 Files extracted from upstream source: @@ -461,8 +461,8 @@ weights/rtlightmap_hdr.tza scripts/resource_to_cpp.py Modified files: -Modifications are marked with `// -- GODOT start --` and `// -- GODOT end --` -A patch file is provided in `oidn/godot-changes-c58c5216.patch` +Modifications are marked with `// -- GODOT start --` and `// -- GODOT end --`. +Patch files are provided in `oidn/patches/`. core/autoencoder.cpp core/autoencoder.h diff --git a/thirdparty/oidn/mkl-dnn/src/cpu/rnn/rnn_reorders.hpp b/thirdparty/oidn/mkl-dnn/src/cpu/rnn/rnn_reorders.hpp index 597c63e3f8..78cdedbae4 100644 --- a/thirdparty/oidn/mkl-dnn/src/cpu/rnn/rnn_reorders.hpp +++ b/thirdparty/oidn/mkl-dnn/src/cpu/rnn/rnn_reorders.hpp @@ -131,7 +131,7 @@ struct rnn_weights_reorder_t : public cpu_primitive_t { return status::success; } - format_tag_t itag_; + format_tag_t itag_ = mkldnn_format_tag_undef; private: void init_scratchpad() { diff --git a/thirdparty/oidn/mkl-dnn/src/cpu/simple_concat.hpp b/thirdparty/oidn/mkl-dnn/src/cpu/simple_concat.hpp index 5177275452..057cc3c4c7 100644 --- a/thirdparty/oidn/mkl-dnn/src/cpu/simple_concat.hpp +++ b/thirdparty/oidn/mkl-dnn/src/cpu/simple_concat.hpp @@ -96,9 +96,9 @@ struct simple_concat_t: public cpu_primitive_t { return status::success; } - int perm_[MKLDNN_MAX_NDIMS]; - int iperm_[MKLDNN_MAX_NDIMS]; - dims_t blocks_; + int perm_[MKLDNN_MAX_NDIMS] {}; + int iperm_[MKLDNN_MAX_NDIMS] {}; + dims_t blocks_ {}; dim_t nelems_to_concat(const memory_desc_wrapper &data_d) const { const int ndims = data_d.ndims(); diff --git a/thirdparty/oidn/godot-changes-c58c5216.patch b/thirdparty/oidn/patches/godot-changes-c58c5216.patch index 6a54703064..6a54703064 100644 --- a/thirdparty/oidn/godot-changes-c58c5216.patch +++ b/thirdparty/oidn/patches/godot-changes-c58c5216.patch diff --git a/thirdparty/oidn/patches/mkl-dnn-fix-vs2017-build.patch b/thirdparty/oidn/patches/mkl-dnn-fix-vs2017-build.patch new file mode 100644 index 0000000000..50d94ebffa --- /dev/null +++ b/thirdparty/oidn/patches/mkl-dnn-fix-vs2017-build.patch @@ -0,0 +1,45 @@ +Rediffed by @akien-mga to match oidn 1.1.0 source. + +From 1e42e6db81e1a5270ecc0191c5385ce7e7d978e9 Mon Sep 17 00:00:00 2001 +From: Jeremy Wong <jmw@netvigator.com> +Date: Wed, 11 Sep 2019 04:46:53 +0800 +Subject: [PATCH] src: initialize members in some structures to prevent compile + errors with VS2017 + +addresses "error C3615: constexpr function '...' cannot result in a constant expression" with VS2017 +--- + src/cpu/rnn/rnn_reorders.hpp | 2 +- + src/cpu/simple_concat.hpp | 6 +++--- + src/cpu/simple_sum.hpp | 2 +- + 3 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/thirdparty/oidn/mkl-dnn/src/cpu/rnn/rnn_reorders.hpp b/thirdparty/oidn/mkl-dnn/src/cpu/rnn/rnn_reorders.hpp +index 597c63e3f8..ae1551390a 100644 +--- a/thirdparty/oidn/mkl-dnn/src/cpu/rnn/rnn_reorders.hpp ++++ b/thirdparty/oidn/mkl-dnn/src/cpu/rnn/rnn_reorders.hpp +@@ -131,7 +131,7 @@ struct rnn_weights_reorder_t : public cpu_primitive_t { + return status::success; + } + +- format_tag_t itag_; ++ format_tag_t itag_ = mkldnn_format_tag_undef; + + private: + void init_scratchpad() { +diff --git a/thirdparty/oidn/mkl-dnn/src/cpu/simple_concat.hpp b/thirdparty/oidn/mkl-dnn/src/cpu/simple_concat.hpp +index 5177275452..057cc3c4c7 100644 +--- a/thirdparty/oidn/mkl-dnn/src/cpu/simple_concat.hpp ++++ b/thirdparty/oidn/mkl-dnn/src/cpu/simple_concat.hpp +@@ -96,9 +96,9 @@ struct simple_concat_t: public cpu_primitive_t { + return status::success; + } + +- int perm_[MKLDNN_MAX_NDIMS]; +- int iperm_[MKLDNN_MAX_NDIMS]; +- dims_t blocks_; ++ int perm_[MKLDNN_MAX_NDIMS] {}; ++ int iperm_[MKLDNN_MAX_NDIMS] {}; ++ dims_t blocks_ {}; + + dim_t nelems_to_concat(const memory_desc_wrapper &data_d) const { + const int ndims = data_d.ndims(); |