This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Remove invalid testcase for enqueue kernel
ClosedPublic

Authored by arsenm on Dec 23 2022, 3:34 PM.

Details

Reviewers
yaxunl
rampitec
Group Reviewers
Restricted Project
Summary

The call didn't have the right calling convention, but calls to
kernels are supposed to be illegal anyway.

Diff Detail

Event Timeline

arsenm created this revision.Dec 23 2022, 3:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 23 2022, 3:34 PM
arsenm requested review of this revision.Dec 23 2022, 3:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 23 2022, 3:34 PM
Herald added a subscriber: wdng. · View Herald Transcript

Unfortunately OpenCL allows calls to kernels. We even had a pass to lower such calls.

Unfortunately OpenCL allows calls to kernels. We even had a pass to lower such calls.

That’s hacked around separately

It seems to remove the test when a caller is in a called function, because the called function is a kernel. But should it be an another function it shall be valid, yet I do not see such test. This is in fact what it would become after kernel call lowering. It seems worth to add such test with a non-kernel caller.

arsenm added a comment.Jan 5 2023, 7:41 AM

It seems to remove the test when a caller is in a called function, because the called function is a kernel. But should it be an another function it shall be valid, yet I do not see such test. This is in fact what it would become after kernel call lowering. It seems worth to add such test with a non-kernel caller.

We probably should have a separate phase ordering test for the current scheme, which is not what we have here. However, I'm working on a patch to move this into clang since the comment at the top of the file explaining why this is impossible is wrong

It seems to remove the test when a caller is in a called function, because the called function is a kernel. But should it be an another function it shall be valid, yet I do not see such test. This is in fact what it would become after kernel call lowering. It seems worth to add such test with a non-kernel caller.

We probably should have a separate phase ordering test for the current scheme, which is not what we have here. However, I'm working on a patch to move this into clang since the comment at the top of the file explaining why this is impossible is wrong

But the test for a call for a non-inlined regular function is still needed regardless of pass ordering.

It seems to remove the test when a caller is in a called function, because the called function is a kernel. But should it be an another function it shall be valid, yet I do not see such test. This is in fact what it would become after kernel call lowering. It seems worth to add such test with a non-kernel caller.

We probably should have a separate phase ordering test for the current scheme, which is not what we have here. However, I'm working on a patch to move this into clang since the comment at the top of the file explaining why this is impossible is wrong

But the test for a call for a non-inlined regular function is still needed regardless of pass ordering.

It doesn't matter after D141701, this callgraph analysis is broken anyway

ping, the test is simply invalid. calls to kernels would never be considered here

yaxunl accepted this revision as: yaxunl.Apr 20 2023, 6:08 AM

LGTM

This revision is now accepted and ready to land.Apr 20 2023, 6:08 AM