Assignment 3 - Venus Error: Instruction lengths > 8 not supported

78 views
Skip to first unread message

Ryan Tio

unread,
Oct 27, 2020, 7:35:25 AM10/27/20
to cmpt-295-sfu
# Question templates
SFU ID: rtio
Github username: rtiosfu
Line and file: Unknown, but happens when running main.s
Expected behavior: Runs the program, presents the results of calculation on MNIST inputs
Observed behavior: Upon reaching step 1, Venus runs into a simulator error, giving reason 'Instruction lengths > 8 not supported
Question: I'm not entirely sure why this is happening. It works completely fine for the simple tests, so I'm not sure what changes between those and MNIST.


Message has been deleted
Message has been deleted

Ryan Tio

unread,
Oct 27, 2020, 12:54:43 PM10/27/20
to cmpt-295-sfu

I've eliminated read_matrix from the reasons as to why this could be happening, and it seems to be an issue with malloc at around line 121-122 of main.s. I honestly am not really sure how to fix it.

Arrvindh Shriraman

unread,
Oct 27, 2020, 1:13:30 PM10/27/20
to cmpt-295-sfu
You might have a bad jump somewhere. Upload to online venus and run it. It will show you at which instruction the error was triggered

Ryan Tio

unread,
Oct 27, 2020, 2:27:19 PM10/27/20
to cmpt-295-sfu
Upon even further testing (and a lot of print statements, because I couldn't get Venus to work with command line arguments) the program runs fine until matmul, reading the files as expected, but then suddenly breaks after about 115 calls to dot. I honestly have no idea what to do.


On Tuesday, October 27, 2020 at 4:35:25 AM UTC-7, Ryan Tio wrote:

ali sedaghati

unread,
Oct 27, 2020, 3:22:26 PM10/27/20
to cmpt-295-sfu
Double-check how you're getting the row and col in read_matrix. 

Ryan Tio

unread,
Oct 27, 2020, 5:13:16 PM10/27/20
to cmpt-295-sfu
I've checked how I've gotten the rows and cols, and even checked the first few inputs of the matrix stream, but nothing appears wrong. The row values are correct (as according to the .txt files) and the col values are correct for m0, m1, and mnist_input. Am I misunderstanding? I checked the arguments after returning from the function in main, too, and they appear to be correct and in the intended order.


On Tuesday, October 27, 2020 at 4:35:25 AM UTC-7, Ryan Tio wrote:

Ryan Tio

unread,
Oct 27, 2020, 5:34:22 PM10/27/20
to cmpt-295-sfu
I think i may have discovered the root cause of not properly allocating the memory for the matrix multiplication? Although when I change it to the 'correct' values it breaks everything.


On Tuesday, October 27, 2020 at 4:35:25 AM UTC-7, Ryan Tio wrote:

Ryan Tio

unread,
Oct 27, 2020, 8:13:22 PM10/27/20
to cmpt-295-sfu
Found the solution. I had somehow forgotten to actually set a6 to the proper allocated memory. 


On Tuesday, October 27, 2020 at 4:35:25 AM UTC-7, Ryan Tio wrote:
Reply all
Reply to author
Forward
0 new messages