ChanServ changed the topic of #panfrost to: Panfrost - FLOSS Mali Midgard & Bifrost - Logs https://oftc.irclog.whitequark.org/panfrost - <macc24> i have been here before it was popular
<icecream95> Compiling pan_clc in a way that should hopefully work for cross compilation wasn't very hard:
camus1 has quit [Ping timeout: 480 seconds]
camus has joined #panfrost
<icecream95> Heh.. although actual prfm (prefetch) instructions appear to do nothing for A73 cores, I can emulate it to make shader compilation 0.3% faster:
<icecream95> volatile unsigned x = l->linear[step + 2].dense[0];
<icecream95> (x is never used anywhere)
<icecream95> But it makes execution 0.5% slower for in-order cores such as A53...
JulianGro has joined #panfrost
<icecream95> This seems to work as well: __asm volatile ("ldrb wzr, %[v]" :: [v] "m" (*v) :);
<HdkR> You'd probably want to keep the prefetch slots full on A73, which can have three in flight
<HdkR> Behaviour being slightly different than what a load instruction does
<HdkR> Instruction retires immediately once line fill starts rather than line fill + register write retires
<HdkR> er, also typo'd four slots on a73
<HdkR> Prefetching behaviour is documented in the TRMs if you want to know more for your particular cores
<icecream95> Wait, does prefetch actually do something? It didn't seem to affect performance at all for me, unlike doing actual loads
<HdkR> You're probably also not noticing a bunch of impact if you're already reading linearly from memory, since it'll prefetch forward more and more on misses
<HdkR> yea, it does
camus has quit [Ping timeout: 480 seconds]
<icecream95> This isn't reading linearly.. Each iteration in a loop reads a different allocated array, so I'm trying to prefetch the array for the next iteration
<icecream95> Hmm.. If I try to "prefetch" (using ldrb) two iterations ahead, it does nothing.. so it does the load then the cache gets thrashed again too soon?
<HdkR> Could just be that it isn't keeping the prefetcher active. Or if it is keeping the prefetcher active it is slowing other memory accesses down :D
<HdkR> Prefetching is a dangerous game to get any changes
<icecream95> But if doing a load and relying on OoO to smooth things out is faster than actual prefetch instructions.. Maybe the prefetch instructions need to work better?
<HdkR> Probably, but maybe they should focus on just making OoO even better in the hardware?
<HdkR> Prefetching is really something you're wanting to optimize for on fixed hardware and that's about it :P
camus has joined #panfrost
camus has quit [Ping timeout: 480 seconds]
camus has joined #panfrost
JulianGro has quit [Remote host closed the connection]
Daanct12 has joined #panfrost
<icecream95> I probably won't include any of the prefetch stuff.. it doesn't help enough
<HdkR> and behaviour will change dramatically with any other uarch cpu thrown in to the mix :)
<icecream95> On the other hand, replacing (y > 0) ? (x >> y) : (x << -y) with a rotate instruction is about three times as effective
<HdkR> \o/
<icecream95> Doing that means GCC won't emit a branch. The only problem is that (x >> y) | (x << (64 - y)) is technically undefined when y is zero.. (because left shift by 64 bits)
guillaume_g has joined #panfrost
<icecream95> It doesn't matter whether the left shift by 64 bits returns zero or x, but UBSan will probably still catch it...
<icecream95> Time to look at the GCC source to see if there are better patterns which get interpreted as rotate
<icecream95> Hmm.. GCC's version of opt_algebraic, match.pd, doesn't seem to be where rotations are generated
<HdkR> Just mask by 63 and let the compiler remove the mask since the rotate instruction already does that :P
<icecream95> Good point.. I was already masking it at the start of the function, but I can mask again after subtracting from 64
<icecream95> So the function becomes return (x >> (y & 63)) | (x << ((64 - y) & 63));
<icecream95> Both GCC and Clang still generate a rotate at -O and above
<icecream95> The GCC pass is simplify_rotate in tree-ssa-forwprop.c
<icecream95> "Or one shift count is Y & (B - 1) and the other (-Y) & (B - 1)". So the code in GCC explicitly handles the masking
<icecream95> HdkR: Is there a good preprocessor test for 64-bitness other than hardcoding architectures?
<icecream95> (I assume that if I do hardcode architectures you'd want amd64 to be in there?)
<icecream95> HdkR: Related: is it worth trying to port NEON code in Panfrost to SSE?
<HdkR> If you're testing for 64bit then you can do something like `sizeof(void*) == 8`, but I'd be surprised if mesa didn't already have something like this defined somewhere
<HdkR> Personally I don't think it is worth porting NEON to SSE, but just ensuring that the regular C variant also matches behaviour as one would expect. The "regular" use-case of of FEX-Emu will eventually be that libGL/libvulkan always routes to the native library.
<HdkR> Although if you have NEON/ASIMD in some Mesa common code then SSE support is a good thing for the x86 junkies :P
<icecream95> Though #if doesn't seem to support sizeof, a plain `if (sizeof(void *) == 8)` gets optimised fine
<icecream95> That's because trying to emulate a 64-bit rotate on 32-bit architectures is much worse than just 64-bit shifts
<HdkR> AArch32 also has a funnel shift
<icecream95> rrx?
<HdkR> EXT
<HdkR> Which is the same as EXTR on AArch64 (using 32-bit registers)
<HdkR> Oh, actually that doesn't exist does it
<HdkR> I've been out of the 32-bit ARM game for too long
<HdkR> I was thinking of Nvidia GPU supporting a 32-bit funnel shift :D
<HdkR> Oh, and AArch64 EXTR requires constant encoded LSB instead of register anyway, so meeh
<icecream95> Hmm.. maybe I should hand-write the rotate code for 32-bit arches, because only the low seven bits of the first operand can actually be set
<icecream95> So there's no point in making sure the higher bits get shifted down correctly
<icecream95> Oh nice, GCC already does that if I make the source uint8_t, but the shift code is better than the rotate code
rkanwal has joined #panfrost
<HdkR> icecream95: I put the topic of SSE inside of ARM hardware only drivers inside my topics for XDC talk
rasterman has joined #panfrost
MajorBiscuit has joined #panfrost
<icecream95> HdkR: An uncoming XDC or one that already happened?
<HdkR> XDC 2022
<HdkR> I plan on submitting a talk for this upcoming one
anarsoul|2 has joined #panfrost
anarsoul has quit [Read error: No route to host]
<icecream95> Hmm... I guess this is another program I'll need to use my patched glibc with: Thread 8 "ThreadPoolForeg" received signal SIGSYS, Bad system call.
erle has quit []
icecream95 has quit [Ping timeout: 480 seconds]
floof58 has quit [resistance.oftc.net charon.oftc.net]
rkanwal has quit [resistance.oftc.net charon.oftc.net]
ente` has quit [resistance.oftc.net charon.oftc.net]
Guest860 has quit [resistance.oftc.net charon.oftc.net]
pendingchaos has quit [resistance.oftc.net charon.oftc.net]
digetx has quit [resistance.oftc.net charon.oftc.net]
jelly has quit [resistance.oftc.net charon.oftc.net]
FLHerne has quit [resistance.oftc.net charon.oftc.net]
DPA has quit [resistance.oftc.net charon.oftc.net]
indy has quit [resistance.oftc.net charon.oftc.net]
xdarklight has quit [resistance.oftc.net charon.oftc.net]
sigmaris has quit [resistance.oftc.net charon.oftc.net]
jambalaya has quit [resistance.oftc.net charon.oftc.net]
robertfoss has quit [resistance.oftc.net charon.oftc.net]
italove has quit [resistance.oftc.net charon.oftc.net]
lcn has quit [resistance.oftc.net charon.oftc.net]
CalebFontenotHaileysCuteNerdyB has quit [resistance.oftc.net charon.oftc.net]
stebler[m] has quit [resistance.oftc.net charon.oftc.net]
jernej has quit [resistance.oftc.net charon.oftc.net]
toggleton[m] has quit [resistance.oftc.net charon.oftc.net]
JulianGro[m] has quit [resistance.oftc.net charon.oftc.net]
jenneron[m] has quit [resistance.oftc.net charon.oftc.net]
pH5 has quit [resistance.oftc.net charon.oftc.net]
dhewg has quit [resistance.oftc.net charon.oftc.net]
stepri01 has quit [resistance.oftc.net charon.oftc.net]
wilkom has quit [resistance.oftc.net charon.oftc.net]
rellla has quit [resistance.oftc.net charon.oftc.net]
AreaScout_ has quit [resistance.oftc.net charon.oftc.net]
MajorBiscuit has quit [resistance.oftc.net charon.oftc.net]
rasterman has quit [resistance.oftc.net charon.oftc.net]
guillaume_g has quit [resistance.oftc.net charon.oftc.net]
rtp has quit [resistance.oftc.net charon.oftc.net]
karolherbst has quit [resistance.oftc.net charon.oftc.net]
megi has quit [resistance.oftc.net charon.oftc.net]
wolfshappen has quit [resistance.oftc.net charon.oftc.net]
alpernebbi has quit [resistance.oftc.net charon.oftc.net]
urja has quit [resistance.oftc.net charon.oftc.net]
tomeu has quit [resistance.oftc.net charon.oftc.net]
ndufresne has quit [resistance.oftc.net charon.oftc.net]
enunes has quit [resistance.oftc.net charon.oftc.net]
mriesch has quit [resistance.oftc.net charon.oftc.net]
Stary has quit [resistance.oftc.net charon.oftc.net]
br has quit [resistance.oftc.net charon.oftc.net]
macc24 has quit [resistance.oftc.net charon.oftc.net]
atler has quit [resistance.oftc.net charon.oftc.net]
unevenrhombus[m] has quit [resistance.oftc.net charon.oftc.net]
tanty has quit [resistance.oftc.net charon.oftc.net]
HdkR has quit [resistance.oftc.net charon.oftc.net]
bbrezillon has quit [resistance.oftc.net charon.oftc.net]
jschwart has quit [resistance.oftc.net charon.oftc.net]
mmind00 has quit [resistance.oftc.net charon.oftc.net]
suihkulokki has quit [resistance.oftc.net charon.oftc.net]
mav has quit [resistance.oftc.net charon.oftc.net]
CounterPillow has quit [resistance.oftc.net charon.oftc.net]
hl` has quit [resistance.oftc.net charon.oftc.net]
pjakobsson_ has quit [resistance.oftc.net charon.oftc.net]
robmur01 has quit [resistance.oftc.net charon.oftc.net]
samuelig has quit [resistance.oftc.net charon.oftc.net]
CME has quit [resistance.oftc.net charon.oftc.net]
strongtz[m] has quit [resistance.oftc.net charon.oftc.net]
Dylanger has quit [resistance.oftc.net charon.oftc.net]
simon-perretta-img has quit [resistance.oftc.net charon.oftc.net]
go4godvin has quit [resistance.oftc.net charon.oftc.net]
enick_200 has quit [resistance.oftc.net charon.oftc.net]
alarumbe has quit [resistance.oftc.net charon.oftc.net]
DidgyNilsipus[m] has quit [resistance.oftc.net charon.oftc.net]
psydroid[m]1 has quit [resistance.oftc.net charon.oftc.net]
anarsoul|2 has quit [singleton.oftc.net resistance.oftc.net]
bluebugs has quit [singleton.oftc.net resistance.oftc.net]
pch__ has quit [singleton.oftc.net resistance.oftc.net]
alyssa has quit [singleton.oftc.net resistance.oftc.net]
`join_subline has quit [singleton.oftc.net resistance.oftc.net]
cphealy has quit [singleton.oftc.net resistance.oftc.net]
dschuermann has quit [singleton.oftc.net resistance.oftc.net]
MTCoster has quit [singleton.oftc.net resistance.oftc.net]
philpax_ has quit [singleton.oftc.net resistance.oftc.net]
taowa has quit [singleton.oftc.net resistance.oftc.net]
jstultz has quit [singleton.oftc.net resistance.oftc.net]
narmstrong has quit [singleton.oftc.net resistance.oftc.net]
kenzie has quit [singleton.oftc.net resistance.oftc.net]
Lyude has quit [singleton.oftc.net resistance.oftc.net]
ckeepax has quit [singleton.oftc.net resistance.oftc.net]
tlwoerner has quit [singleton.oftc.net resistance.oftc.net]
steev has quit [singleton.oftc.net resistance.oftc.net]
austriancoder has quit [singleton.oftc.net resistance.oftc.net]
remexre has quit [singleton.oftc.net resistance.oftc.net]
MoeIcenowy has quit [singleton.oftc.net resistance.oftc.net]
orkid has quit [singleton.oftc.net resistance.oftc.net]
jolan has quit [singleton.oftc.net resistance.oftc.net]
robink has quit [singleton.oftc.net resistance.oftc.net]
spawacz has quit [singleton.oftc.net resistance.oftc.net]
rcf has quit [singleton.oftc.net resistance.oftc.net]
daniels has quit [singleton.oftc.net resistance.oftc.net]
ezequielg has quit [singleton.oftc.net resistance.oftc.net]
robclark has quit [singleton.oftc.net resistance.oftc.net]
cwabbott has quit [singleton.oftc.net resistance.oftc.net]
cyrozap has quit [singleton.oftc.net resistance.oftc.net]
soreau has quit [singleton.oftc.net resistance.oftc.net]
krh has quit [singleton.oftc.net resistance.oftc.net]
jkl has quit [singleton.oftc.net resistance.oftc.net]
jekstrand has quit [singleton.oftc.net resistance.oftc.net]
tris_ has quit [singleton.oftc.net resistance.oftc.net]
tchebb has quit [singleton.oftc.net resistance.oftc.net]
tortoise has quit [singleton.oftc.net resistance.oftc.net]
robher has quit [singleton.oftc.net resistance.oftc.net]
wicastC has quit [singleton.oftc.net resistance.oftc.net]
SolidHal81 has quit [singleton.oftc.net resistance.oftc.net]
anarsoul|2 has joined #panfrost
rcf has joined #panfrost
bluebugs has joined #panfrost
alyssa has joined #panfrost
cphealy has joined #panfrost
kenzie has joined #panfrost
`join_subline has joined #panfrost
Lyude has joined #panfrost
steev has joined #panfrost
ckeepax has joined #panfrost
tlwoerner has joined #panfrost
dschuermann has joined #panfrost
taowa has joined #panfrost
austriancoder has joined #panfrost
daniels has joined #panfrost
MTCoster has joined #panfrost
philpax_ has joined #panfrost
cwabbott has joined #panfrost
jstultz has joined #panfrost
robclark has joined #panfrost
narmstrong has joined #panfrost
ezequielg has joined #panfrost
remexre has joined #panfrost
MoeIcenowy has joined #panfrost
cyrozap has joined #panfrost
orkid has joined #panfrost
soreau has joined #panfrost
jolan has joined #panfrost
pch__ has joined #panfrost
krh has joined #panfrost
robink has joined #panfrost
spawacz has joined #panfrost
jkl has joined #panfrost
tris_ has joined #panfrost
tchebb has joined #panfrost
jekstrand has joined #panfrost
tortoise has joined #panfrost
SolidHal81 has joined #panfrost
wicastC has joined #panfrost
robher has joined #panfrost
bbrezillon has joined #panfrost
MajorBiscuit has joined #panfrost
rasterman has joined #panfrost
guillaume_g has joined #panfrost
floof58 has joined #panfrost
pjakobsson_ has joined #panfrost
rkanwal has joined #panfrost
ente` has joined #panfrost
hl` has joined #panfrost
rtp has joined #panfrost
pendingchaos has joined #panfrost
indy has joined #panfrost
FLHerne has joined #panfrost
karolherbst has joined #panfrost
Guest860 has joined #panfrost
DPA has joined #panfrost
digetx has joined #panfrost
jelly has joined #panfrost
xdarklight has joined #panfrost
robertfoss has joined #panfrost
sigmaris has joined #panfrost
jambalaya has joined #panfrost
italove has joined #panfrost
CalebFontenotHaileysCuteNerdyB has joined #panfrost
stebler[m] has joined #panfrost
lcn has joined #panfrost
jernej has joined #panfrost
toggleton[m] has joined #panfrost
jenneron[m] has joined #panfrost
dhewg has joined #panfrost
JulianGro[m] has joined #panfrost
pH5 has joined #panfrost
stepri01 has joined #panfrost
rellla has joined #panfrost
AreaScout_ has joined #panfrost
wilkom has joined #panfrost
megi has joined #panfrost
alpernebbi has joined #panfrost
robmur01 has joined #panfrost
tomeu has joined #panfrost
urja has joined #panfrost
ndufresne has joined #panfrost
enunes has joined #panfrost
Stary has joined #panfrost
mriesch has joined #panfrost
br has joined #panfrost
atler has joined #panfrost
macc24 has joined #panfrost
unevenrhombus[m] has joined #panfrost
tanty has joined #panfrost
HdkR has joined #panfrost
wolfshappen has joined #panfrost
jschwart has joined #panfrost
strongtz[m] has joined #panfrost
Dylanger has joined #panfrost
DidgyNilsipus[m] has joined #panfrost
simon-perretta-img has joined #panfrost
go4godvin has joined #panfrost
enick_200 has joined #panfrost
psydroid[m]1 has joined #panfrost
alarumbe has joined #panfrost
samuelig has joined #panfrost
CounterPillow has joined #panfrost
mav has joined #panfrost
mmind00 has joined #panfrost
suihkulokki has joined #panfrost
CME has joined #panfrost
Didgy has joined #panfrost
MajorBiscuit has quit [Quit: WeeChat 3.4]
rkanwal1 has joined #panfrost
rkanwal has quit [Read error: Connection reset by peer]
Daanct12 has quit [Quit: Leaving]
<macc24> how low can i reasonably clock a mali g31 gpu?
<macc24> does it depend on the clock generator?
<macc24> and how well does power draw scale with clock on g31?
icecream95 has joined #panfrost
MajorBiscuit has joined #panfrost
Didgy has quit [Quit: Konversation terminated!]
icecream95 has quit [Quit: leaving]
MajorBiscuit has quit [Ping timeout: 480 seconds]
MajorBiscuit has joined #panfrost
JulianGro has joined #panfrost
MajorBiscuit has quit [Ping timeout: 480 seconds]
MajorBiscuit has joined #panfrost
JulianGro has quit [Ping timeout: 480 seconds]
MajorBiscuit has quit [Ping timeout: 480 seconds]
guillaume_g has quit []
MajorBiscuit has joined #panfrost
MajorBiscuit has quit [Quit: WeeChat 3.4]
digetx is now known as Guest951
digetx has joined #panfrost
Guest951 has quit [Read error: Connection reset by peer]
nlhowell has joined #panfrost
pjakobsson_ is now known as pjakobsson
MajorBiscuit has joined #panfrost
<robclark> macc24: is there an opp table in dt for mali? If so that should tell you supported freqs
<macc24> robclark: yea but what if i clock it lower anyway?
<cphealy> macc24: I've always been curious if there is any appreciable power draw delta when decreasing the GPU freq when the GPU is not running jobs.
<macc24> cphealy: with weston running all the time it would be running jobs... right? :v
<cphealy> Said another way, I'd expect an idle GPU at 1GHz consumes the same amount of power as an idle GPU at 1MHz.
<cphealy> No, weston won't be using the GPU unless there are client updates and weston has to do the composition work.
<cphealy> So, if you are on a pause screen with a game for example, GPU could/should be idle.
<macc24> shouldn't that depend on exact game not pushing any frames?
<robclark> cphealy: I'd be very surprised if that were true (freq not mattering when idle)
<cphealy> macc24: yes
<cphealy> robclark: sounds like I need to do some experiments with a scope and current shunt resistor... ;-)
<macc24> cphealy: i'm planning on making a usb cable with ina219 inside
<robclark> macc24: if the SoC vendor is doing a good job they pick opp's based on power vs freq curve.. probably no benefit to trying to go lower than min opp
<cphealy> robclark: My understanding is that when there are no jobs to perform, the GPU is gating both clock and power to the various cores in the GPU. As such the GPU load at idle should not be effected by the clock fed to the GPU. This is largely speculation on my part though.
<robclark> I guess you'd have to ask an EE, but I guess there is leakage.. plus can't *completely* remove clk/pwr if there are registers that CPU might write..
<cphealy> Though, as I think about it, the clock frequency fed to the GPU also drives the scaling of the voltage fed to the GPU and even if the GPU is not consuming power, there is likely some leakage?
<cphealy> ;-)
<robclark> yeah
<alyssa> maybe im in the wrong profession.
<alyssa> :p
<macc24> i gotta measure power under these conditions: gpu loaded 100% on lowest clock, gpu loaded 0% on lowest clock and gpu turned off
<cphealy> Is there any tests in libdrm codebase for example for generating a synthetic load on the GPU independent of using Mesa? Would be nice to have some test code that allows stressing the GPU in ways that help hit max power consumption.
<robclark> cphealy: not really.. it is a surprisingly hard thing to do even with gl
* macc24 points at furmark
<robclark> cphealy: but shadertoy has some things that should peg gpu's
<robclark> iirc furmark was the one based on some shadertoy?
nlhowell has quit [Ping timeout: 480 seconds]
<cphealy> ack
MajorBiscuit has quit [Ping timeout: 480 seconds]
rkanwal1 has quit [Ping timeout: 480 seconds]
MajorBiscuit has joined #panfrost
<alyssa> n2
MajorBiscuit has quit [Quit: WeeChat 3.4]
icecream95 has joined #panfrost
jernej has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
jernej has joined #panfrost
nlhowell has joined #panfrost
nlhowell has quit [Ping timeout: 480 seconds]
soreau has quit [Remote host closed the connection]
soreau has joined #panfrost
atler is now known as Guest968
atler has joined #panfrost
Guest968 has quit [Ping timeout: 480 seconds]
<macc24> robclark: that should /what/ to peg gpus?
<macc24> wait nvm i thought peg = 'pci express graphics'
<robclark> for ex, https://www.shadertoy.com/view/WtscW4 should keep your gpu busy ;-)
rkanwal has joined #panfrost
<cphealy> yea, that looks like a pretty expensive shadertoy...
<macc24> "improve bifrost performance" :eyes:
<rasterman> ha... the device doesnt support PIPE_SHADER_IR_NATIVE
<alyssa> rasterman: IR_NATIVE is something stupid
<rasterman> this is why ocl doesnt want to give me any devices tho...
<rasterman> or well the last case
<macc24> rasterman: ocl?
<rasterman> opnecl
<rasterman> opencl
<alyssa> it should be IR_NIR or IR_NIR_SERIALIZED
<rasterman> do i have to enable spirv for ocl to work with pf?
<rasterman> because then ... it will check for PIPE_SHADER_IR_NIR_SERIALIZED
<rasterman> it seems this is me just building ocl support wrong™
<macc24> rasterman: opnecl https://i.imgur.com/si7SoHZ.png
* macc24 adds graphics editing into her cv
<rasterman> macc24: hehehe
<rasterman> :)
<alyssa> rasterman: yes, spirv and llvm are a must
<rasterman> dang\
<alyssa> in all honesty I don't remember how to do this stuff, I haven't touched opencl in a long time
<alyssa> icecream95: has been playing with it though
<alyssa> -Dopencl-spirv=true I guess
<rasterman> alyssa: no problems... i have actually never seen ocl work...
<rasterman> ever
<rasterman> not on amd. not on intel.
<rasterman> not on anything ... :)
<alyssa> I've seen it work with the mali ddk :p
<rasterman> given my previous not-so-happy results... i didnt even look
<rasterman> i toyed with the idea of using opencl for rendering long ago... so i could like use openc via a sw backend or gpu for rendering to save doing sw and gl ...
<rasterman> but that was a bust ... every few years i dig out some ocl and see if ti works. it never does :P :)
<rasterman> ok. now lets build mesa with spirv... then ocl might do something
<rasterman> and dang the template madness in clover is ... madness :)
<alyssa> karolherbst: has been rewriting clover
<alyssa> it's looking promising
<karolherbst> :D "rewriting"
<karolherbst> it's like taking it apart and just keep the good parts
<rasterman> karolherbst: if you feel like shipping people... keep the templates...
<rasterman> :)
<karolherbst> rasterman: the new code isn't written in C++
<rasterman> \o/
<macc24> karolherbst: is it C?
<karolherbst> it's not C either :D
<macc24> that was one fast reply
<rasterman> i was trying to figure out what on earth produces the devices list... i gave up and just found the constructor for device() hoping to hell it was even called :)
<macc24> i have to write something in ~~rust~~ rdza
<rasterman> karolherbst: oh writing it in befunge?\
<karolherbst> rasterman: not that crazy
<macc24> rasterman: rust code is known to always be bug-free therefore it's a CLEAR choice
<rasterman> damn
<karolherbst> macc24: yeah, I got it to crash inside rust code though :p
<rasterman> macc24: hahahaha
<rasterman> 85 commits..
* rasterman runs
<karolherbst> I still have stuff to push
<macc24> karolherbst: from now on i set out on a mission to get a segfault in rust code
<rasterman> add support for printf
<rasterman> \o/
<rasterman> my favorite debugging tool
<karolherbst> macc24: that's not hard if you use unsafe as often as rust devs :p
<rasterman> :)
<macc24> karolherbst: well whenever i write something it just ends up like C code pretending to be different language
<karolherbst> :D
<karolherbst> yeah.. I tried to not do that
<macc24> my instincts tell me to do pointer arithmetic in bash
<rasterman> macc24: sounds like a lot of my code... :)
<karolherbst> but when I run the ball demo from luxmark v3.1 on top of risi, it's roughly as fast as intels official CL impl, soo...
<rasterman> i mean come on. C is a super high-level lang...
<rasterman> why go higher? :)
<macc24> rasterman: s/std::cout/printf/
<macc24> bam
<macc24> C++ to C converter
<karolherbst> because I am a crappy dev doing crappy mistakes and rustc seems to be good at shouting at me for those mistakes :p
<rasterman> certainly higher than machine code in a hex editor :)
<karolherbst> macc24: try that with clover
<macc24> karolherbst: i used to use gcc -Wall -Wextra -Wpedantic but then i stopped caring about the code as long as it works ;D
<karolherbst> macc24: :D
<rasterman> karolherbst: i have to say - that is one thing i respect in rust. it;s basically giving your coverity along with the compiler
<karolherbst> no, I just wanted to learn rust, so what's the best than just writing a damn CL implementation in it? :P
<macc24> confession: i don't know the difference betweens stack and heap
<rasterman> and you have to pass without errs.
<rasterman> its also rusts' downside. you cant be quick and dirty and "deal with that later" :)
<macc24> karolherbst: i learned lua by writing a user interface in computercraft minecraft mod ;D
<macc24> literally ran modded minecraft just to write lua
<alyssa> karolherbst: so how long until rustc->llvm->spirv->rusticl means we can run rusticl on the gpu
<karolherbst> alyssa: uhm.....
<alyssa> :p
<karolherbst> write a CL ext?
<rasterman> grrr
<rasterman> now i have a dev ice resturned...
<rasterman> it still doesnt find it
<rasterman> wtf...
<karolherbst> I mean.. as long as you get a spir-v this stuff can run anything...
<karolherbst> well
<rasterman> err a device returned
<karolherbst> not yet as I don't support spirvs yet
<karolherbst> but I am using spirvs internally
<karolherbst> should just wire up spirv support
<rasterman> does something delete the device later? gaaah
<rasterman> or it it throwing something out of the pram
<rasterman> gah... invisible slow control...
* rasterman glares at c++
<karolherbst> rasterman: catch throw
<karolherbst> if you debug C++ code without that, you can just give up :p
<macc24> karolherbst: why not printf and return NULL?
<karolherbst> mhh?
<macc24> sorry the C is leaking out
<macc24> there is a C programmer among us
<rasterman> oh u have to be kidding... it invisibly generates devices querying panfrost in static initializers? ...
<jekstrand> rasterman: Looking at clover?
<rasterman> just trawing through it wondering hy i get zero devices even though i should have one
<jekstrand> Probably panfrost isn't advertising some cap
<jekstrand> Maybe it's not advertising serialized NIR as a shader format?
<karolherbst> probably that
<karolherbst> just ignore clover :D
<rasterman> jernej: probably i didnt enable some feature in my build
<rasterman> and that was my first problem. panfrost is advertsing nir serialized.. but i didnt enable spirv :)
<karolherbst> ahh
<jekstrand> :)
<jekstrand> We
<karolherbst> do you have the spirv-nir translator?
<jekstrand> We really need to make the OpenCL build configuration easier
<rasterman> figured that out with some printfs and the ifdef clover spirv :)
<alyssa> jekstrand: yes
<jekstrand> Like --with-opencl=clover-llvm,clover-nir,rusticl
<rasterman> might have been nice it told me this :)
<karolherbst> jekstrand: or just rusticl?
<jekstrand> karolherbst: Sure
<karolherbst> :P
* jekstrand needs to go read the newer rusticl code and see what dragon eggs you've hidden in there. :P
<karolherbst> yeah.. I think we can make the translator required even with clover now
<rasterman> now check_for_libclc seems to be barfing
<karolherbst> no point in making it optional still
<karolherbst> rasterman: ahh yeah, you need libclc
<rasterman> yeah
<rasterman> fun tho how everything invisible barfs :)
<karolherbst> jekstrand: uhm.. I didn't even push it all :D
<karolherbst> pushed
<jekstrand> karolherbst: I'm not going to get to it today. Hoping for next week.
<jekstrand> I'm trying to wrap up v3dv common sync right now
<rasterman> and auto doesnt seem to do the right thing :)
<karolherbst> I wanted to push anyway as I did verify it
<rasterman> or i think it doesnt...
* rasterman runs his dist-upgrade again
<rasterman> argh...
<rasterman> clc_compiler_get_version() missing prototype...
<rasterman> this clc compiler ... is not built much as std warn/err flags make it not build
<karolherbst> rasterman: you might want to regenerate
<rasterman> ???
<karolherbst> or do you mean the code is broken?
<rasterman> i did a full slcean build...
<rasterman> err clean
<rasterman> like rm -rf my bui;d dir
<rasterman> build
<karolherbst> jekstrand: ohh.. clc_compiler_get_version needs a void arg :D
<karolherbst> but that shouldn't cause a build error should it?
<rasterman> c++ isms :)
<rasterman> no -0 its missing prototype netirely
<karolherbst> the prototype is there though
<karolherbst> should be inside src/microsoft/clc/clc_compiler.c
<rasterman> (this is why -Werror ... is bad :) )
<karolherbst> sure, but it's there
<rasterman> no prototype - just the func itself
<jekstrand> Why are you even building the microsoft stuff?
<rasterman> well nir::check_for_libclc(*this); fails (or throws some error)
<karolherbst> that's clc
<karolherbst> not the microsoft stuff
<rasterman> oh different...
<jekstrand> clc is such an overloaded term....
<rasterman> well the ms clc is broken :)
<karolherbst> make sure that microsoft-clc is disabled
<jekstrand> That's entirely possible. :)
<rasterman> ho dont tell me i have to dig into check_for_libclc
<rasterman> i just quickly assumed i needed the ms clc stuff ...
<karolherbst> rasterman: you need libclc
<rasterman> i have it
<karolherbst> apparently you don't otherwise check_for_libclc wouldn't fail
<rasterman> oh wait
<rasterman> i have libclc-dev ... not libclc itself... wtf...
<karolherbst> oops
<rasterman> debian didnt just pull libclc along for the ride...
<karolherbst> well technically you don't need libclc when doing stuff with libclc-dev ...
<rasterman> that's ... not normal
<rasterman> yeah - sorry. my bad :)
<rasterman> i normally just install libxxx-dev as i know libxxx comes with it - saves me declaring both
<karolherbst> I am sure some debian deb would bikeshed like this
<karolherbst> *dev
<rasterman> yeah.
<rasterman> i am sure there is a technical reason... i just am surprised the "normal flow" is not working
<rasterman> asx earlier - it's mme just not specially configuring mesa just right....
<karolherbst> it's our fault though
<karolherbst> we really should clean up all those flags
<karolherbst> jekstrand: we should drop opencl-spirv and just turn it on tbh
<rasterman> yeah - so if i have opencl enabled... it just works™ :)
<rasterman> OR at runtime i get proper stderr complaints telling me "can't find libclc.so ..." or whatever
<rasterman> if its going to runtime dlopen funtimes :)
<rasterman> ha!
<rasterman> NOW! it works.
<rasterman> yay! i have devices
<karolherbst> yay
<rasterman> wth... libclc-13 ... is not .so's ... it's llvm bytecode. well ... didnt expect that
<karolherbst> rasterman: and spv
<rasterman> yeah. that too :)
<rasterman> it could certainly have done with far more useful error output
<karolherbst> obviously we use the spv one, we use it to link in all those weirdo opencl c builtins
<rasterman> i also hit the polly linking bug too and had to comment out the linking to Polly and PollyISL
<rasterman> ok. almost 10pm. methinks a > 12hr work day is enough :)
<rasterman> food time. i'm hungry. nite! o/
rasterman has quit [Quit: Gettin' stinky!]
anholt has joined #panfrost
rcf has quit [Remote host closed the connection]
<alyssa> 12 files changed, 271 insertions(+), 118 deletions(-)
<alyssa> not quite the simplification I was hoping for :-p
<macc24> alyssa: i mean, if it's easier to read code then it /is/ simplification
* macc24 would rather write beatiful code than performant or correct code
<icecream95> ooh ooh ooh that reminds me of a fun snippet i wrote...
rcf has joined #panfrost
<alyssa> eh?
<icecream95> A good example of very readable and understandable code: https://gitlab.freedesktop.org/-/snippets/5340
<macc24> icecream95: what in the cursed in tarnation unreadable hell is that
<karolherbst> macc24: it's smart code
<macc24> karolherbst: too smart for me
<karolherbst> doesn't matter, it looks smart, must be correct
<macc24> i will burn down every piece of "smart" looking code i ever encounter in any git repo i control
<karolherbst> please do it
<macc24> it's so annoying to see something that could be implemented with neat looking code
<macc24> instead being made with code that screams "LOOK HOW MUCH PROGARMMING I KNOW"
<karolherbst> humans are better than compilers, so you have accept that they write assembly and smart code
<karolherbst> _certain_ humans that is
<karolherbst> not all
<karolherbst> others don't write smart code because they are not 10x devs
<macc24> i'd argue that "10x devs" write nice looking code
<alyssa> I am like a 2x dev
<jekstrand> :)
<alyssa> maybe 2.5x on a Tuesday
<karolherbst> I am like a -2x dev, I cause two bugs for every one I fix
<macc24> i'm a 0.05x dev
<jekstrand> First, most people who think they're 10x devs aren't. They're just arrogant and sloppy.
<karolherbst> I also want a total outage named after me
<macc24> except for that one day when i pump out 40 hours of work in one day
<karolherbst> macc24: apparently when I do that I create patch series with 10k loc :(
<jekstrand> Second, real 10x devs try very hard to not write code that they can't understand when operating on 3 hours of sleep and hung over. (No, that's not a reference to the Balmer peak.)
<jekstrand> When they do write really tricky code, they very carefully contain it to as small a portion of the code-base as possible.
<macc24> karolherbst: thankfully i do't like long code
<macc24> don't*
<karolherbst> sometimes it just happens
<karolherbst> so I start writing code and then you get something like that
<macc24> last time i wrote a 1k sloc file i forgot what it was about
<karolherbst> jekstrand: want me to split up rusticl or what? :P
<macc24> and a rewrite was 200l long
<jekstrand> karolherbst: ?
<karolherbst> nvm
<macc24> if i didn't rewrite so much to have a code looking bit better i would make more stuff :v
<karolherbst> macc24: nah, that's fine
<macc24> jekstrand: are "real 10x devs" even a thing?
<icecream95> alyssa: I have an idea.. make LCRA backwards. Rather than checking against constraints to allocate a register, allocate a register then use the constraints to adjust affinity for the other nodes
<karolherbst> macc24: yes, those are the guys writing some framework from scratch having 10k loc and then they tell how cool they are, because others just are able to do 50 loc changes, because duh
<karolherbst> :P
<macc24> karolherbst: just look at this beauty https://bpa.st/UNQA
<karolherbst> everything exist if your metric is wrong enough
<macc24> tho i bet $100 i will look at it in a week
<macc24> thing "what the hell is that" and rewrite it
<alyssa> In this episode: icecream95 discovers SSA-based RA
<karolherbst> macc24: ?
<macc24> karolherbst: :)
<karolherbst> why not like a regular expression or something?
<icecream95> alyssa: But doesn't SSA-based RA require rewriting a bunch of code? Doing this would only need a few small changes in lcra_solve
<icecream95> (and a few more.. and a few more.. and...)
<macc24> karolherbst: why regex?
<karolherbst> probably overkill
<macc24> yeah
<karolherbst> it's a bit sad though that such code is that messy in C
<macc24> karolherbst: "messy"?
<karolherbst> well, you can do that stuff in one line in bash e.g.
<macc24> ugh
<karolherbst> :P
<macc24> that code was just a piece of a simple media player
<macc24> like using gst so file:///whatever.mp3 is a must
<karolherbst> sure
<macc24> and i am not implementing any config files so i gotta work with what i have
<macc24> and just snip away the extension and call it a name
<karolherbst> sure
<macc24> yea theres a big issue with it - it snips after first dot, not last dot
<karolherbst> just cut of the last 4 chars :D
<macc24> .opus is here to ruin my day
<karolherbst> damn
<karolherbst> macc24: but I think you could build the uri with ssprintf
<karolherbst> ehh
<karolherbst> sprintf
<karolherbst> but uhh.. C really has a terrible stdlib
<macc24> karolherbst: yea i thought of that
<macc24> and with that moment i started procrastinating the inevitable re-writal of it
<macc24> 4th time
MajorBiscuit has joined #panfrost
rkanwal has quit [Ping timeout: 480 seconds]
MajorBiscuit has quit [Quit: WeeChat 3.4]
rasterman has joined #panfrost