Skip to content

[SYCL][ESIMD][NewPM] Add ESIMDVerifierPass to new PM pipeline in CodeGen #5298

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

Conversation

mlychkov
Copy link
Contributor

Signed-off-by: Mikhail Lychkov [email protected]

@mlychkov mlychkov requested review from a team as code owners January 13, 2022 06:56
AlexeySachkov
AlexeySachkov previously approved these changes Jan 13, 2022
smanna12
smanna12 previously approved these changes Jan 13, 2022
@mlychkov
Copy link
Contributor Author

The full set of fixes for new PM also validated in #4860.

@@ -1385,6 +1385,12 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
// configure the pipeline.
OptimizationLevel Level = mapToLevel(CodeGenOpts);

if (LangOpts.SYCLIsDevice)
Copy link
Contributor

Choose a reason for hiding this comment

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

ESIMD verification should ideally run even if LLVM passes are disabled, as this is logically part of FE semantic analysis.
@sndmitriev - what do you think?

Copy link
Contributor

@AlexeySachkov AlexeySachkov Jan 17, 2022

Choose a reason for hiding this comment

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

ESIMD verification should ideally run even if LLVM passes are disabled, as this is logically part of FE semantic analysis.
@sndmitriev - what do you think?

Please note that disable-llvm-passes disables even such passes as AlwaysInline, which are required to preserve the semantics of always_inline attribute, i.e. the flag literally says disable llvm passes, not optimization or transformation passes, but llvm passes.

My understanding is that the flag is not intended to be used by end users unless they know what they are doing and therefore, I would prefer to leave ESIMD verification disabled if -disable-llvm-passes is present.

@bader, what do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with Alexey. -disable-llvm-passes is supposed to disable all LLVM passes with no exceptions.
I think what Konst has in mind is that ESIMD verifier pass should run even with -O0.

Copy link
Contributor

Choose a reason for hiding this comment

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

ESIMD verification should ideally run even if LLVM passes are disabled, as this is logically part of FE semantic analysis.

Can we move the logic of this pass to FE Sema then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kbobrovs @sndmitriev Could you please provide any comments?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry for delay.
Unfortunately, we can't move this to Sema as it was identified as very time-consuming task by the FE team, so we went with the simpler solution.

I think what Konst has in mind is that ESIMD verifier pass should run even with -O0.

Yes, exactly.

Copy link
Contributor

@kbobrovs kbobrovs left a comment

Choose a reason for hiding this comment

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

Not running ESIMDVerifier with O0 is a deal breaker for ESIMD.

@AlexeySachkov
Copy link
Contributor

Not running ESIMDVerifier with O0 is a deal breaker for ESIMD.

This patch doesn't disable ESIMDVerifier in -O0, because -disable-llvm-passes is not -O0. At -O0 some passes are still run

Signed-off-by: Mikhail Lychkov <[email protected]>
@mlychkov
Copy link
Contributor Author

Not running ESIMDVerifier with O0 is a deal breaker for ESIMD.

The test is updated to check that ESIMDVerifier pass is executed for O0 opt level as well.

@mlychkov
Copy link
Contributor Author

Looks like failure of HIP tests is caused by #5374.

@bader
Copy link
Contributor

bader commented Jan 27, 2022

Looks like failure of HIP tests is caused by #5374.

I don't think so. These tests were passing in #5374 pre-commit. It might be due to a conflict with some other changes or maybe tested sources didn't have #5374 changes. Could you update your branch to make sure that #5374 is included, please?

@mlychkov
Copy link
Contributor Author

mlychkov commented Feb 2, 2022

Another one failure due to CI infra problems. Raised an issue and restarted failed job.

@bader bader merged commit 97a61a7 into intel:sycl Feb 2, 2022
@mlychkov mlychkov deleted the private/mlychkov/newPM_add_esimd_vrfy_pass branch February 2, 2022 10:55
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.

6 participants