Skip to content

Change ukernels calling convention to default - #16541

Merged
bjacob merged 1 commit into
mainfrom
bjacob-ukernel-cconv
Mar 1, 2024
Merged

bjacob merged 1 commit into
mainfrom
bjacob-ukernel-cconv

Conversation

@bjacob

@bjacob bjacob commented Feb 22, 2024

Copy link
Copy Markdown
Collaborator

This will be useful to introduce the mmt4d-query ukernel for #15784, as the default calling convention allows for scalar return values. This is also a cleanup in its own right: at this point, ukernels only use ParameterStruct calling convention for historical reasons.

@bjacob
bjacob changed the base branch from main to bjacob-delete-experimental-cpu-ukernel February 22, 2024 22:11
@bjacob
bjacob marked this pull request as ready for review February 22, 2024 23:22

@MaheshRavishankar MaheshRavishankar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to me. I think this is a better solution overall!

auto fn = getFnNameAndDefAttrs(ukernelName, rewriter, targetAttr);
SmallVector<Type> returnTypes{outType};
if (!isVMVXBackend(targetAttr)) {
// Hack to avoid issues with void-returning functions in llvm-cpu.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Not sure I would characterize this as a hack. This is a legit thing to do if the ukernel is returning a scalar value.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

but it's not! it's really a void-returning kernel and we're making it return an int... as a hack.

@bjacob
bjacob force-pushed the bjacob-delete-experimental-cpu-ukernel branch from cf3bb7b to 5a299ca Compare March 1, 2024 03:30
@bjacob
bjacob requested a review from stellaraccident as a code owner March 1, 2024 03:30
Base automatically changed from bjacob-delete-experimental-cpu-ukernel to main March 1, 2024 03:49
@bjacob
bjacob force-pushed the bjacob-ukernel-cconv branch from 3b8acd0 to 5b2d9ac Compare March 1, 2024 04:12
@bjacob
bjacob enabled auto-merge (squash) March 1, 2024 04:14
@bjacob
bjacob merged commit e6397cb into main Mar 1, 2024
@bjacob
bjacob deleted the bjacob-ukernel-cconv branch March 1, 2024 04:31
IanNod pushed a commit to IanNod/iree that referenced this pull request Mar 14, 2024
* iree: 7c9bb50 Start work on a new incremental LLVM integrate script.
(iree-org#14318) (Thu Jul 6 18:58:58 2023 -0700)
* xla: bbe8f5660 Update TFRT dependency to use revision
http://github.com/tensorflow/runtime/commit/f734f1785b225fd68fb8694765b290000ef15bb5.
(Fri Jul 7 10:30:10 2023 -0700)
* jax: ded88a83a Merge pull request iree-org#16541 from axch:ragged-transformer
(Fri Jul 7 11:23:59 2023 -0700)
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.

2 participants