-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
broadcastTo算子在计算Raster的region时逻辑有问题 #2040
Comments
我们查一下 |
wangzhaode
added a commit
to wangzhaode/MNN
that referenced
this issue
Sep 9, 2022
[Pymnn:Bugfix] Fix usage and small bug in pymnn. [Docs:Update] Update docs/cpp markdown [Docs:Update] Add docs check. [MNN:Update] Update VecHalf.hpp [MNN:Bugfix] Fix compile errors caused by "#define MNN_THREAD_LOCK_CPU" [Geometry:Bugfix] Fix bug for resize of broadcastto: alibaba#2040 [Docs:Update] Update inference api usage. [Pymnn:Bugfix] Close hiai load to fix resource leak. [MNN:Update] Down gradle version for demo compile
这个问题解决了嘛,看问题描述好像应该是在source/geometry/ConvertUtils.cpp, line 162后增加 |
157 行加了一句 outputDes->regions.clear(); |
2.1.1 fixed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
平台(如果交叉编译请再附上交叉编译目标平台):
Platform(Include target platform as well if cross-compiling):
Linux
Github版本:
Github Version:
2.0.4
Commit:
d601837 [d601837]
source/geometry/ConvertUtils.cpp, line 163/164
在给outputDes->regions计算offset时,忘记先清零了。
导致的问题:
如果先以指定输入shape创建一个session,然后resizeSession,此处的offset会累加上去。
从而导致Raster算子的onExecute()函数中,memcpy()函数发生访问越界。
补充一个测试例子:
yolov5, export to onnx时使用dynamic axis。创建session后先resizeSession到512512,runSession正常工作,再resizeSession到448512,产生segment fault。使用valgrind定位到Raster算子产生访问越界,进一步定位到上述原因。
The text was updated successfully, but these errors were encountered: