-
Notifications
You must be signed in to change notification settings - Fork 1k
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
tests: benchdnn: support --mode-modifer=M for graph driver #2880
base: main
Are you sure you want to change the base?
Conversation
250f997
to
633dd37
Compare
make test |
633dd37
to
13d0901
Compare
13d0901
to
c58a631
Compare
make test |
b1ca911
to
562593f
Compare
562593f
to
162bff8
Compare
lt_id_2_mems_.at(id), lt_id_2_lt_.at(id), true)); | ||
} else if (has_bench_mode_modifier(mode_modifier_t::no_ref_memory)) { | ||
partition_mem_map.emplace( | ||
id, dnn_graph_mem_t(lt_id_2_lt_.at(id), true)); |
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 seems that internal mem_
can be constructed without lt_id_2_mems_
.
I suggest to change the logic to following:
// Emplace a memory object first.
partition_mem_map.emplace(
id, dnn_graph_mem_t(lt_id_2_lt_.at(id), true));
if (lt_id_2_mems_.at(id)) {
SAFE(fill_underlying_mem_with_data(partition_mem_map[id], lt_id_2_mems_.at(id)), WARN);
}
This way the flow is always the same and no_ref_memory
will affect only the if part transparently without hurting a general logic.
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.
For correctness check, we need to create graph memories based on primitive memory layouts, as benchdnn will reorder the outputs from both paths to abx
during comparison. Therefore, the memory tags of outputs from two paths have to be identical.
For simplicity, I have done the following changes:
- Move the data filling part to an independent function.
- Remove the function that creates graph memories from graph logical tensors, and keep the primitive memory parameter.
162bff8
to
79d435e
Compare
make test |
General
The PR enables
--mode-modifer=M
for benchdnn graph driver:0x3F3F3F3F
(0.747059f) ) for data filling.Sanitizer test: