Skip to content

[SYCL][InvokeSimd][E2E] Fix scale tests on hardware that doesn't support fp64 #9552

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 1 commit into from
May 24, 2023

Conversation

sarnex
Copy link
Contributor

@sarnex sarnex commented May 22, 2023

We do a check with dev.has(aspect::fp64), but that's a runtime check.

With InvokeSimd, we need to compile with -fno-sycl-device-code-split-esimd which disables any module splitting.

Usually modules are split into images based on optional device features, such as fp64, but because of the above option we only end up with a single device image that contains both fp64 and non-fp64 code because of the runtime check.

Since there can only be one image, we can't use fp64 at all on non-fp64 hardware, so a runtime check won't work.

Split the test into a non-fp64 and fp64-only version.

The above is what we do for other tests that test double conditionally on non-fp64 hardware, such as invoke_simd_conv_double.cpp

We do a check with `dev.has(aspect::fp64)`, but that's a runtime check.

With InvokeSimd, we need to compile with `-fno-sycl-device-code-split-esimd` which disables any module splitting.

Usually modules are split into images based on optional device features, such as fp64, but because of the above option we
only end up with a single device image that contains both fp64 and non-fp64 code because of the runtime check.

Since there can only be one image, we can't use fp64 at all on non-fp64 hardware, so a runtime check won't work.

Split the test into a non-fp64 and fp64-only version.

The above is what we do for other tests that test double conditionally on non-fp64 hardware, such as invoke_simd_conv_double.cpp

Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
@sarnex sarnex temporarily deployed to aws May 22, 2023 20:47 — with GitHub Actions Inactive
@sarnex sarnex temporarily deployed to aws May 22, 2023 21:37 — with GitHub Actions Inactive
@sarnex sarnex marked this pull request as ready for review May 23, 2023 13:38
@sarnex sarnex requested a review from a team as a code owner May 23, 2023 13:38
@sarnex sarnex changed the title [SYCL][ESIMD][E2E] Fix scale tests on hardware that doesn't support fp64 [SYCL][InvokeSimd][E2E] Fix scale tests on hardware that doesn't support fp64 May 23, 2023
Copy link
Contributor

@v-klochkov v-klochkov left a comment

Choose a reason for hiding this comment

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

I created an internal feature-request for ESIMD and GPU RT to work on support of such cases.
invoke_simd() should be working with module splitting enabled.

@sarnex
Copy link
Contributor Author

sarnex commented May 23, 2023

I created an internal feature-request for ESIMD and GPU RT to work on support of such cases. invoke_simd() should be working with module splitting enabled.

Good idea, thanks

@v-klochkov v-klochkov merged commit 8e19a94 into intel:sycl May 24, 2023
sarnex added a commit to sarnex/llvm that referenced this pull request Jun 13, 2023
… hardware that doesn't support fp64 (intel#9552)"

After 8e19a94, the splitting does the right thing with `invoke_simd`.

This reverts commit 8e19a94.
v-klochkov pushed a commit that referenced this pull request Jun 13, 2023
…upport fp64 (#9552)" (#9826)

After 2910add, the splitting does the
right thing with `invoke_simd`, and we can use this test to lock down
the functionality which previously didn't work.

This reverts commit 8e19a94.
fineg74 pushed a commit to fineg74/llvm that referenced this pull request Jun 15, 2023
…upport fp64 (intel#9552)" (intel#9826)

After 2910add, the splitting does the
right thing with `invoke_simd`, and we can use this test to lock down
the functionality which previously didn't work.

This reverts commit 8e19a94.
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.

2 participants