#asahi-gpu · 2024-08-08 15:47
alyssawas slightly more complicated than that but yeah, added the test and indeed we're failing for large inputs#asahi-gpu · 2024-08-08 15:44
alyssareal#asahi-gpu · 2024-08-08 15:43
alyssaI would like math_bruteforce to test the full 2^32 input space because otherwise I have no confidence in writing the lowering correctly#asahi-gpu · 2024-08-08 15:42
alyssa:=/#asahi-gpu · 2024-08-08 15:42
alyssareciprocal is suspiciously absent from math_bruteforce#asahi-gpu · 2024-08-08 15:41
alyssaah. but does the CL CTS test it.#asahi-gpu · 2024-08-08 15:40
alyssaI guess libclc doesn't do divide?#asahi-gpu · 2024-08-08 15:38
alyssaalthough i dont actually see where we call libclc frcp#asahi-gpu · 2024-08-08 15:37
alyssaso that seems.. bad#asahi-gpu · 2024-08-08 15:36
alyssabut you need exact frcp! in the backend *anyway* for correct idiv#asahi-gpu · 2024-08-08 15:36
alyssakarolherbst: ook. so what I realized is real funny is that CL CTS is going to hit libclc for frcp#asahi-gpu · 2024-08-08 15:05
alyssamaybe not#asahi-gpu · 2024-08-08 15:04
alyssaI'm also wondering if there's a way to make lower idiv tolerate the error, for faster overall#asahi-gpu · 2024-08-08 15:04
alyssaneeds to be in-tree for idiv lowering anyhow#asahi-gpu · 2024-08-08 15:02
alyssamy aborted math degree came in handy!#asahi-gpu · 2024-08-08 15:02
alyssa:P#asahi-gpu · 2024-08-08 15:01
alyssagot it in 2#asahi-gpu · 2024-08-08 15:01
alyssaok#asahi-gpu · 2024-08-08 15:01
alyssalolz#asahi-gpu · 2024-08-08 15:01
alyssa----wait is that a newton raphson step#asahi-gpu · 2024-08-08 15:01
alyssarcp := fma(fma(-input, rcp, 1.0), rcp, rcp)#asahi-gpu · 2024-08-08 15:01
alyssaunder a certain condition it'll adjust the output as#asahi-gpu · 2024-08-08 15:00
alyssathe other part though I don't quite understand yet#asahi-gpu · 2024-08-08 15:00
alyssa*denominators#asahi-gpu · 2024-08-08 15:00
alyssaone part is a scaling like scale_fdiv, to reduce the domain for large denomintaors#asahi-gpu · 2024-08-08 15:00
alyssathere are two parts to the lowering#asahi-gpu · 2024-08-08 15:00
alyssathis is... subtle#asahi-gpu · 2024-08-08 14:50
alyssamore complex, gimme a few mins#asahi-gpu · 2024-08-08 14:48
alyssacute.#asahi-gpu · 2024-08-08 14:48
alyssakarolherbst: frcp with -no-fast-math has lowering indeed. ughhh. #asahi-gpu · 2024-08-08 14:48
alyssaoh, jeez, ugh!#asahi-gpu · 2024-08-08 14:45
alyssabut AGX gives 32A60001#asahi-gpu · 2024-08-08 14:45
alyssashould be 32A60000#asahi-gpu · 2024-08-08 14:44
alyssafrcp(0x4C4565C8)#asahi-gpu · 2024-08-08 14:44
alyssayeah..#asahi-gpu · 2024-08-08 14:42
alyssahm no that should be ok#asahi-gpu · 2024-08-08 14:41
alyssaer wait#asahi-gpu · 2024-08-08 14:40
alyssayes#asahi-gpu · 2024-08-08 14:40
alyssaalthough Metal's docs claim that 1.0 / x is correctly rounded#asahi-gpu · 2024-08-08 14:39
alyssaI mean I'm just plumbing through the hardware frcp here#asahi-gpu · 2024-08-08 14:39
alyssaplausible#asahi-gpu · 2024-08-08 14:37
alyssaIDK if this is an AGX backend bug or a nir_lower_idiv bug, strictly#asahi-gpu · 2024-08-08 14:37
alyssaand that off-by-1 propagates to the totally wrong final rsult#asahi-gpu · 2024-08-08 14:36
alyssaagx has an off-by-1 compared to my cpu#asahi-gpu · 2024-08-08 14:36
alyssaint((1.0 / float(b)) * (4294966784.0))#asahi-gpu · 2024-08-08 14:36
alyssathe problem is the value of `rcp` at the start#asahi-gpu · 2024-08-08 14:36
alyssakarolherbst: ok, this is interesting#asahi-gpu · 2024-08-08 14:31
alyssapoking at idiv#asahi-gpu · 2024-08-08 14:16
alyssabuilds rusticl#asahi-gpu · 2024-08-08 13:36
alyssarebuilds piglit