Skip to content

[SYCL] Turn on -fsycl-id-queries-fit-in-int by default #3427

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 6 commits into from
Apr 9, 2021

Conversation

smanna12
Copy link
Contributor

@smanna12 smanna12 commented Mar 26, 2021

This patch enables sycl_id_queries_fit_in_int macro to true on default mode to fix regressions and performance issue.

Signed-off-by: Soumi Manna [email protected]

This patch enables SYCL ID queries fit within MAX_INT
option to true on default mode.

Signed-off-by: Soumi Manna <[email protected]>
Signed-off-by: Soumi Manna <[email protected]>
@smanna12 smanna12 changed the title [WIP] enable option to default [WIP] Set macro to true on default mode Mar 30, 2021
@smanna12 smanna12 changed the title [WIP] Set macro to true on default mode [SYCL] [WIP] Set macro to true on default mode Mar 30, 2021
@smanna12 smanna12 changed the title [SYCL] [WIP] Set macro to true on default mode [SYCL] Set macro to true on default mode Mar 30, 2021
@smanna12 smanna12 marked this pull request as ready for review March 30, 2021 19:39
@smanna12 smanna12 changed the title [SYCL] Set macro to true on default mode [SYCL] Turn on -fsycl_id_queries_fit_in_int by default Mar 30, 2021
@smanna12 smanna12 changed the title [SYCL] Turn on -fsycl_id_queries_fit_in_int by default [SYCL] Turn on -fsycl-id-queries-fit-in-int by default Mar 30, 2021
@smanna12 smanna12 requested a review from erichkeane March 30, 2021 20:49
Copy link
Contributor

@erichkeane erichkeane left a comment

Choose a reason for hiding this comment

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

Seems ok to me.

@smanna12
Copy link
Contributor Author

smanna12 commented Mar 31, 2021

Thanks for the reviews.

I am seeing 35 ESIMD tests fail with the patch. The same patch does not cause any failure on downstream. Not sure why? @DenisBakhvalov or @bader, is there any way i could reproduce the failures locally?

http://icl-jenkins.sc.intel.com:8080/blue/organizations/jenkins/SYCL_CI%2Fintel%2FLin%2FLLVM_Test_Suite/detail/LLVM_Test_Suite/3023/pipeline

Copy link
Contributor

@AaronBallman AaronBallman left a comment

Choose a reason for hiding this comment

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

LGTM aside from precommit failures.

@smanna12
Copy link
Contributor Author

LGTM aside from precommit failures.

@DenisBakhvalov mentions that, it's because of the llvm.assume intrinsic in device code. BE compiler cannot handle them. So, we cannot enable SYCL_ID_QUERIES_FIT_IN_INT for ESIMD.

@DenisBakhvalov
Copy link
Contributor

LGTM aside from precommit failures.

@DenisBakhvalov mentions that, it's because of the llvm.assume intrinsic in device code. BE compiler cannot handle them. So, we cannot enable SYCL_ID_QUERIES_FIT_IN_INT for ESIMD.

Yes, and I'm not sure we can introduce any ESIMD-specific workaround (like we did previously) since we unified the SYCL-ESIMD compilation. I think the way to proceed here is to have vector GPU backend (used by ESIMD code) accept llvm.assume intrinsic. Unfortunately, this means that the current PR is blocked. Tagging @kbobrovs .

@kbobrovs
Copy link
Contributor

LGTM aside from precommit failures.

@DenisBakhvalov mentions that, it's because of the llvm.assume intrinsic in device code. BE compiler cannot handle them. So, we cannot enable SYCL_ID_QUERIES_FIT_IN_INT for ESIMD.

Yes, and I'm not sure we can introduce any ESIMD-specific workaround (like we did previously) since we unified the SYCL-ESIMD compilation. I think the way to proceed here is to have vector GPU backend (used by ESIMD code) accept llvm.assume intrinsic. Unfortunately, this means that the current PR is blocked. Tagging @kbobrovs .

ID as int is a big performance improvement for DPC++ in many cases, AFAIK. So, it would be good to have a w/a until ESIMD BE is ready to accepts these. It should be safe w/a to remove llvm.assume in ESIMD kernels for now. I will create a PR shortly.

@kbobrovs
Copy link
Contributor

kbobrovs commented Apr 1, 2021

I will create a PR shortly.

#3459

@smanna12
Copy link
Contributor Author

smanna12 commented Apr 1, 2021

I will create a PR shortly.

#3459

Thanks @kbobrovs for the w/a.

@kbobrovs
Copy link
Contributor

kbobrovs commented Apr 1, 2021

Two PRs should go in before this one, in this order: #3460, #3459

@kbobrovs
Copy link
Contributor

kbobrovs commented Apr 1, 2021

@smanna12, please rebase to latest llvm/sycl and rerun, ESIMD failures should be gone

@smanna12
Copy link
Contributor Author

smanna12 commented Apr 1, 2021

@smanna12, please rebase to latest llvm/sycl and rerun, ESIMD failures should be gone

Thanks @kbobrovs for the quick fix.

@smanna12
Copy link
Contributor Author

smanna12 commented Apr 1, 2021

All ESIMD tests are passing now. This patch is causing regressions for two SubGroup tests.
Failed Tests (2):

SYCL :: SubGroup/sub_group_as.cpp
SYCL :: SubGroup/sub_group_as_vec.cpp

I have created PR for fixing the failing Subgroup tests:
intel/llvm-test-suite#220

http://icl-jenkins.sc.intel.com:8080/blue/organizations/jenkins/SYCL_CI%2Fintel%2FLin%2FLLVM_Test_Suite/detail/LLVM_Test_Suite/3132/pipeline

smanna12 added a commit to smanna12/llvm-test-suite that referenced this pull request Apr 5, 2021
smanna12 added a commit to smanna12/llvm-test-suite that referenced this pull request Apr 5, 2021
@smanna12
Copy link
Contributor Author

smanna12 commented Apr 8, 2021

Rebasing and retesting PR after intel/llvm-test-suite#220 merge.

@smanna12
Copy link
Contributor Author

smanna12 commented Apr 8, 2021

@bader All pre-commit test failures are fixed.

I did not make any change to any of the files on this PR.

I am not sure why buildbot/Lit_with_Cuda is failing with warning like this:
lit WARNING: The PID of hang binary not found.

This worked fine couple of days ago with same patch. Is this expected?

@bader
Copy link
Contributor

bader commented Apr 8, 2021

@bader All pre-commit test failures are fixed.

I did not make any change to any of the files on this PR.

I am not sure why buildbot/Lit_with_Cuda is failing with warning like this:
lit WARNING: The PID of hang binary not found.

This worked fine couple of days ago with same patch. Is this expected?

@tfzhu, is the machine in a broken state?

@smanna12
Copy link
Contributor Author

smanna12 commented Apr 8, 2021

@bader All pre-commit test failures are fixed.
I did not make any change to any of the files on this PR.
I am not sure why buildbot/Lit_with_Cuda is failing with warning like this:
lit WARNING: The PID of hang binary not found.
This worked fine couple of days ago with same patch. Is this expected?

@tfzhu, is the machine in a broken state?

Thanks @bader and @tfzhu for fixing the problem.

@bader bader merged commit f27bb01 into intel:sycl Apr 9, 2021
vladimirlaz pushed a commit to intel/llvm-test-suite that referenced this pull request Jul 13, 2021
The changes are due to the PR: intel/llvm#3427

Signed-off-by: Soumi Manna <[email protected]>
smaslov-intel pushed a commit to smaslov-intel/llvm-test-suite that referenced this pull request Aug 12, 2021
The changes are due to the PR: intel/llvm#3427

Signed-off-by: Soumi Manna <[email protected]>
vladimirlaz pushed a commit to intel/llvm-test-suite that referenced this pull request Sep 2, 2021
aelovikov-intel pushed a commit to aelovikov-intel/llvm that referenced this pull request Mar 27, 2023
aelovikov-intel pushed a commit to aelovikov-intel/llvm that referenced this pull request Mar 27, 2023
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.

7 participants