Skip to content

Conversation

@tcreech-intel
Copy link
Contributor

@tcreech-intel tcreech-intel commented Aug 15, 2022

Add -fsycl-link-huge-device-code as a driver option. When enabled, the driver
generates a linker script which directs the linker to place device code
later in the binary, which makes it less likely to create a distance
larger than that which a PC32 relocation can span.

For example, if a 3GB __clang_offload_bundle__ section is placed betwen
.text and .rodata, a PC32 relocation to .rodata in the .text is not
possible. With this option enabled the device code will be placed after
both rather than between them.

Add -fsycl-huge-device-code as a driver option. When enabled, the driver
generates a linker script which directs the linker to place device code
later in the binary, which makes it less likely to create a distance
larger than that which a PC32 relocation can span.

For example, if a 3GB __clang_offload_bundle__ section is placed betwen
.text and .rodata, a PC32 relocation to .rodata in the .text is not
possible. With this option enabled the device code will be placed after
both rather than between them.
@tcreech-intel tcreech-intel marked this pull request as ready for review August 16, 2022 15:41
@tcreech-intel tcreech-intel requested review from a team as code owners August 16, 2022 15:41
mdtoguchi
mdtoguchi previously approved these changes Aug 16, 2022
Copy link
Contributor

@mdtoguchi mdtoguchi left a comment

Choose a reason for hiding this comment

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

LGTM,Thanks!

@tcreech-intel
Copy link
Contributor Author

There is 1 failing LIT test in "SYCL / Linux / OCL x64 LLVM Test Suite" which appears unrelated. Others have mentioned that it should be fixed by intel/llvm-test-suite#1040.

@tcreech-intel
Copy link
Contributor Author

Hi @intel/dpcpp-doc-reviewers -- could you please take a look at the UsersManual.md addition for this PR?

pvchupin
pvchupin previously approved these changes Aug 18, 2022
@tcreech-intel
Copy link
Contributor Author

@intel/llvm-gatekeepers, I think this PR is ready in terms of reviews.

However, it had one unrelated LIT failure in "SYCL / Linux / OCL x64 LLVM Test Suite" which should be fixed by intel/llvm-test-suite#1040.

Can the PR be merged with testing in this state, or is it recommended that I re-run it?

@steffenlarsen
Copy link
Contributor

Previously approved by intel/dpcpp-doc-reviewers and only minor amendments since. Merging this.

@steffenlarsen steffenlarsen merged commit f963062 into intel:sycl Aug 24, 2022
@tcreech-intel tcreech-intel deleted the sycl_huge_device_code branch August 24, 2022 13:53
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