Assignment 3 About m1 * ReLU(m0 * input)

130 views
Skip to first unread message

WeiLong Xu

unread,
Oct 25, 2020, 4:02:17 AM10/25/20
to cmpt-295-sfu
# Question templates
SFU ID: 301385645
Github username: /
Github: Link to github repo (your assignment repos are private so these links are only accessible to TAs and Instructor)
Line and file: /
Expected behavior:/
Observed behavior:/
Question: Question is about # m1 * ReLU(m0 * input). When I'm using java -jar venus.jar ./test_files/main.s ./inputs/simple0/bin/inputs/input0.bin ./inputs/simple0/bin/m0.bin ./inputs/simple0/bin/m1.bin -ms -1. I got: 
**Step 3: Linear layer = matmul(m1, relu)** 
171 
1596 
26571 
But in the ref, the result in step3 is: 
**Step 3: Linear layer = matmul(m1, relu)** 
171 
441 
711 
I want to confirm that whether it is a bug in matmul.s.  I did test other input , only the step 3 exist this kind of problem, all step 1 are same with the answer in ref file.



WeiLong Xu

unread,
Oct 25, 2020, 11:01:42 AM10/25/20
to cmpt-295-sfu
I put the m1 and relu into the test_matmul, it’s worked. So the bug is not caused by matmul. 

WeiLong Xu <weilo...@gmail.com>于2020年10月25日 周日01:02写道:
--


You received this message because you are subscribed to the Google Groups "cmpt-295-sfu" group.


To unsubscribe from this group and stop receiving emails from it, send an email to cmpt-295-sfu...@googlegroups.com.


To view this discussion on the web visit https://groups.google.com/d/msgid/cmpt-295-sfu/915726c0-148d-4b28-8fcf-04df2d9e524eo%40googlegroups.com.


ali sedaghati

unread,
Oct 25, 2020, 3:44:32 PM10/25/20
to cmpt-295-sfu
Please fill out all parts of the provided template for asking questions related to assignments and provide us with a link to your repo.

Arrvindh Shriraman

unread,
Oct 25, 2020, 4:23:13 PM10/25/20
to cmpt-295-sfu
Please include comments in your assembly code
1) What are the input arguments to each method or routine
2) What is each register mapping
3) Include some C code to indicate what you are expecting the code to be doing


A figure would be helpful

WeiLong Xu

unread,
Oct 25, 2020, 9:58:59 PM10/25/20
to cmpt-295-sfu
# Question templates
SFU ID: 301385645
Github username: WeilongXu
Github: g...@github.com:CMPT-295-SFU/assignment-3-WeilongXu.git
Line and file: 155 main.s 
Expected behavior:
e.g:
**Step 3: Linear layer = matmul(m1, relu)** 
171 
441 
711 
Observed behavior:
e.g
**Step 3: Linear layer = matmul(m1, relu)** 
171 
1596 
26571 
Question: Question is about # m1 * ReLU(m0 * input). When I'm using java -jar venus.jar ./test_files/main.s ./inputs/simple0/bin/inputs/input0.bin ./inputs/simple0/bin/m0.bin ./inputs/simple0/bin/m1.bin -ms -1. There is a problem with the stage 3 that after m1*rule, except the first row, all the rest rows got larger values. 
4de9956fe69fdf29ae8c1b3ba88c396.png
Could you help me find out why? Thank you.

WeiLong Xu <weilo...@gmail.com> 于2020年10月25日周日 下午4:02写道:

ali sedaghati

unread,
Oct 25, 2020, 11:59:15 PM10/25/20
to cmpt-295-sfu
Your code won't pass test_matmul.s. The results are correct, but the order of putting them in the final matrix is wrong. So, solving it should solve the problem with main.s.

WeiLong Xu

unread,
Oct 26, 2020, 12:41:15 AM10/26/20
to cmpt-295-sfu
# Question templates
SFU ID: 301385645
Github username: WeilongXu
Github: g...@github.com:CMPT-295-SFU/assignment-3-WeilongXu.git
Line and file: 155 main.s 
Hi  Ali
I've solved the order put into the final matrix, and tested it. But it still exists that problem at the step 0f m1*relu when using  java -jar venus.jar ./test_files/main.s ./inputs/simple0/bin/inputs/input0.bin ./inputs/simple0/bin/m0.bin ./inputs/simple0/bin/m1.bin -ms -1.  Could this be a problem with register?  Thank you.

WeiLong Xu <weilo...@gmail.com> 于2020年10月25日周日 下午4:02写道:
# Question templates

ali sedaghati

unread,
Oct 26, 2020, 1:59:59 AM10/26/20
to cmpt-295-sfu
You haven't followed the calling convention, especially how you have used the "t" registers could be the reason for this bug.

WeiLong Xu

unread,
Oct 26, 2020, 5:35:23 PM10/26/20
to cmpt-295-sfu
# Question templates
SFU ID: 301385645
Github username: WeilongXu
Github: g...@github.com:CMPT-295-SFU/assignment-3-WeilongXu.git
Line and file: 164 main.s 
Hi  Ali
I tried to change all the t register, but that problem still exists. I felt confused what register caused this problem as I have checked the calling convention again, and I printed the m1 and relu, and I get correct ouput in main. But the matmul of m1* relu still got the same problem with before. I’m looking forward your reply. Thank you.

WeiLong Xu <weilo...@gmail.com>于2020年10月25日 周日01:02写道:

Arrvindh Shriraman

unread,
Oct 26, 2020, 7:32:02 PM10/26/20
to cmpt-295-sfu
It is hard for us to point out the exact register you are going wrong with. We need more details from you in what your assembly is trying to do. Specify what each register is doing in your code.

Could be either your s9 or s10 could be wrong. Print s9 and s10 each time to ensure you are calculating the starting address correctly.
To unsubscribe from this group and stop receiving emails from it, send an email to cmpt-295-sfu+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages