Dave Airlie

@airlied@floss.social

@gfxstrand how do we all feel about variable number of sources for nir intrinsics? 馃檪

August 12, 2025 at 2:41:05 AM

That sounds like a refactor from hell... I mean, maybe it's okay. But it'd be quite a bit of work. What did you have in mind?

OpCooperativeMatrixPerElementOpNV takes a variable number of sources, and passes them to a function as extra sources. I'm pondering a new instr type vs enhancing the current intrinsic? vs making 10 variants of the intrinsic (and hoping)

intrinsic("cmat_per_element_0", src_comp=[-1, -1, -1])
intrinsic("cmat_per_element_1", src_comp=[-1, -1, -1, -1])
intrinsic("cmat_per_element_2", src_comp=[-1, -1, -1, -1, -1])
intrinsic("cmat_per_element_3", src_comp=[-1, -1, -1, -1, -1, -1])

Replying to someone

I kinda over l wonder if that shouldn't be a juiced call instruction instead. But really, there's nothing in NIR at all like this.

Okay, but what if instead of a call, the call op had the semantics of doing an argument bind and returning a closure that then gets passed to another op...

I'm not saying this is a good idea. I'm just thinking out loud here.

Replying to someone

actually this might not be a bad idea, I'll play around with it a bit once I get my hacky 0/1/2 to pass some tests!

Elk Logo

Welcome to Elk!

Elk is a nimble Mastodon web client. You can login to your Mastodon account and use it to interact with the fediverse.

Expect some bugs and missing features here and there. Elk is Open Source and we're actively improving it as a community project. Join us and let's build it together!

If you'd like to report a bug, help us testing, give feedback, or contribute, reach out to us on GitHub and get involved.

To boost development, you can sponsor the Team through GitHub Sponsors. We hope you enjoy Elk!

涓夊挷鏅哄瓙 Kevin DengAnthony FuPatakDaniel RoeJoaqu铆n S谩nchezTAKAHASHI Shuuji

The Elk Team