Skip to content

[SYCL][E2E] Conditionally use -fsycl-embed-ir flags in KernelFusion e2e tests #14249

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 4 commits into from
Jun 21, 2024

Conversation

ayylol
Copy link
Contributor

@ayylol ayylol commented Jun 20, 2024

-fsycl-embed-ir flag is only used when building the KernelFusion tests if there is a cuda or hip device. This removes the "argument unused during compilation" warning when running this test on other platforms.

@ayylol ayylol requested a review from a team as a code owner June 20, 2024 18:27
@bader
Copy link
Contributor

bader commented Jun 20, 2024

@intel/dpcpp-kernel-fusion-reviewers, this change makes me wonder: why do we report a warning in the first place? If I get it right, users have to add -fsycl-embed-ir flag when compile for NVIDIA or AMD targets, but it's not required for SPIR targets.
Can we consider embedding IR by default to make user experience unified across all targets?

@mdtoguchi, FYI.

@ayylol
Copy link
Contributor Author

ayylol commented Jun 20, 2024

@intel/dpcpp-kernel-fusion-reviewers, this change makes me wonder: why do we report a warning in the first place? If I get it right, users have to add -fsycl-embed-ir flag when compile for NVIDIA or AMD targets, but it's not required for SPIR targets. Can we consider embedding IR by default to make user experience unified across all targets?

@mdtoguchi, FYI.

Hey, too add on to this: I did some limited testing on a machine with a CUDA device, and the tests seem to pass with or without the compile flag. I was unsure whether I should have removed it, but I went through with making it optional instead because of this mention in the docs.

@bader
Copy link
Contributor

bader commented Jun 20, 2024

@intel/dpcpp-kernel-fusion-reviewers, this change makes me wonder: why do we report a warning in the first place? If I get it right, users have to add -fsycl-embed-ir flag when compile for NVIDIA or AMD targets, but it's not required for SPIR targets. Can we consider embedding IR by default to make user experience unified across all targets?
@mdtoguchi, FYI.

Hey, too add on to this: I did some limited testing on a machine with a CUDA device, and the tests seem to pass with or without the compile flag. I was unsure whether I should have removed it, but I went through with making it optional instead because of this mention in the docs.

I hope @intel/dpcpp-kernel-fusion-reviewers team can say which tests require this option and where we can drop it.

@sommerlukas
Copy link
Contributor

@intel/dpcpp-kernel-fusion-reviewers, this change makes me wonder: why do we report a warning in the first place? If I get it right, users have to add -fsycl-embed-ir flag when compile for NVIDIA or AMD targets, but it's not required for SPIR targets. Can we consider embedding IR by default to make user experience unified across all targets?

Embedding the IR by default would have a notable impact on binary size, which is particularly relevant for libraries. As the kernel fusion feature is only an experimental feature, we therefore decided against embedding by default.

Generally, I would assume that the tests that specify the flag also need it, but we will investigate the details.

An alternative approach to this PR would be to make sure that the warning isn't printed in the clang frontend. This would not only result in the tests not printing it anymore, but would fix the warning for all users.

@ayylol ayylol temporarily deployed to WindowsCILock June 21, 2024 17:39 — with GitHub Actions Inactive
@ayylol ayylol temporarily deployed to WindowsCILock June 21, 2024 18:46 — with GitHub Actions Inactive
@ayylol ayylol temporarily deployed to WindowsCILock June 21, 2024 18:54 — with GitHub Actions Inactive
@ayylol ayylol temporarily deployed to WindowsCILock June 21, 2024 19:08 — with GitHub Actions Inactive
@ayylol ayylol temporarily deployed to WindowsCILock June 21, 2024 19:11 — with GitHub Actions Inactive
@ayylol ayylol temporarily deployed to WindowsCILock June 21, 2024 19:36 — with GitHub Actions Inactive
@againull againull closed this Jun 21, 2024
@againull againull reopened this Jun 21, 2024
@againull againull merged commit 452e746 into intel:sycl Jun 21, 2024
26 of 27 checks passed
@ayylol ayylol deleted the e2e-kernelfusion branch June 23, 2024 06:13
@sommerlukas
Copy link
Contributor

sommerlukas commented Jul 1, 2024

Generally, I would assume that the tests that specify the flag also need it, but we will investigate the details.

I investigated this, on my machine, 25 tests failed as intended for the CUDA backend when the embed IR flag was not correctly defined.

However, I used the opportunity to improve some of the tests and drop the flag from some tests that don't require it: #14366

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.

5 participants