#asahi-gpu · 2021-03-27 00:49
bloomDealing with personal stuff but still :<#asahi-gpu · 2021-03-27 00:49
bloomI really hate how inactive I've been#asahi-gpu · 2021-03-27 00:48
bloomIndeed.#asahi-gpu · 2021-03-27 00:48
DarkShadow44heh, should make things easier#asahi-gpu · 2021-03-27 00:48
bloomAnyway, G13 does *not* work this way.#asahi-gpu · 2021-03-27 00:47
DarkShadow44mh, I see#asahi-gpu · 2021-03-27 00:47
bloomCode like `a.xy + b.xz` can't be vectorized (exercise: why not?)#asahi-gpu · 2021-03-27 00:46
bloom...in theory. In practice it's a pain for compilers, sometimes more so than plain old vec4 hardware.#asahi-gpu · 2021-03-27 00:46
bloomSo in theoretical benchmarks, it means a 2x reduction in cycle count for 16-bit vs 32-bit workloads#asahi-gpu · 2021-03-27 00:46
bloomand fp16 is so much cheaper in hw than fp32 that it again works out#asahi-gpu · 2021-03-27 00:46
bloom^ integer#asahi-gpu · 2021-03-27 00:45
bloomIt follows naturally from 32-bit arithmetic. I.e. packed 2x16-bit add is the same as 32-bit add up to handling of carry bits.#asahi-gpu · 2021-03-27 00:45
bloomFor Mali, even have 4 channel 8-bit vectors targeting ML workloads#asahi-gpu · 2021-03-27 00:44
bloomSome AMD and Mali GPUs are scalar for 32-bit instructions, but allow 2 channel 16-bit vectors (what AMD markets as rapid packed math or sth)#asahi-gpu · 2021-03-27 00:43
bloomIt's.. cute#asahi-gpu · 2021-03-27 00:43
DarkShadow44what exactly is that "fp16vec2" thing?#asahi-gpu · 2021-03-27 00:43
DarkShadow44huh, interesting#asahi-gpu · 2021-03-27 00:42
bloomOlder GPU arches were genuinely vector, some newer ones (GCN, Bifrost) have a fp16vec2 thing going on, special oddball handling goes to Adreno which has a special "repeat N times" modifier :-p#asahi-gpu · 2021-03-27 00:42
bloomDifferent vendors cope with this in different ways.#asahi-gpu · 2021-03-27 00:42
bloom(Since everything is 4x worse over in graphics land, since you repeat the same instruction a bunch of times.)#asahi-gpu · 2021-03-27 00:41
bloom're not careful about code density, you'll blow through your i-cache budget#asahi-gpu · 2021-03-27 00:41
bloomIf you#asahi-gpu · 2021-03-27 00:41
bloomthat especially matters since G13 is a pure scalar arch, yet it's designed for graphics (vector) workloads#asahi-gpu · 2021-03-27 00:22
DarkShadow44need to make tests for that#asahi-gpu · 2021-03-27 00:22
DarkShadow44mh, it's a bit odd that the mask is one of the parts that are cut off#asahi-gpu · 2021-03-27 00:22
chrisfand so `mask` is always in play in the examples i have#asahi-gpu · 2021-03-27 00:21
chrisfoh, i guess the reason i might not have seen short load/store is i dont have examples of the packed cases#asahi-gpu · 2021-03-27 00:19
DarkShadow44yeah, easier on the cache#asahi-gpu · 2021-03-27 00:18
chrisfapple does appear willing to spend area making things not suck#asahi-gpu · 2021-03-27 00:18
Yuzuvariable length ops = higher density (typically, if done right)#asahi-gpu · 2021-03-27 00:17
chrisftradeoffs#asahi-gpu · 2021-03-27 00:17
DarkShadow44I thought an advantage of, for example, ARM was easier decoding due to fix lengths#asahi-gpu · 2021-03-27 00:16
DarkShadow44although I gotta admit, I don't understand in having the benefit of having variable length instructions like that#asahi-gpu · 2021-03-27 00:16
DarkShadow44no unknown bits is best#asahi-gpu · 2021-03-27 00:16
DarkShadow44I mean, I wouldn't necessarily use it, but it'd be good to know, IMHO#asahi-gpu · 2021-03-27 00:16
chrisfif you can show it does work then great#asahi-gpu · 2021-03-27 00:15
DarkShadow44Sure thing, but that's where tests come in, no?#asahi-gpu · 2021-03-27 00:15
chrisfthere's always stuff that doesnt work#asahi-gpu · 2021-03-27 00:14
chrisfi would be careful about things that you never see the metal compiler do -- they may well not actually work in silicon#asahi-gpu · 2021-03-27 00:13
chrisfah, `L` is always that, i see the note up the top now.#asahi-gpu · 2021-03-27 00:13
DarkShadow44most instructions support such a cut off#asahi-gpu · 2021-03-27 00:13
DarkShadow44neither have I, but maybe they planned it into the hardware#asahi-gpu · 2021-03-27 00:12
chrisfactually i dont think ive seen a non-8-byte load or store#asahi-gpu · 2021-03-27 00:11
DarkShadow44shoul cut off the last two bytes#asahi-gpu · 2021-03-27 00:11
chrisfwhat is this `L` bit?#asahi-gpu · 2021-03-27 00:11
DarkShadow44that doesn't mean we can't manually generate bytecode like that >:D#asahi-gpu · 2021-03-27 00:11
chrisfive never seen the metal compiler do that though#asahi-gpu · 2021-03-27 00:10
chrisfit's an interesting theory#asahi-gpu · 2021-03-27 00:09
DarkShadow44just a theory#asahi-gpu · 2021-03-27 00:09
DarkShadow44although, it raises a question: Since registers are specified as Rx:R, maybe bit 31 is for another "cut off"?