-
Notifications
You must be signed in to change notification settings - Fork 157
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
[onert] Add MinMaxRecorder Observer #10642
Conversation
: std::make_unique<exec::MinMaxRecorder>(options.minmax_filepath, | ||
lowered_graph->graph(), backend_contexts); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is code from #10610 (comment).
- It saves reference to
backend_contexts
, which is going tostd::move
'd.- It would be better to borrow
backend_contexts
fromLinearExecutor
afterstd::move
.
- It would be better to borrow
- It assumes
LinearExecutor
outlivesMinMaxRecorder
.- I will add comment about this assumption.
I will add a commit for this modification.
(+)
I've found backend_contexts
is not the only one std::move
'd. LoweredGraph
works in same way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I guessed, previous code gets segmentation fault because it accesses to std::move'd objects. I added fix commit.
It adds MinMaxRecorder as ExecutionObserver. ONE-DCO-1.0-Signed-off-by: Sanggyu Lee <sg5.lee@samsung.com>
@@ -25,6 +25,7 @@ | |||
#include "../exec/ExecTime.h" | |||
#include "../exec/ExecutionObservers.h" | |||
#include "../exec/LinearExecutor.h" | |||
#include "../exec/MinMaxRecorder.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Android and Tizen (lack of HDF5) cannot use MinMaxRecorder
It does not add MinMaxRecorder for Tizen/Android. It fixes illegal access to std::move'd objects
ecd099d
to
0ca90e6
Compare
|
It adds MinMaxRecorder as ExecutionObserver.
ONE-DCO-1.0-Signed-off-by: Sanggyu Lee sg5.lee@samsung.com
Related: #10604