Merged
Conversation
Fix LSTM support in ONNX * fix LSTM and add peephole support * disable old tests * turn lambdas into functions * more hacks for c++98 * add assertions * slice fixes * backport of cuda-related fixes * address review comments
/wrkdirs/usr/ports/graphics/opencv/work/opencv-4.5.5/modules/core/include/opencv2/core/vsx_utils.hpp:352:12: warning: 'vec_permi' macro redefined [-Wmacro-redefined]
# define vec_permi(a, b, c) vec_xxpermdi(b, a, (3 ^ (((c) & 1) << 1 | (c) >> 1)))
^
/usr/lib/clang/13.0.0/include/altivec.h:13077:9: note: previous definition is here
#define vec_permi(__a, __b, __c) \
^
/wrkdirs/usr/ports/graphics/opencv/work/opencv-4.5.5/modules/core/include/opencv2/core/vsx_utils.hpp:370:25: error: redefinition of 'vec_promote'
VSX_FINLINE(vec_dword2) vec_promote(long long a, int b)
^
/usr/lib/clang/13.0.0/include/altivec.h:14604:1: note: previous definition is here
vec_promote(signed long long __a, int __b) {
^
/wrkdirs/usr/ports/graphics/opencv/work/opencv-4.5.5/modules/core/include/opencv2/core/vsx_utils.hpp:377:26: error: redefinition of 'vec_promote'
VSX_FINLINE(vec_udword2) vec_promote(unsigned long long a, int b)
^
/usr/lib/clang/13.0.0/include/altivec.h:14611:1: note: previous definition is here
vec_promote(unsigned long long __a, int __b) {
^
/wrkdirs/usr/ports/graphics/opencv/work/opencv-4.5.5/modules/core/include/opencv2/core/hal/intrin_vsx.hpp:1045:22: error: call to 'vec_rsqrt' is ambiguous
{ return v_float32x4(vec_rsqrt(x.val)); }
^~~~~~~~~
/usr/lib/clang/13.0.0/include/altivec.h:8472:34: note: candidate function
static vector float __ATTRS_o_ai vec_rsqrt(vector float __a) {
^
/wrkdirs/usr/ports/graphics/opencv/work/opencv-4.5.5/modules/core/include/opencv2/core/vsx_utils.hpp:362:29: note: candidate function
VSX_FINLINE(vec_float4) vec_rsqrt(const vec_float4& a)
^
/wrkdirs/usr/ports/graphics/opencv/work/opencv-4.5.5/modules/core/include/opencv2/core/hal/intrin_vsx.hpp:1047:22: error: call to 'vec_rsqrt' is ambiguous
{ return v_float64x2(vec_rsqrt(x.val)); }
^~~~~~~~~
/usr/lib/clang/13.0.0/include/altivec.h:8477:35: note: candidate function
static vector double __ATTRS_o_ai vec_rsqrt(vector double __a) {
^
/wrkdirs/usr/ports/graphics/opencv/work/opencv-4.5.5/modules/core/include/opencv2/core/vsx_utils.hpp:365:30: note: candidate function
VSX_FINLINE(vec_double2) vec_rsqrt(const vec_double2& a)
^
1 warning and 4 errors generated.
The specific functions were added to altivec.h in LLVM's 1ff93618e58df210def48d26878c20a1b414d900, c3da07d216dd20fbdb7302fd085c0a59e189ae3d and 10cc5bcd868c433f9a781aef82178b04e98bd098.
This was referenced Mar 26, 2022
Member
Author
|
👍 |
alalek
commented
Mar 26, 2022
Comment on lines
-1575
to
-1596
| // Following checks are deduced from the IFGO->IGFO loop below | ||
| // Wx is numDirs X numHidden*3 X numFeatures | ||
| // Wh is numDirs X numHidden*3 X numHidden | ||
| CV_CheckLE(numHidden * 3, Wx.size[1], "Wx should have beat least 3x hidden_size in dimension 1"); | ||
| CV_CheckLE(numHidden * 3, Wh.size[1], "Wh should have be at least 3x hidden_size in dimension 1"); | ||
| CV_CheckLE(numHidden, Wh.size[2], "Wh should have be at least hidden_size in dimension 2"); | ||
|
|
||
| Mat h0, c0; | ||
| if (!node_proto.input(5).empty()) { | ||
| h0 = getBlob(node_proto, 5); | ||
| h0 = h0.reshape(1, h0.size[0] * h0.size[1]); | ||
| } else { | ||
| // initial_h attribute can be empty in case of keras2onnx producer. fill it with zeros | ||
| h0 = Mat::zeros(numDirs * numFeatures, numHidden, CV_32FC1); | ||
| } | ||
| if (!node_proto.input(6).empty()) { | ||
| c0 = getBlob(node_proto, 6); | ||
| c0 = c0.reshape(1, c0.size[0] * c0.size[1]); | ||
| } else { | ||
| // initial_c attribute can be empty in case of keras2onnx producer. fill it with zeros | ||
| c0 = Mat::zeros(numDirs * numFeatures, numHidden, CV_32FC1); | ||
| } |
Member
Author
There was a problem hiding this comment.
@rogday This conflicting 4.x only code has been dropped during merge conflict resolving
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#21522 from rogday:lstm
#21684 from vrabaud:34_vec
#21739 from mshabunin:fix-cart-polar
#21750 from alalek:dnn_fix_index_access
#21759 from pkubaj:patch-1
Previous "Merge 3.4": #21690
Details