runtime sve support #1365
Replies: 4 comments 15 replies
-
aggregationAggregation as is might or might not work depending on can we create an array of sve registers. Struct with 2 registers we probably can. Also will see |
Beta Was this translation helpful? Give feedback.
-
Wr Shuffle: What exactly is missing from what we have currently? |
Beta Was this translation helpful? Give feedback.
-
Wr cardinal |
Beta Was this translation helpful? Give feedback.
-
For the sve register in a struct, IIRC there is a arm specific macro for allowing them that sya the struct is sizeless itself. |
Beta Was this translation helpful? Give feedback.
-
UPD: current roadblock, you can put a runtime sve register inside
wide
https://godbolt.org/z/YY7a6vfKGThe more I think about it, the more I believe that we actually have a reasonable opportunity to fit runtime sve into our model.
So far quite a bit of code I wrote, would work no problem with a runtime sve and / or can be tweaked to do so.
If we can't/don't want to support something with runtime sve at the moment - we can just not. But let's support runtime sve where it doesn't cost us anything.
Here is what I see:
New cardinal type
eve::relative<T, int pow2>
. I don't like the name though, maybeeve::relative_cardnal
but we haveeve::fixed
and noteve::fixed_cardinal
.The idea is that it allows you to specify the cardinal with relation to expected cardinal, so
eve::relative<int, -1>
- half the expected cardinal forint
.FAQ:
eve::relative<-1>
and be "half the register"? The problem is, it does not convert between types.wide<tuple<int, double>
- what does that have? full or half?eve::relative<int, -1>
iseve::relative<double -2>
why not just have the size of t in there?
we can, then it behaves somewhat like a rational number.
reg_byte_size * (1 / sizeof(T))^ (part)
I think might be more confusing.
what happens on platfroms with fixed registers?
this becomes just a typedef for
fixed
what if you give us coefficient less that makes reg size 0?
UB. Or we can assert.
Can we still use fixed?
I can still be useful to do
eve::wide<int, eve::fixed<4>>
. And we can make it work in case when this is less than the actual register size. So - less than 16 bytes - 100% we can. I think we should.What about shuffles (one register)?
Well - the good news is that we can do runtime masks. The bad news is that we use constexpr patterns.
I think we'd need a new
pattern
type -formula
. And we store them asformulas
.For sve we just convert the
formula
to runtime mask.What about shuffles 2 registers
We will see, I don't have a good idea yet.
Should we do it?
I think yes - 100%, it would be really cool and is not like "that" hard. Even if give people like
transform
reduce
combined withzip
, I think the''d be pretty happy.Beta Was this translation helpful? Give feedback.
All reactions