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: resampling: Avoid using the cudnn resampling to use the sycl impl #2040

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

kala855
Copy link
Contributor

@kala855 kala855 commented Aug 15, 2024

Description

We think that the problem reported in issue #1728 is because of the accuracy of the generated grid. To make it work we should make the grid double precision regardless of the input/output types. Otherwise, the grid affects the accuracy of the results too much. Effectively the grid is specified in the range [-1,1], but most of the bits in these values are used for encoding which values to use to calculate the result instead of what we need - how much of these values to use.

To sum up, this approach doesn’t quite fit our needs and leads to poor precision or performance. We think we should consider using the SYCL implementation instead. In this PR we removed the cudnn resampling calls and rely on using the SYCL kernels instead.

Fixes #1728

Checklist

General

  • Do all unit and benchdnn tests (make test and make test_benchdnn_*) pass locally for each commit?
  • Have you formatted the code using clang-format?

@kala855 kala855 requested review from a team as code owners August 15, 2024 13:39
@vpirogov vpirogov added the platform:gpu-generic Codeowner: @oneapi-src/onednn-gpu-generic label Aug 16, 2024
@vpirogov vpirogov added this to the v3.6 milestone Aug 16, 2024
Copy link
Contributor

@dzarukin dzarukin left a comment

Choose a reason for hiding this comment

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

The suggestion is to introduce a generic resampling kernel first before purging this implementation as it will be a functionality regression if the generic kernel won't make it in v3.6.

@kala855
Copy link
Contributor Author

kala855 commented Aug 21, 2024

The suggestion is to introduce a generic resampling kernel first before purging this implementation as it will be a functionality regression if the generic kernel won't make it in v3.6.

The SYCL implementation will be used as the generic kernel in these cases. The cudnn kernel covered 177 tests (of which 56 were failing) of a total of 12551 benchdnn tests. These cases are also passed by the SYCL implementation. I may be missing something else here. Let me know if you think something different needs to be handled here. Thank you.

@kala855 kala855 requested a review from dzarukin August 21, 2024 13:07
@dzarukin
Copy link
Contributor

The suggestion is to introduce a generic resampling kernel first before purging this implementation as it will be a functionality regression if the generic kernel won't make it in v3.6.

The SYCL implementation will be used as the generic kernel in these cases. The cudnn kernel covered 177 tests (of which 56 were failing) of a total of 12551 benchdnn tests. These cases are also passed by the SYCL implementation. I may be missing something else here. Let me know if you think something different needs to be handled here. Thank you.

Sorry, I missed the fact that resampling is already there. No concerns then.

@kala855
Copy link
Contributor Author

kala855 commented Aug 22, 2024

The suggestion is to introduce a generic resampling kernel first before purging this implementation as it will be a functionality regression if the generic kernel won't make it in v3.6.

The SYCL implementation will be used as the generic kernel in these cases. The cudnn kernel covered 177 tests (of which 56 were failing) of a total of 12551 benchdnn tests. These cases are also passed by the SYCL implementation. I may be missing something else here. Let me know if you think something different needs to be handled here. Thank you.

Sorry, I missed the fact that resampling is already there. No concerns then.

@dzarukin If no concerns. And if there is nothing else to take into account. Is it possible to accept this PR? Thank you.

@kala855 kala855 force-pushed the kala855/resampling-check branch from d0ccfeb to 804f76a Compare August 26, 2024 08:09
@github-actions github-actions bot added documentation A request to change/fix/improve the documentation. Codeowner: @oneapi-src/onednn-doc platform:gpu-nvidia Codeowner: @oneapi-src/onednn-gpu-nvidia and removed platform:gpu-generic Codeowner: @oneapi-src/onednn-gpu-generic labels Aug 26, 2024
@vpirogov vpirogov merged commit 40c1476 into main Aug 27, 2024
12 checks passed
@vpirogov vpirogov deleted the kala855/resampling-check branch August 27, 2024 19:53
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-nvidia Codeowner: @oneapi-src/onednn-gpu-nvidia
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[nvidia] resampling primitive fails correctness check
5 participants