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