-
Notifications
You must be signed in to change notification settings - Fork 755
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
SYCL passes depends on AMDGPU Remove Incompatible Functions unexpectedly #10816
Comments
I have a branch that exhibits the behaviour at: I also reduced the test-case to an
target datalayout = "e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-p7:160:256:256:32-p8:128:128-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7:8"
target triple = "amdgcn-amd-amdhsa"
define internal fastcc float @__ocml_tanh_f32() {
ret float 0.000000e+00
} None of SYCL passes are to be blamed, with both local accessor and global offset disabled the tests still crashes. Seems like SYCL requires the AMDGPURemoveIncompatibleFunctions pass to be run later on (was move to IRPasses, needs to be in CoedeGenPrepare stage). Investigating why that is. |
This looks like git gone wrong, see the difference in:
The SYCL version incorrectly removes |
@jsji I've verified that reinstating the Feel free to reopen this ticket/submit a new one should new failure surface. Thank you. |
It was a cherry pick gone wrong on my side, re-opening to investigate further. |
If we take as an example math tests and only focus on a single invocation of The call to Now, because the AMD's target machine pass pipeline has been reordered it runs %call3.i.i.i = tail call fastcc noundef <4 x float> null(<4 x float> noundef %agg.tmp.sroa.0.0.copyload.i) As all the libclc functions are marked with always inline, it used to work well, as we would always replace the problematic vector function calls with exploded scalar versions of I will reach out to Matt asking for reasoning behind the incompatible functions pass reshuffle, in the meantime there is nothing we can do, apart for making sure that |
A link to the discussion on the original patch: https://reviews.llvm.org/D155987#4598269 |
Describe the bug
In Pulldown #10783 test, we met large number of failures on AMDGPU.
eg:
https://github.com/intel/llvm/actions/runs/5849224567/job/15857444183
Example failures are:
To Reproduce
Merge 5b5bd81 into sycl branch or merge the pulldown PR.
Environment (please complete the following information):
Additional context
According the the pass manager, it is highly possible that the following two SYCL passes somehow depends on "AMDGPU Remove Incompatible Functions" to remove some bad functions.
; GCN-O1-NEXT: SYCL Local Accessor to Shared Memory
; GCN-O1-NEXT: SYCL Add Implicit Global Offset
; GCN-O1-NEXT: FunctionPass Manager
; GCN-O1-NEXT: FPBuiltin Function Selection
; GCN-O1-NEXT: AMDGPU Remove Incompatible Functions
The text was updated successfully, but these errors were encountered: