Skip to content

[SYCL][CUDA] Workaround for the problem with memory reordering #1334

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Mar 21, 2020

Conversation

againull
Copy link
Contributor

Currently there is a bug in LLVM for PTX target. PTX target specific
intrinsics like llvm.nvvm.barrier0 are treated like regular LLVM
intrinsics in Globals AA. As a result, there are situations when Globals
AA produces a result that barrier intrinsic doesn't modify internal
globals. This allows llvm transformations like GVN to perform illegal
memory reordering.

This is a workaround while permanent fix is not implemented in LLVM
project.

Signed-off-by: Artur Gainullin artur.gainullin@intel.com

Currently there is a bug in LLVM for PTX target. PTX target specific
intrinsics like llvm.nvvm.barrier0 are treated like regular LLVM
intrinsics in Globals AA. As a result, there are situations when Globals
AA produces a result that barrier intrinsic doesn't modify internal
globals. This allows llvm transformations like GVN to perform illegal
memory reordering.

This is a workaround while permanent fix is not implemented in LLVM
project.

Signed-off-by: Artur Gainullin <artur.gainullin@intel.com>
@againull
Copy link
Contributor Author

@bader , Could you please add @Naghasan as a reviewer? I can't do this for some reasons.

@bader
Copy link
Contributor

bader commented Mar 20, 2020

@bader , Could you please add @Naghasan as a reviewer? I can't do this for some reasons.

I can't, until he leaves a comment in this PR. :-)

Copy link
Contributor

@bader bader left a comment

Choose a reason for hiding this comment

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

@againull, I suggest you push it to llorg.

@bader bader merged commit 94cd66e into intel:sycl Mar 21, 2020
codeplay-sycl pushed a commit to codeplaysoftware/intel-llvm-mirror that referenced this pull request Oct 21, 2021
This patch attempts to generalise this workaround: intel#1334
@againull againull deleted the wa_for_mem_reordering branch December 3, 2022 00:02
AlexeySachkov pushed a commit that referenced this pull request Aug 2, 2023
…y point interfaces (PR #1334) (#10623)

This PR pulls in the following PR from upstream Khronos
SPIRV-LLVM-Translator repo:
KhronosGroup/SPIRV-LLVM-Translator#1334

`
This is a patch to expand the collection of entry point interfaces.
In SPIR-V 1.4 and later OpEntryPoint must list all global variables in
the
interface.
`
In addition, a couple of minor changes have been added to sync with
latest code.
This patch addresses #9958

Updated the following tests to sync with upstream as well:

llvm-spirv/test/extensions/INTEL/SPV_INTEL_inline_assembly/inline_asm_clobbers.cl

llvm-spirv/test/extensions/INTEL/SPV_INTEL_inline_assembly/inline_asm_constraints.cl

Thanks

---------

Signed-off-by: Arvind Sudarsanam <arvind.sudarsanam@intel.com>
mdtoguchi pushed a commit to mdtoguchi/llvm that referenced this pull request Oct 18, 2023
…y point interfaces (PR intel#1334) (intel#10623)

This PR pulls in the following PR from upstream Khronos
SPIRV-LLVM-Translator repo:
KhronosGroup/SPIRV-LLVM-Translator#1334

`
This is a patch to expand the collection of entry point interfaces.
In SPIR-V 1.4 and later OpEntryPoint must list all global variables in
the
interface.
`
In addition, a couple of minor changes have been added to sync with
latest code.
This patch addresses intel#9958

Updated the following tests to sync with upstream as well:

llvm-spirv/test/extensions/INTEL/SPV_INTEL_inline_assembly/inline_asm_clobbers.cl

llvm-spirv/test/extensions/INTEL/SPV_INTEL_inline_assembly/inline_asm_constraints.cl

Thanks

---------

Signed-off-by: Arvind Sudarsanam <arvind.sudarsanam@intel.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
cuda CUDA back-end
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants