sb0 changed the topic of #m-labs to: ARTIQ, Migen, MiSoC, Mixxeo & other M-Labs projects :: fka #milkymist :: Logs http://irclog.whitequark.org/m-labs
imrehg has joined #m-labs
rjo has quit [Quit: leaving]
nicksydney has quit [Quit: No Ping reply in 180 seconds.]
nicksydney has joined #m-labs
mumptai has quit [Ping timeout: 260 seconds]
cr1901 has quit [Ping timeout: 260 seconds]
mumptai has joined #m-labs
<sb0> rescan the repo, ok, but commit?!
imrehg has quit [Quit: Leaving]
<sb0> whitequark, what's the rpc alloca trick, exactly?
<GitHub85> [artiq] sbourdeauducq pushed 4 new commits to master: http://git.io/v3TAu
<GitHub85> artiq/master 799a58a Sebastien Bourdeauducq: doc: minor cleanup
<GitHub85> artiq/master 13c1517 Sebastien Bourdeauducq: examples/ddb: add --simulation for controllers
<GitHub85> artiq/master 4791758 Sebastien Bourdeauducq: pdq2/driver: implement ping
<whitequark> sb0: the caller invokes the equivalent of...
travis-ci has joined #m-labs
<travis-ci> m-labs/artiq#385 (master - 3f68d0b : Sebastien Bourdeauducq): The build has errored.
travis-ci has left #m-labs [#m-labs]
<whitequark> void *result = { void *ptr = NULL; loop: int size = rpc_recv("tag", ptr); if(size) { ptr = alloca(size); goto loop; }; else ptr }
<whitequark> which allos rpc_recv to allocate on the caller's stack, with some care.
<sb0> so this supports dynamic lists, which are alloca'd?
<whitequark> sure
<sb0> eg a RPC can return just any list?
<whitequark> yes
<sb0> so what happens if you do: for i in range(1000): x = some_rpc(), y = some_rpc()
<sb0> when are the allocas freed?
<whitequark> the same thing as if you did x = [0]*1000
<whitequark> after the function returns.
<sb0> ok, so in this case this can easily use a ton of memory, right?
<whitequark> yes. though not exclusive to RPCs by any means.
<sb0> (that's not necessarily an important problem, just need to understand what the limitations are)
<whitequark> before you ask for some kind of "scope" at the end of which allocations are killed: inner functions are exactly that
<sb0> what about inlines?
<whitequark> hrm.
<whitequark> it's possible to add stacksave and stackrestore intrinsics around inlines, so that they behave as-if they were not inlined
<sb0> ok
<whitequark> it's annoying to do in practice because exceptions
<sb0> anyway, details. how is the inline transform working with the new compiler?
<whitequark> define "inline transform"?
<sb0> *interleave
<sb0> sorry
<whitequark> it works on ARTIQ IR level, under assumption that the typechecker has verified the possibility of interleaving
<sb0> how much of the core device unittest can we run now?
<whitequark> haven't tried yet
<whitequark> well, there are no classes right now, so probably very little
<whitequark> it would make sense to ask this after RPCs and classes (or host objects, same thing here) are added
<GitHub93> [artiq] whitequark pushed 1 new commit to new-py2llvm: http://git.io/v3kCc
<GitHub93> artiq/new-py2llvm 9c5ca2a whitequark: LLVMIRGenerator: add target data layout to LLVM modules.
<whitequark> goddamn llvmlite
<whitequark> *** Error in `python3': free(): invalid pointer: 0x00007f5777f98080 ***
<whitequark> if you try to display a module
<whitequark> why does that happen inside std::string::reserve -_______
<whitequark> *facepalm*
imrehg has joined #m-labs
<whitequark> why does LLVMPY_PrintModuleToString call free()
<whitequark> sb0: can you run the following?
<whitequark> from llvmlite_artiq import binding as llvm
<whitequark> str(llvm.parse_assembly(""))
<whitequark> and also with "from llvmlite"
<whitequark> both crash on my system, with a range of compilers, libstdc++'s, LLVM versions, ...
<sb0> >>> str(llvm.parse_assembly(""))
<sb0> "; ModuleID = '<string>'\n"
<sb0> (that's llvmlite_artiq)
<whitequark> hm, that's what it should do, yes
<sb0> do you want me to install and try with the unmodified llvmlite?
<whitequark> no
<whitequark> my system's borked somehow
<whitequark> annoying
<whitequark> ah, it fixed itself
<whitequark> or rather, it seems that llvmlite doesn't work with develop --user
<GitHub172> [artiq] sbourdeauducq pushed 3 new commits to master: http://git.io/v3kwj
<GitHub172> artiq/master a21049d Sebastien Bourdeauducq: ctlmgr: exponential backoff
<GitHub172> artiq/master 4b19566 Sebastien Bourdeauducq: pc_rpc/Server: add built-in terminate
<GitHub172> artiq/master 54b11a3 Sebastien Bourdeauducq: ctlmgr: graceful controller termination
<GitHub75> [artiq] whitequark pushed 1 new commit to new-py2llvm: http://git.io/v3krs
<GitHub75> artiq/new-py2llvm 8b7d38d whitequark: Add ARTIQ_DUMP_ASSEMBLY.
imrehg has quit [Quit: Leaving]
<GitHub17> [artiq] whitequark pushed 1 new commit to new-py2llvm: http://git.io/v3k1T
<GitHub17> artiq/new-py2llvm 02b1543 whitequark: Implement receiving exceptions from RPCs.
<whitequark> sb0: ok, exceptional return now works
travis-ci has joined #m-labs
<travis-ci> m-labs/artiq#386 (master - 54b11a3 : Sebastien Bourdeauducq): The build has errored.
travis-ci has left #m-labs [#m-labs]
cr1901 has joined #m-labs
cr1901_modern has joined #m-labs
sb0_ has joined #m-labs
<sb0_> whitequark, do i need a binutils patch for artiq?
<sb0_> can you put it into the artiq repos and update the doc?
<whitequark> once I get RPCs done I guess
sb0_ has quit [Quit: Leaving]
imrehg has joined #m-labs
imrehg has quit [Quit: Leaving]
<whitequark> it works :D
<whitequark> you can receive a list of strings and shit
<GitHub20> [artiq] whitequark pushed 1 new commit to new-py2llvm: http://git.io/v3IFt
<GitHub20> artiq/new-py2llvm d4270cf whitequark: Implement receiving data from RPCs.
<GitHub104> [artiq] whitequark pushed 1 new commit to new-py2llvm: http://git.io/v3INk
<GitHub104> artiq/new-py2llvm f7b64db whitequark: LLVMIRGenerator: fixup phis on expansion of ARTIQ instructions.
<GitHub40> [artiq] whitequark pushed 1 new commit to new-py2llvm: http://git.io/v3INF
<GitHub40> artiq/new-py2llvm dfc91a3 whitequark: ARTIQIRGenerator.polymorphic_print: str([x]) uses repr(x), not str(x).
<GitHub20> [artiq] whitequark pushed 1 new commit to new-py2llvm: http://git.io/v3Ihp
<GitHub20> artiq/new-py2llvm b99eae6 whitequark: session.c: send_rpc_value: fix list serialization.
<whitequark> sb0: opinion on type annotation syntax used to describe RPC return values?
<whitequark> note that it must be executable Python at the point of function definition
<GitHub195> [migen] enjoy-digital pushed 1 new commit to master: http://git.io/v3LJS
<GitHub195> migen/master 6466672 Florent Kermarrec: migen/flow/actor: fix sop/eop validation in PipelinedActor (stb can be inactive when pipe_ce is active)
travis-ci has joined #m-labs
<travis-ci> m-labs/migen#69 (master - 6466672 : Florent Kermarrec): The build passed.
travis-ci has left #m-labs [#m-labs]
mumptai has quit [Quit: Verlassend]
cr1901_modern has quit [Quit: Leaving.]
<GitHub55> [artiq] whitequark pushed 1 new commit to master: http://git.io/v3LbC
<GitHub55> artiq/master 95b56e8 whitequark: Add binutils patch.
travis-ci has joined #m-labs
<travis-ci> m-labs/artiq#387 (master - 95b56e8 : whitequark): The build has errored.
travis-ci has left #m-labs [#m-labs]
rjo has joined #m-labs