Skip to content

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

Merged
merged 5 commits into from
Jul 9, 2024

Conversation

AndreyPavlenko
Copy link
Contributor

Depends on #97

@AndreyPavlenko AndreyPavlenko force-pushed the dnnl-compile branch 3 times, most recently from b90bbae to 3464718 Compare June 10, 2024 16:21
@AndreyPavlenko AndreyPavlenko marked this pull request as ready for review June 10, 2024 16:30
@dchigarev
Copy link
Contributor

@AndreyPavlenko #97 is merged, could you please rebase so only relevant changes would be shown in diffs

@AndreyPavlenko
Copy link
Contributor Author

@AndreyPavlenko #97 is merged, could you please rebase so only relevant changes would be shown in diffs

Done.

@Menooker Menooker requested a review from ZhennanQin June 12, 2024 02:16
const std::string_view &json)
: inputIds(), outputIds(), jmod() {
auto mod = JsonParser::parse(context, json, inputIds, outputIds, strides);
auto jmod = gc::JitModule::create(mod);
Copy link
Contributor

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.

Copy link
Contributor Author

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.

std::make_pair(&outputIds, outputs)}) {
auto ids = pair.first;
auto tensors = pair.second;
for (auto id : *ids) {
Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

@AndreyPavlenko AndreyPavlenko force-pushed the dnnl-compile branch 2 times, most recently from 20f1f55 to 37c7247 Compare June 18, 2024 12:49
@AndreyPavlenko AndreyPavlenko force-pushed the dnnl-compile branch 2 times, most recently from f0e6fdd to 0726837 Compare July 1, 2024 15:20
Copy link
Contributor

@kurapov-peter kurapov-peter left a 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.

@kurapov-peter kurapov-peter linked an issue Jul 2, 2024 that may be closed by this pull request
@AndreyPavlenko AndreyPavlenko merged commit 87b8eac into intel:main Jul 9, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

oneDNN: Implement compilation and execution
6 participants