#asahi-gpu · 2021-04-17 04:14
bloom{13: 1024, 14: 896, 15: 832, 16: 832, 17: 768, 18: 704, 19: 640, 20: 640, 21: 576, 22: 576, 23: 576, 24: 512, 25: 512, 26: 512, 27: 448, 28: 448, 29: 448, 30: 384, 31: 384}#asahi-gpu · 2021-04-17 04:14
bloom>>> { x: math.floor((SZ_ / (x*4*4)) / 64) * 64 for x in range(13, 32) }#asahi-gpu · 2021-04-17 04:14
bloomand indeed:#asahi-gpu · 2021-04-17 04:14
bloom^ smack int he middle#asahi-gpu · 2021-04-17 04:14
bloom212992 = ((384 + 448)/2) * 32 * 4 * 4#asahi-gpu · 2021-04-17 04:13
bloombut if you take SZ to be somewhere in betwee, everything rounds right#asahi-gpu · 2021-04-17 04:13
bloombut if you doubled that, you would expect the last thread count to double#asahi-gpu · 2021-04-17 04:13
bloomIf you take SZ = 384 * (32 * 4 * 4), everything is too small except the biggest#asahi-gpu · 2021-04-17 04:12
bloomAhhh!#asahi-gpu · 2021-04-17 04:11
bloomah!#asahi-gpu · 2021-04-17 04:08
bloomuh no#asahi-gpu · 2021-04-17 04:08
bloomI guess this is all of-by-one#asahi-gpu · 2021-04-17 04:07
bloomwhich is less than the 448 actually issues#asahi-gpu · 2021-04-17 04:07
bloom423.7241379310345#asahi-gpu · 2021-04-17 04:07
bloom>>> SZ / (29*16)#asahi-gpu · 2021-04-17 04:07
bloomSZ = (128*4)*384#asahi-gpu · 2021-04-17 04:06
bloomWhat am I missing#asahi-gpu · 2021-04-17 04:06
bloomnumbers still feel suspect.#asahi-gpu · 2021-04-17 04:05
bloomit's past midnight i cant units#asahi-gpu · 2021-04-17 04:04
bloomuh yes#asahi-gpu · 2021-04-17 04:04
bloomuh no#asahi-gpu · 2021-04-17 04:03
bloomSo.. a 192kb register file#asahi-gpu · 2021-04-17 04:02
bloomI guess that's a linear allocation, just a lot of rounding needed#asahi-gpu · 2021-04-17 03:58
bloomdougall: https://github.com/AsahiLinux/gpu/commit/f6dba34f41d957820ae880ffdf8fce8e42b1ecd1#asahi-gpu · 2021-04-17 03:52
bloomjust bruteforces#asahi-gpu · 2021-04-17 03:51
bloomr0-r3#asahi-gpu · 2021-04-17 03:50
bloomIf Q >= 14, you have less. I was about to say I had the formula but my formula is buggy, hang on#asahi-gpu · 2021-04-17 03:48
bloomIf Q <= 13, then you have 1024 threads.#asahi-gpu · 2021-04-17 03:48
bloom(call that Q)#asahi-gpu · 2021-04-17 03:48
bloomSo, in terms of the "register quadwords" field in the cmdstream:#asahi-gpu · 2021-04-17 03:46
bloomJust dumped maxTotalThreadsPerThreadgroup and varied register pressure systematically#asahi-gpu · 2021-04-17 03:46
bloomactually r/e is a stretch#asahi-gpu · 2021-04-17 03:46
bloomdougall: Ok, I just r/e'd thread count#asahi-gpu · 2021-04-17 03:21
bloomSo rsqrt_special(+inf) needs to be some positive number.#asahi-gpu · 2021-04-17 03:20
bloombut rsqrt(+inf) = 0.0 and 0.0 * +inf = NaN (indeterminate form)#asahi-gpu · 2021-04-17 03:20
bloomlikewise, we want sqrt(+inf) = +inf#asahi-gpu · 2021-04-17 03:19
bloomwhich holds if we set rsqrt(-0.0) = 0.0 since 0.0 * -0.0 = -0.0#asahi-gpu · 2021-04-17 03:19
bloomalso need sqrt(-0.0) = -0.0#asahi-gpu · 2021-04-17 03:18
bloomso rsqrt_special has to define rsqrt(0) to be finite (which is wrong)#asahi-gpu · 2021-04-17 03:17
bloomrsqrt(0) is probably NaN and NaN * 0 = NaN, yet sqrt(0) = 0#asahi-gpu · 2021-04-17 03:17
bloomProbably the usual suspects: NaN, Inf, signed zero#asahi-gpu · 2021-04-17 03:11
bloombut we already.. had rsqrt#asahi-gpu · 2021-04-17 03:11
bloomso it's in fact rsqrt#asahi-gpu · 2021-04-17 03:10
bloomit's actually sqrt(x) = f(x) * x#asahi-gpu · 2021-04-17 03:10
bloomthe thing I called sqrt, call it f(x)#asahi-gpu · 2021-04-17 03:10
bloomdougall: Oh, ouch, embarassing - misread the sqrt op#asahi-gpu · 2021-04-17 03:03
bloomthe way it schedules the scalarization of vec4 arithmetic is suggestive#asahi-gpu · 2021-04-17 03:03
blooma bit of a hunch looking at a funny shader I compiled -- looks like integer ALU issues 2 insructions at once, maybe?#asahi-gpu · 2021-04-17 02:52
bloomnote to self: r5 appears preloaded with vertex id in vs#asahi-gpu · 2021-04-17 02:09
bloom(that could be granularity of 8 instead, for example. etc)