10:02karolherbst: mareko: any thoughts on returning caps->uma = true for AMD APUs? I don't even know if it's used for anything outside of CL or DRI.. but at least for CL I'd like to rely on this cap to do proper global memory size reporting
12:59dj-death: what NIR passes should be running so that I can get this kind of change https://pastebin.com/1E1zs74u ?
13:00dj-death: I'm currently running a loop with opt_algebraic, opt_copy_prop, opt_constant_folding, opt_dce
13:00dj-death: but that's not enough
13:01pendingchaos: dj-death: I'd expect %414 to become a constant because of nir_opt_constant_folding
13:01pendingchaos: I don't know what %41 is, though
13:02dj-death: pendingchaos: sorry, typo, I meant %1
13:02dj-death: pendingchaos: the new 64bit constant
13:02dj-death: heh
13:02dj-death: should have been 0x40 as constant too
13:02dj-death: 4 << 4
13:04pendingchaos: just one pass of nir_opt_constant_folding should do that then
13:45alyssa: dj-death: incidentally, dpeneding where this is coming from, you might be able to `b->constant_fold_alu = true` to do this on the fly
13:45alyssa: algebraic does that
14:22dj-death: will debug some more
14:23mareko: karolherbst: it's fine
15:03alyssa: it would be nice if opt_algebraic was idempotent, though..
15:04zmike: what's the best way to eliminate phi instrs after lower_vars_to_ssa? I'm doing opt_remove_phis but there's still some left
15:08glehmann: maybe those phis are required then?
15:09mareko: lower_phis_to_vars? ;)
15:10pendingchaos: maybe nir_opt_cse (or even nir_opt_gcm(, true)) before it, to help nir_opt_remove_phis know that two phi sources are equal
15:10pendingchaos: nir_opt_gcm might be risky for performance, though
15:12zmike: https://gitlab.freedesktop.org/zmike/mesa/-/snippets/7881 15:12zmike: seems like opt_remove_phis won't eliminate those no matter where it's run
15:14glehmann: because opt_remove_phis is only an optimitation, and your phis are required for SSA. I guess you could go out of SSA to remove them
15:15glehmann: why do you want to remove those phis?
15:16zmike: because otherwise I have to implement phi handling in my backend
15:16zmike: but maybe I should just bite the bullet and do that
15:17glehmann: looks like zink currently uses nir_convert_from_ssa for that
15:18zmike: unfortunately this isn't zink
15:18glehmann: what is this?
15:18zmike: tbd
15:19glehmann: but yeah, your options are either implementing phis, or using nir_convert_from_ssa and implementing registers
15:21zmike: I can do one of those things
15:21zmike: probably
15:21mareko: control flow in SSA is impossible without phis according to established SSA definitions
15:24glehmann: without knowing more about your backend, it's hard to give advice. If you target is another IR that has phis, implement phis. If it's a hw backend, then it depends on how you deal with control flow and RA. Any serious backend should use ssa nowadays, but if you want something simple that works, not having to implement SSA lowering on your own might be better
15:31mareko: and I meant *formal* SSA definitions, not only the code we have in Mesa
15:33zmike: okay good tips
15:53alyssa: what are you trying to do?
15:55alyssa: mareko: (or something equivalent to phis... block parameters are popular.)
15:56alyssa: https://2pi.dk/2022/05/bb-arguments 15:56alyssa: NAK does something close to that although it calls them phis
16:00glehmann: is there a spirv alu instruction that has a float operand that doesn't have the same base type as the first operand?
16:00glehmann: I noticed that vtn's fast math handling is kind of broken because we only consider dest type
16:01glehmann: and e.g. for comparisons that means we always ignore fast math
16:01glehmann: the questions is if taking the union of the dest type's and first operands's fast math is enough
17:43anholt: glehmann: none that I can come up with.
18:31agd5f: has anyone given any thought to an interface for the equivalent of top/ps for the GPU that does not require fdinfo? The problem only root can access the fdinfo files from other processes.
18:33agd5f: E.g., something like /proc/<pid>/drm_stat that would provide the memory and engine times
18:33jenatali: Does anybody know what causes apitrace to flush trace contents to a file?
18:34jenatali: I've got an app that's rejecting to use my driver and I have no idea why, and trying to trace it just results in an empty file because the app terminates ungracefully without flushing anything