Skip to content
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

generic: sycl: Inner Product FWD #2214

Closed
wants to merge 1 commit into from

Conversation

AD2605
Copy link

@AD2605 AD2605 commented Nov 14, 2024

Description

Implements the forward pass of the inner product for the generic sycl backend with support for different post-ops and data types

@AD2605 AD2605 requested review from a team as code owners November 14, 2024 15:03
@AD2605 AD2605 changed the title [Generic]] [Generic][SYCL] Inner Product FWD Nov 14, 2024
@AD2605 AD2605 changed the title [Generic][SYCL] Inner Product FWD generic: sycl: Inner Product FWD Nov 14, 2024
@github-actions github-actions bot added platform:gpu-nvidia Codeowner: @oneapi-src/onednn-gpu-nvidia platform:gpu-generic Codeowner: @oneapi-src/onednn-gpu-generic labels Nov 14, 2024
@sgeor255
Copy link
Contributor

@AD2605 you should probably update https://github.com/oneapi-src/oneDNN/blob/main/src/gpu/generic/sycl/README.md to mention inner product is supported :)

@AD2605 AD2605 requested a review from a team as a code owner November 19, 2024 15:36
@AD2605
Copy link
Author

AD2605 commented Nov 19, 2024

@sgeor255 , updated the documentation

@github-actions github-actions bot added the documentation A request to change/fix/improve the documentation. Codeowner: @oneapi-src/onednn-doc label Nov 19, 2024
@AD2605 AD2605 force-pushed the atharva/inner_product_fwd branch from 3bd9d00 to c5d66f1 Compare November 22, 2024 10:54
@AD2605 AD2605 force-pushed the atharva/inner_product_fwd branch from a3b91d6 to 9c63d68 Compare November 27, 2024 14:10
@AD2605
Copy link
Author

AD2605 commented Nov 27, 2024

@oneapi-src/onednn-arch @oneapi-src/onednn-doc gentle nudge for reviewing the PR

Copy link
Contributor

@ranukund ranukund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor comment added. Please incorporate as you see fit.

src/gpu/generic/sycl/README.md Outdated Show resolved Hide resolved
@AD2605 AD2605 force-pushed the atharva/inner_product_fwd branch from 5899fe4 to 6989cb2 Compare November 29, 2024 10:09
Comment on lines +52 to +55
&& attr()->has_default_values(sm::scales_runtime
| sm::zero_points_runtime | sm::post_ops
| sm::dropout | sm::scales_runtime_data_type
| sm::zero_points_runtime_data_type)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not defer attribute and datatype checking to init_matmul?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in #2248, thanks.

| sm::zero_points_runtime_data_type)
&& memory_desc_wrapper(src_md()).is_plain()
&& memory_desc_wrapper(dst_md())
.is_plain(); // Blocked memory formats are not supported
Copy link
Contributor

@mgouicem mgouicem Dec 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think is_plain is not enough to flatten the dimensions.
Here you need to check:

  • that strides are dense (see is_dense).
  • that the order of flattened dimensions for src and weights match.
  • there is a missing check for weights_md()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point, thanks. I had to create a new PR (#2248) to address the comments as I don't have permissions to push to this one. I think we can close this one.

@vpirogov
Copy link
Member

Closing in favor of #2248 per @sgeor255's comment.

@vpirogov vpirogov closed this Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation A request to change/fix/improve the documentation. Codeowner: @oneapi-src/onednn-doc platform:gpu-generic Codeowner: @oneapi-src/onednn-gpu-generic platform:gpu-nvidia Codeowner: @oneapi-src/onednn-gpu-nvidia
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants