-
Notifications
You must be signed in to change notification settings - Fork 17
FEAT-#128: oneDNN: Implement compilation and execution #129
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
Conversation
b90bbae
to
3464718
Compare
@AndreyPavlenko #97 is merged, could you please rebase so only relevant changes would be shown in diffs |
3464718
to
2022935
Compare
Done. |
const std::string_view &json) | ||
: inputIds(), outputIds(), jmod() { | ||
auto mod = JsonParser::parse(context, json, inputIds, outputIds, strides); | ||
auto jmod = gc::JitModule::create(mod); |
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.
jmod
is the name of private class member. It would be better to add prefix _
to class member just as JsonParser
to avoid confusion.
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.
I think, we need a code style convention. Currently, different styles are used in different parts of the project. Regarding the _
prefix, there are opinions that it's reserved in C++, but I haven't found any evidence of this.
src/dnnl/dnnl_graph_compiler.cpp
Outdated
std::make_pair(&outputIds, outputs)}) { | ||
auto ids = pair.first; | ||
auto tensors = pair.second; | ||
for (auto id : *ids) { |
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.
I think it's not necessary to use O(N^2) algorithms here, and since this is execution API, we want to have less check and thus less overhead. please simplify this.
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.
The jmod
will respect the argument order set from mod
. It means if we use same argument order for kernel compilation, then we don't need to reorder it during kernel execution.
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.
We use the same order, but the arguments are passed from oneDNN and I'm not sure if the order is always the same as in mod.
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.
Now it's O(N), if the arguments order matches.
20f1f55
to
37c7247
Compare
f0e6fdd
to
0726837
Compare
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.
Looks good, minor comments.
f2a5f90
to
8b8555d
Compare
Depends on #97