Skip to content

[XLA][AMDGPU] use AddrSpaceCast to access GlobalVariable on AMDGPU#20754

Merged
tensorflow-copybara merged 1 commit intotensorflow:masterfrom
ROCm:upstream-staging-xla-globalvariable-addrspacecast
Jul 14, 2018
Merged

[XLA][AMDGPU] use AddrSpaceCast to access GlobalVariable on AMDGPU#20754
tensorflow-copybara merged 1 commit intotensorflow:masterfrom
ROCm:upstream-staging-xla-globalvariable-addrspacecast

Conversation

@whchung
Copy link
Copy Markdown
Contributor

@whchung whchung commented Jul 12, 2018

In XLA kernels pointers are in default address space (0). On LLVM AMDGPU
backend, all GlobalVariable instances must be in global address space (1).
Therefore an AddrSpaceCast is required for AMDGPU backend. To cope with
existing NVPTX backend, use ConstantExpr::getPointerBitCastOrAddrSpaceCast
in this commit.

In XLA kernels pointers are in default address space (0). On LLVM AMDGPU
backend, all GlobalVariable instances must be in global address space (1).
Therefore in an AddrSpaceCast is required for AMDGPU backend. To cope with
existing NVPTX backend, use ConstantExpr::getPointerBitCastOrAddrSpaceCast
in this commit.
@whchung
Copy link
Copy Markdown
Contributor Author

whchung commented Jul 12, 2018

@jlebar this is a patch in XLA to cope with the special property held by LLVM AMDGPU backend

@jlebar
Copy link
Copy Markdown
Contributor

jlebar commented Jul 12, 2018

@qlzh727 can you help merge this?

@whchung
Copy link
Copy Markdown
Contributor Author

whchung commented Jul 13, 2018

@qlzh727 the error in "Ubuntu Sanity" target seems to have nothing to do with this PR but a configuration in the test environment. is it possible to force restart the test?

@qlzh727 qlzh727 added the kokoro:force-run Tests on submitted change label Jul 13, 2018
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Jul 13, 2018
@jlebar jlebar assigned jlebar and unassigned qlzh727 Jul 13, 2018
@jlebar
Copy link
Copy Markdown
Contributor

jlebar commented Jul 13, 2018

I will attempt to merge this.

@tensorflow-copybara tensorflow-copybara merged commit 5c0af75 into tensorflow:master Jul 14, 2018
tensorflow-copybara pushed a commit that referenced this pull request Jul 14, 2018
…xla-globalvariable-addrspacecast

PiperOrigin-RevId: 204560820
@sunway513 sunway513 deleted the upstream-staging-xla-globalvariable-addrspacecast branch May 4, 2019 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes ready to pull PR ready for merge process

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants