Sunday, 2023-08-27

*** tpb <[email protected]> has joined #yosys00:00
*** strobo <[email protected]> has quit IRC (Read error: Connection reset by peer)10:02
*** strobo <[email protected]> has joined #yosys10:03
*** nak <nak!~nak@yosys/nak> has quit IRC (Quit: Bye)11:02
*** GenTooMan <GenTooMan!~cyberman@2601:547:437f:e5c6:21f:5bff:fefe:a883> has quit IRC (Read error: Connection reset by peer)13:33
*** GenTooMan <GenTooMan!~cyberman@2601:547:437f:e5c6:21f:5bff:fefe:a883> has joined #yosys13:34
*** bjorkintosh <bjorkintosh!~bjork@user/bjorkintosh> has quit IRC (Quit: Leaving)16:16
*** strobo <[email protected]> has quit IRC (Read error: Connection reset by peer)16:29
*** strobo <[email protected]> has joined #yosys16:29
*** Guest22 <[email protected]> has joined #yosys17:36
poviknew toymap results17:59
povikhttps://github.com/povik/toymap/commit/d47a41bb47317:59
povikfixed a severe case of overconstraining the lut depths, and copied over some more abc heuristics18:00
poviki think i will look into aig preprocessing next18:00
povikwould ping whitequark if they were here...18:01
povikhah, github's rich diff is pretty good for viewing this18:09
povikhttps://github.com/povik/toymap/commit/d47a41bb473?diff=unified&short_path=b33563018:09
*** derekn <[email protected]> has quit IRC (Ping timeout: 244 seconds)18:39
dxldpovik: super excited to see such a small implementation get so close to what abc can do :D18:43
*** derekn <[email protected]> has joined #yosys18:43
dxldI'm not familiar with the details here, could you shed some light on whether toymap would completely replace abc or are there other areas in yosys where it's still used?18:43
dxld(I want to get rid of abc because it's such a huge unmaintainable pile of complexity; I've had the displeasure of trying to figure out how to get it working on all the "weird" architectures in Debian ;) 18:48
poviki mean, i have no idea what 98 % of abc commands do18:58
povikthough i guess most people ever invoke abc from yosys for techmapping, which is in scope for toymap (being a toy though!)18:59
povikyou are free to run abc from yosys with custom abc scripts19:03
Adrien[m]corecode: at least Interesting points of potential behaviour of tools to take care of, good for not getting trapped in trivial issues because of inexperience with these tools19:03
povikso in a way nothing can ever replace it...19:03
*** Wolfvak <Wolfvak!~Wolfvak@user/wolfvak> has quit IRC (Remote host closed the connection)19:09
*** whitequark[cis] <whitequark[cis]!whitequa_1@2a01:4f8:c012:5b7:0:1:0:4> has joined #yosys19:15
whitequark[cis]<dxld> "(I want to get rid of abc..." <- abc basically doesn't work on 64-bit platforms19:15
whitequark[cis]that's a load bearing "basically"; the actual issue is that it's making assumptions incompatible with ASLR on macOS19:15
whitequark[cis]and there's no apparent way to fix that19:15
whitequark[cis]to clarify, the assumptions it's making are incorrect everywhere (as far as i know) but on macOS it happens to randomly segfault and the only solution for that we have is "run the thing again"19:16
dxldpovik: I'm not too worried about custom abc scripts, nobody understands abc so nobody is likely to use those :]19:16
whitequark[cis]anyway, replacing abc wouldn't mean literally making an API-compatible application; it would mean building something much simpler and smaller that just does LUT mapping for FPGAs19:17
dxldwhitequark[cis]: sounds like a job for qemu-user to me honestly :P19:17
whitequark[cis]and maybe sequential synthesis eventually19:17
whitequark[cis]dxld: one potential solution we've seriously thought about is building it for wasm, then using wasm2c to turn it back to C, then using that in yosys19:17
whitequark[cis]this sounds borderline absurd but you get almost the full performance19:17
whitequark[cis]it's basically an automated way to transform C code to safe(ish) C code :D19:18
*** xiretza[cis] <xiretza[cis]!xiretzaxir@2a01:4f8:c012:5b7:0:1:0:88> has joined #yosys19:18
xiretza[cis]I'm surprised that doesn't just make it crash all the time rather than just sometimes19:18
dxldyou do know what qemu-user lets you do right? it's literally a drop-in way to run i386 (or any qemu supported arch) executables on any other architecture19:18
whitequark[cis]i mean i don't think there would be obstacles to shipping that except someone has to add it to yosys19:18
dxldas long as it's an executable (and abc is) you're golden 19:18
whitequark[cis]dxld: yeah i'm familiar19:19
whitequark[cis]and if it's not an executable you can write a tiny main() that calls the function you want19:19
dxldwell yeah, but if yosys, say, called abc as a library you'd have to compile all of yosys as 32bit which obviously sucks much more than just having it confined to abc 19:20
whitequark[cis]it doesn't call it as a library because of the random memory corruption that used to happen when it did19:20
dxldhaha :)19:20
whitequark[cis]the support is there, you can enable it via an option19:20
whitequark[cis]yowasp-yosys does that19:21
whitequark[cis]because wasm is 32-bit (the compiler prefix i'm using anyway) it doesn't tickle those bugs at least19:21
whitequark[cis]though... i tried building abc for wasm not as a library within yosys (as a standalone executable) and it segfaults with a completely inscrutable backtrace19:21
whitequark[cis]i tried to make this work twice and decided to just implement what i want in some other way19:22
dxldanyway point is, povik, please keep doing what you're doing <319:22
whitequark[cis](i wanted output redirection. i ended up using some really cursed freopen tricks. but that got it done in a day)19:22
povikdxld: i am happy you like it! though i can't promise it will ever amount to anything more serious19:29
whitequark[cis]I second dxld 19:30
povikok, that message applies to you too then :P19:30
dxldfamous last words "just a hobby, won't be big and professional like gnu" :D19:30
*** Wolfvak <Wolfvak!~Wolfvak@user/wolfvak> has joined #yosys19:42
jixbesides techmapping, abc is also used for formal verification from SBY, in particular the pdr command which implements pdr/ic3 (two names for the same algorithm)19:57
*** bjorkintosh <bjorkintosh!~bjork@2600:1700:5400:c80:d6a5:b303:fb7e:c11f> has joined #yosys20:01
*** bjorkintosh <bjorkintosh!~bjork@user/bjorkintosh> has quit IRC (Client Quit)20:04
somlowhitequark: not to mention that abc is broken on BE platforms (not sure if maybe that's what you meant when you said "64-bit platforms" earlier)20:10
whitequark[cis]no, that's a separate issue20:10
whitequark[cis]but might be related20:10
*** V <V!~v@ircpuzzles/2022/april/winner/V> has quit IRC (Ping timeout: 240 seconds)20:11
jixIIRC the endianness issue was it casting pointers to access the same data as differently sized int types, with the cast and the accesses not being close to each other, so really hard to even enumerate the places where that issue is present20:14
jixbut that shouldn't be affected by ASLR20:15
dxldI wonder if there's a ASAN/UBSAN mode for detecting misaligned accesses? 20:16
dxldand if not why not :)20:16
dxlduuh ubsan does actually seem to support that20:17
jixI don't think the accesses were misaligned, or at least even if they are not, the code would still be buggy20:18
dxldmaybe this isn't as hopeless as we thought20:18
dxldthe issue I have in mind is https://github.com/YosysHQ/yosys/issues/264520:19
dxldso yeah it was more complicated than simple alignment20:20
dxldwhitequark[cis]: do you know any specific instances of code that break because of the macos ASLR?20:21
dxldor is there a tracking issue or something?20:21
jixdxld: yeah that's the same one I'm thinking of20:22
whitequark[cis]dxld: macos builds of yosys on CI fail spuriously because of it20:24
whitequark[cis]it's very annoying20:24
whitequark[cis]like, run the testsuite a few dozen times and it'll eventually segfault20:24
whitequark[cis]there's nothing i know of beyond that20:25
povikah, so that's the reason for those fails20:25
povikindeed annoying20:25
whitequark[cis]ASLR causes breakage because abc makes incorrect assumptions about pointer bits20:25
whitequark[cis]I don't remember exactly which20:25
*** V <V!~v@ircpuzzles/2022/april/winner/V> has joined #yosys20:26
dxldcapturing a coredump for one of these crashes might be a start for debugging this then20:28
dxldand I would try a build with all sanitizers I can get my mits on enabled as well for good measure20:30
dxldbut given how crusty abc is maybe that'll be information overload :]20:31
*** Wanda[cis] <Wanda[cis]!mwkmwkmwkm@2a01:4f8:c012:5b7:0:1:0:c> has joined #yosys20:36
Wanda[cis]it also occasionally fails on linux for the same reason as on mac, it's just much rarer20:36
*** acathla_ <[email protected]> has joined #yosys20:56
*** vup2 <[email protected]> has joined #yosys20:56
*** pi3 <[email protected]> has joined #yosys20:57
*** mwk_ <mwk_!~mwk@yosys/mwk> has joined #yosys20:57
*** krispaul <[email protected]> has joined #yosys20:58
*** lambda <[email protected]> has quit IRC (*.net *.split)21:02
*** acathla <[email protected]> has quit IRC (*.net *.split)21:02
*** kristianpaul <kristianpaul!~paul@user/kristianpaul> has quit IRC (*.net *.split)21:02
*** crzwdjk <[email protected]> has quit IRC (*.net *.split)21:02
*** vup <[email protected]> has quit IRC (*.net *.split)21:02
*** josuah <[email protected]> has quit IRC (*.net *.split)21:02
*** mwk <mwk!~mwk@yosys/mwk> has quit IRC (*.net *.split)21:02
*** lambda <[email protected]> has joined #yosys21:08
*** ec_ <ec_!~ec@gateway/tor-sasl/ec> has joined #yosys21:43
*** ec <ec!~ec@gateway/tor-sasl/ec> has quit IRC (Ping timeout: 246 seconds)21:46
*** nonchip <[email protected]> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)22:17
*** nonchip <[email protected]> has joined #yosys22:17
*** ec_ <ec_!~ec@gateway/tor-sasl/ec> has quit IRC (Remote host closed the connection)22:27
*** ec_ <ec_!~ec@gateway/tor-sasl/ec> has joined #yosys22:27
loftypovik: looking at those results I'm reasonably confident you have a bug in your cut calculation code. 23:39
loftyAs in, you are likely producing fewer cuts than actually possible23:41
loftyI've been trying to figure out where it might be, but I'm not having too much luck from simply reading the code23:56
loftyBut having greater LUT depth than ABC is a symptom of not enough cut variety.23:56

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!