diff options
author | Chih-Hsuan Yen | 2022-04-24 23:54:24 +0800 |
---|---|---|
committer | Chih-Hsuan Yen | 2022-04-24 23:55:27 +0800 |
commit | b53e63132f766d7a4ac19cf44bef9838d0f38250 (patch) | |
tree | ae38b204091baf22382b4241683991db1ae7c4bb /protobuf-3.20.diff | |
parent | c330b70c18ba50e13ad13a6dc2517d2443d5e946 (diff) | |
download | aur-b53e63132f766d7a4ac19cf44bef9838d0f38250.tar.gz |
add a patch to make it build with protobuf 3.20
Also adds sodepends to avoid incompatible updates as well as removes
unneeded items from `depends` for python-onnxruntime-cuda.
See: https://github.com/microsoft/onnxruntime/issues/11129
Diffstat (limited to 'protobuf-3.20.diff')
-rw-r--r-- | protobuf-3.20.diff | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/protobuf-3.20.diff b/protobuf-3.20.diff new file mode 100644 index 000000000000..908f06e14105 --- /dev/null +++ b/protobuf-3.20.diff @@ -0,0 +1,13 @@ +diff --git a/onnxruntime/core/framework/tensorprotoutils.cc b/onnxruntime/core/framework/tensorprotoutils.cc +index 085c1ffbe..a9070d5e4 100644 +--- a/onnxruntime/core/framework/tensorprotoutils.cc ++++ b/onnxruntime/core/framework/tensorprotoutils.cc +@@ -256,7 +256,7 @@ Status UnpackTensor(const ONNX_NAMESPACE::TensorProto& tensor, const void* raw_d + ") does not match the data size(", tensor.field_size(), ") in proto"); \ + auto& data = tensor.field_name(); \ + for (auto data_iter = data.cbegin(); data_iter != data.cend(); ++data_iter) \ +- *p_data++ = *reinterpret_cast<const T*>(data_iter); \ ++ *p_data++ = *data_iter; \ + return Status::OK(); \ + } + |