sims Freeze Up - Possible Cause?

10 views
Skip to first unread message

Zachary Dimeglio

unread,
Apr 16, 2024, 2:50:40 PMApr 16
to OpenPiton Discussion
Hi OpenPiton Team,

I had an interesting scenario pop up while running some simulations, that I figured I would check in about. I am currently running some studies on how different processor configs affect the performance of a matrix multiplication program. To test different algorithms, I am running some fairly large square matrices, and some interesting things happen when I use large dimension sizes.

I am just using a single-tile Ariane core with default configs, and when I try running my algorithm with 128x128 matrices of 32-bit ints (for both multiplicands and output), the simulator eventually hangs up. No crashing, but an indefinite stall forcing a shut-down of the system, always during a L1.5 exchange it seems. I'll attach (1) the sim.log (first few and last lines) and (2) the custom C workload being run for some context. Interestingly, decreasing the matrices dimensions (to say, 100x100 or lower) seems to work fine, but at a certain point the program halts. 

I am curious what could be the possible cause of this? I am quite sure that it has something to do with how much memory is being used, but I am not completely sure. Perhaps the stack is getting overflowed? I know there is no way to dynamically allocate memory, but there is a better way to declare very large data structures as opposed to simply declaring them? 

As a workaround, I can just use smaller matrices and data sizes < 32 bit, I just found this "bug" interesting, and was wondering if anyone can shed light on what's happening. Thanks!

Zachary
sim.log
gemm_naive_single_128.c

Jonathan Balkind

unread,
Apr 16, 2024, 2:55:48 PMApr 16
to OpenPiton Discussion
You're potentially exceeding the stack size that's set in crt.S? https://github.com/PrincetonUniversity/openpiton/blob/openpiton-dev/piton/verif/diag/assembly/include/riscv/ariane/crt.S#L157-L163

We've seen that before in a multicore setting and thus had to increase it before. That said, I'm not sure what effect it would have in a single core setting.

Thanks,
Jon

--
You received this message because you are subscribed to the Google Groups "OpenPiton Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpiton+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openpiton/94a2e435-debb-4f12-a47c-25bbbc581755n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages