-
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
benchdnn: graph: use plain copy and paste for reorder if fail to create pd #2262
base: main
Are you sure you want to change the base?
Conversation
0230587
to
e5bd03c
Compare
make test |
807e034
to
9c5fc54
Compare
9c5fc54
to
361f33c
Compare
tests/benchdnn/dnnl_memory.cpp
Outdated
}); | ||
return OK; | ||
} else | ||
return FAIL; |
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.
Suggest to build the block like that:
while (!r_pd_) {
// Fallback to GPU reorder.
dnnl_status_t status = dnnl_reorder_primitive_desc_create(
&r_pd_, src.md_, src.engine(), dst.md_, dst.engine(), attr);
if (status != dnnl_success) break;
// code that executes pd (written below)
}
// Last resort: fallback to a plain copy for identical mds.
// new code goes here. If not identical, return FAIL.
Please add BENCHDNN_PRINT(2, "%s\n", "[REORDER] Fallback to plain copy.");
when the fallback succeeded, to see what's going on.
361f33c
to
141de68
Compare
make test Lightweight_scans |
make test |
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.
Please rebase the PR to fix the lightweight scan failure.
Description
Since the backend does not support int4->int4 reorder currently, we use direct if-else condition to check the unsupported case during input displacement currently. We'd better try with reorder first and use plain copy-and-paste instead if the attempt fails.