00:01 robmur01: yeah, until Android exclusively ships bleeding-edge mainline kernels, that would require vendors to upstream drivers 2-3 years before they've even designed the SoC ;)
00:03 robmur01: typical vendors are writing brand-new code against GKI branches based on 5.10 or 5.15 (which may eventually get forward-ported to mainline and thrown over the wall if we're lucky)
00:48 CounterPillow: I was about to sarcastically describe why they might not bother with upstreaming but then I remembered I should not start flamewars with people who might work for companies I eventually seek employment at.
00:56 karolherbst: jenatali: uhh... I have to figure out from a spir-v if `-cl-single-precision-constant` was set... I think...
00:56 jenatali: Oh?
00:56 jenatali: Why?
00:56 karolherbst: to set treat_doubles_as_floats correctly, no?
00:57 jenatali: Nah, we can just delete that flag
00:57 karolherbst: ohhh
00:57 karolherbst: yeah, fair enough :)
00:57 karolherbst: that makes everything easier :D
00:57 jenatali: If cl-single-precision-constant was set, then you won't see doubles in the printf string unless they were really doubles
00:57 karolherbst: right...
00:57 karolherbst: and if it's in the spirv, the user is asking for it anyway...
00:57 jenatali: Otherwise, clang does the C thing of promoting floats to double because double is the "native" floating point type
00:58 karolherbst: yeah.. I'm more concerned about spirv as the input, not clc
00:58 karolherbst: as there it's not in our control how it's compiled
00:59 karolherbst: so I wonder if we want to keep that option anyway, but only depend on if fp64 support is enabled for the device or not?
00:59 karolherbst: and then we can force fp32 for spir-vs
00:59 jenatali: Ah yeah I see what you're saying, that makes sense
01:01 karolherbst: I'll just push `-cl-single-precision-constant` to the frontend and see how that works out :)
01:01 jenatali: Yeah, that's what I've done
01:07 karolherbst: mhh...
01:07 karolherbst: it's not using fp64 constants by default...?
01:07 karolherbst: was there some condition for it?
01:08 karolherbst: ehh wait...
01:08 karolherbst: it's 32 bit in the spirv, but 64 bit in the LLVM...
01:14 karolherbst: mhhhhh
01:14 karolherbst: interesting...
01:14 karolherbst: jenatali: looks like llvm just handles that for us now 🙃
01:15 karolherbst: unless I pass "+cl_khr_fp64" or "+__opencl_c_fp64" to clang the constants all end up as fp32 ones in the spirv...
01:15 karolherbst: but I'm also seeing "call spir_func i32 (i8 addrspace(2)*, ...) @printf(i8 addrspace(2)* noundef getelementptr inbounds ([8 x i8], [8 x i8] addrspace(2)* @.str, i64 0, i64 0), float noundef 0x4024B0F280000000)"...
01:17 karolherbst: yeah.. it becomes "call spir_func i32 (i8 addrspace(2)*, ...) @printf(i8 addrspace(2)* noundef getelementptr inbounds ([8 x i8], [8 x i8] addrspace(2)* @.str, i64 0, i64 0), double noundef 1.034560e+01)" with enabled fp64
01:18 karolherbst: ... that also explains why I have seen regressions in my spirv based runs and not the clc ones...
01:19 karolherbst: I think that changed in llvm-16 actually...
01:22 karolherbst: jenatali: https://reviews.llvm.org/D24235 mhhh
01:22 karolherbst: like that's 7 years ago...
01:24 karolherbst: ohhhhhhhhhhhhhh
01:24 karolherbst: I know
01:24 karolherbst: I've fixed this ....
01:24 karolherbst: I suspect my work on forcing enabled features made us not claim fp64 support and all that
01:24 karolherbst: so we don't run into this with llvm-14+
01:25 jenatali: Oh cool
01:25 karolherbst: I guess I will only handle the spir-v part then :D
01:25 karolherbst: but yeah.. that explains it then
01:26 jenatali: karolherbst: I added that when I was still using 12 I think
01:26 karolherbst: yeah...
01:26 karolherbst: that's why I was confused because that llvm check is there since llvm-8?
01:26 karolherbst: ehh
01:26 karolherbst: llvm-4 even
01:27 karolherbst: could also been that `-USPIRV` and `-USPIR` part...
01:27 karolherbst: as that would otherwise enable rando extes
01:27 karolherbst: *exts
01:28 karolherbst: apparently not cl_khr_fp64
01:30 karolherbst: jenatali: anyway.. the reason I ran into the 64 bit arg mess was because of `%s` args as they are 64 bit anyway ....
01:30 jenatali: Right
01:30 karolherbst: and then encode ids like... 0x1de
01:33 karolherbst: maybe I really just fix the callbacks and move on...
01:33 karolherbst: oh well.. I'll decide it tomorrow then
02:54 gfxstrand: karolherbst: Did you test the alignment patches or just read them over?
06:26 tomeu: how do people figure out what specific test might have caused a GPU hang when it only happens under high concurrency inside deqp-runner?
06:26 tomeu: anholt_: maybe you have some tricks?
09:16 karolherbst: gfxstrand: I've ran them, just that they didn't do anything for the issue I was seeing as I was also hitting an LLVM bug. But I can run the CL CTS with those and see if anything break if you want
10:42 karolherbst: jenatali: actually... for spir-v the printf double thing is also not a problem, because the only valid way of doing is to have a spir-v requiring "OpCapability Float64", which isn't valid to pass to the runtime if it doesn't support cl_khr_fp64 :D
10:42 karolherbst: I think I'd rather fix my spirv testing here...
10:42 karolherbst: and we can indeed drop that option
10:49 karolherbst: uhh.. why is `-cl-single-precision-constant` ignored on the clang CLI...
10:53 karolherbst: needs to be -Xclang -cl-ext=-all ...
11:11 karolherbst: yeah....
11:11 karolherbst: -cl-single-precision-constant doesn't work at all...
11:12 karolherbst: at least now how we are using clang...
11:12 karolherbst: *sigh*
11:12 karolherbst: not in the mood of debugging this honestly :D
11:23 karolherbst: oh actually.. it works in libclang.. I forgot to switch to online compilation.. oops
11:23 karolherbst: ohh it doens't.. I forgot to enable fp64.. uhhh
11:24 karolherbst: whatever...
11:24 karolherbst: I spending too much time on printf...
11:24 karolherbst: *I'm
11:27 dj-death: karolherbst: speaking of printf
11:27 dj-death: karolherbst: you have any opinion on those changes: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26505
11:28 karolherbst: looks good
11:30 karolherbst: I'll leave comments on the MR
11:31 dj-death: karolherbst: thanks
11:31 dj-death: karolherbst: I think possibly the only controversial thing is to have the printfs on all shader stages
11:31 karolherbst: yeah
11:31 dj-death: in the serialization
11:31 karolherbst: that's where I'll leave a comment :D
11:31 dj-death: I can probably workaround that for my case
11:32 karolherbst: nah
11:32 karolherbst: I have a better idea
11:32 dj-death: thanks a lot
11:36 karolherbst: done
11:45 karolherbst: jenatali: treat_doubles_as_floats seems to be broken, as the printf code still parses it as 8 bytes and generates a wrong value...
11:45 karolherbst: so we'd need to update the printf info here
11:45 karolherbst: but anyway.. I think it's safe to remove
11:46 karolherbst: just need to fix clang to respect -cl-single-precision-constant or figure out what we'd need to change or something...
11:46 karolherbst: (in case we do support fp64)
12:12 jenatali: karolherbst: Right... I think we'd need it as a separate pass then so it can be before lowering the printf struct to explicit types
12:13 jenatali: So yeah, just delete it I think
12:43 karolherbst: gfxstrand: no regressions at least...
12:44 karolherbst: jenatali: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26541
12:46 jenatali: karolherbst: Tag me in it so I get an email so I remember to review it later, it's not even 5am here yet
12:46 karolherbst: fair
12:47 karolherbst: good night then :P
12:48 karolherbst: done
13:04 mripard: donaldrobson, frankbinns: ack for https://lore.kernel.org/all/20231204073231.1164163-1-arnd@kernel.org/ ?
13:06 frankbinns: mripard: ack
13:08 mripard: frankbinns: merged, thanks
13:09 frankbinns: I had totally missed that one so thanks for the ping
13:52 gfxstrand: karolherbst: Okay, cool.
13:52 gfxstrand: karolherbst: Did you verify it fixed the kernel you were looking at?
13:54 karolherbst: sadly it doesn't as it only has one shared variable (so the location is 0 anyway) and the align_mul=1 comes from LLVM being silly :'(
13:54 karolherbst: I just noticed that we don't handle the Alignment thing on variables while looking into it
13:56 karolherbst: but I could probably come up with a test to verify
13:59 karolherbst: gfxstrand: btw, I need something like this: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26541/diffs?commit_id=40bab1d34c0701df71cf4b421fd5c22eea6ce6b7
13:59 karolherbst: wondering if you have a better idea :)
13:59 karolherbst: (and yes, it should loop over the mov as it could be a mov chain)
14:00 karolherbst: this is needed with opaque pointers and we ending up with some movs along the way
14:26 jenatali: karolherbst: Run copy prop before whatever pass was blowing up?
14:27 karolherbst: that's in vtn
14:27 karolherbst: `vtn_add_printf_string`
14:28 karolherbst: so.. no :)
14:28 jenatali: Ohh
14:35 gfxstrand: karolherbst: Ugh... I don't want to think about printf. :sob:
14:35 karolherbst: gfxstrand: it's your lucky day, it's not a printf specific issue :P
14:35 karolherbst: just if you have movs in your deref chain
14:35 karolherbst: and you are still in vtn
14:35 gfxstrand: karolherbst, eric_engestrom: Is there a reason why the gitlab CI's rustfmt is only running on lib.rs or app.rs?
14:36 karolherbst: gfxstrand: this pulls in the entire project
14:36 karolherbst: otherwise you'd run it on all files multiple times
14:36 gfxstrand: karolherbst: Only if you have a lib.rs. :P
14:36 karolherbst: what's your file called then?
14:36 gfxstrand: nak.rs
14:36 karolherbst: mhh.. could rename to lib.rs 🙃
14:37 karolherbst: but I guess...
14:37 gfxstrand: Yeah, I probably should.
14:37 karolherbst: you kinda want to have that to be able to structurize your code, but yeah...
14:37 karolherbst: worst case we just add custom file names
14:37 gfxstrand: Yeah, I can rename to lib.rs
14:37 karolherbst: `lib.rs` and `app.rs` is just what most rust projects use and it's a cargo default
14:38 karolherbst: ehh
14:38 karolherbst: lib.rs and main.rs
14:38 karolherbst: I should fix the app.rs one...
14:38 eric_engestrom: yeah it's trivial to add nak.rs
14:38 eric_engestrom: app.rs should be gone, unless I missed something somewhere?
14:39 karolherbst: yeah.. it should be main.rs instead
14:39 karolherbst: but we can also remove it
14:39 karolherbst: and we could also add nak.rs
14:41 eric_engestrom: gfxstrand: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26543
14:42 gfxstrand: eric_engestrom: I think I'm going to just restructure nak a bit
14:42 eric_engestrom: ack
14:43 karolherbst: I have a handy git alias btw: rustfmt = ! git ls-files */{lib,main}.rs | xargs rustfmt
14:43 karolherbst: (which I would have to update for nak... 🙃)
14:43 eric_engestrom: gfxstrand: I'll drop this MR then, but now you know which line to edit when you have your new filename :)
14:45 eric_engestrom: karolherbst: if you have `shopt -s globstar` in your shell you can simply do `rustfmt **/lib.rs` :)
14:47 karolherbst: but I just want to do that on git tracked files tho :D
14:47 karolherbst: otherwise it might pull in generated files and such
14:47 karolherbst: but yeah...
14:49 eric_engestrom: well, in ci it's run on `src/**/lib.rs`, if you do the same locally that will not include generated files unless you put your builddir in src/ :P
15:16 gfxstrand: karolherbst, eric_engestrom: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26546
15:16 gfxstrand: I think that should do the trick
15:17 gfxstrand: I would actually like an ACK or two on that MR. Just to make sure I didn't do anything exceptionally stupid.
15:17 gfxstrand: Maybe look at the meson a bit.
15:26 karolherbst: you don't necessarily have to split it up on a crate level
15:26 karolherbst: that reminds me.. I wanted to move to rust.proc_macro at some point :)
15:27 karolherbst: but yeah.. I think they are fine
15:28 gfxstrand: karolherbst: Yeah, I know it's not necessary. But, if my crates are going to be lib.rs..
15:28 MrCooper: hmm, does MR Label Maker not know about zink yet?
15:28 gfxstrand: Is MR Label Maker working?
15:28 karolherbst: it should be fixed now
15:28 karolherbst: but it was broken for a while
15:28 gfxstrand: Okay
15:28 gfxstrand: I was trying to get it to label my dot product MR
15:29 gfxstrand: But whaver. I think I found them all manually
15:29 karolherbst: yeah... we've debugged the server a few hours ago
15:29 gfxstrand: Ah
15:30 MrCooper: thanks
20:57 DemiMarie: mattst88: sorry about that.
20:58 DemiMarie: robmur01: I had not considered that Android doesn’t ship bleeding-edge kernels. That explains so much!
20:59 DemiMarie: I’m a bit salty about Android using proprietary drivers because it means no virtio-GPU native context support, which means no decently secure GPU acceleration in pKVM VMs.
22:27 lumag: mripard, ack/r-b for the https://lore.kernel.org/all/CAA8EJpr3hNdB02avXrY+PQGGSjJTm4YT3Hct1OwsLuNQN_H9Xw@mail.gmail.com/ ? I'd like to apply it.
23:52 mareko: DemiMarie: Android has virtio
23:53 mareko: also native context