Coder Social home page Coder Social logo

microspeech_1 test error about morpher HOT 8 OPEN

neulxf avatar neulxf commented on August 19, 2024
microspeech_1 test error

from morpher.

Comments (8)

odarcy1 avatar odarcy1 commented on August 19, 2024

I get the very same issue with the array_add example, hycube simulator fails the same assertion

from morpher.

odarcy1 avatar odarcy1 commented on August 19, 2024

ok so I digged a little more, and the error you are getting when invoking Hycube simulator is due to the fact that it is given as argument -c *.bin which in my case does not exist, so hycube simulator errors out with assertion that it can't open the cmem file.

The cmem file (*.bin) should have been generated in a previous step, which is what I am going to dig next to understand why the cmem file did not get generated

from morpher.

neulxf avatar neulxf commented on August 19, 2024

I pass the array_add example, but in the microspeech_1 test, the Mapper can not generate the cmem file(*.bin), so the Hycube simulator error

from morpher.

odarcy1 avatar odarcy1 commented on August 19, 2024

Ok, so I rebuilt everything from scratch, and now for the array_add example the mapper is able to generate the cmem file (*.bin) but it fails further in the hycube simulation. See below, there is a STORE instruction that fails an asseertion because the operand2 is not aligned on 4 bytes.

hycube_simulator: /home/odarcy/morpher/hycube_simulator/src/CGRATile.cpp:947: DataType HyCUBESim::CGRATile::store(DataType, DataType, int): Assertion `op2 % 4 == 0' failed.
Aborted (core dumped)
0%| | 0/1 [00:00<?, ?it/s]
Traceback (most recent call last):
File "run_morpher.py", line 218, in
main(csource, function)
File "run_morpher.py", line 192, in main
f = open("sim_result.txt", "r")
FileNotFoundError: [Errno 2] No such file or directory: 'sim_result.txt'

from morpher.

odarcy1 avatar odarcy1 commented on August 19, 2024

I found in the Hycube source code that if you set environment variable SIMULATOR in your shell prior to running hycube simulator, you get a detailed execution log, here is what I see at the end, indeed there is a STORE operation with in2 = 42 which is not 4 byte aligned... :

---------------execute new instruction ----------------------------
current PC = 1,LER=4,LSR=1
kII =17,PC =1,y=0,x=0
RegInfo ::
P=INV,I1=655360,I2=42,R0=INV,R1=INV,R2=INV,R3=INV,RES=INV
currIns ::
NPB=0,OP=STORE,CONSTVALID=0,CONST=0
,BYP_R0=1,BYP_R1=1,BYP_R2=1,BYP_R3=1
,REN_R0=0,REN_R1=0,REN_R2=0,REN_R3=0,tregwen=0
,XB_P=INV,XB_I1=INV,XB_I2=INV,XB_NORTH=INV,XB_EAST=INV,XB_WEST=INV,XB_SOUTH=INV
print ins end
: STORE,655360,42
hycube_simulator: /home/o00244506/morpher/hycube_simulator/src/CGRATile.cpp:947: DataType HyCUBESim::CGRATile::store(DataType, DataType, int): Assertion `op2 % 4 == 0' failed.

from morpher.

neulxf avatar neulxf commented on August 19, 2024

I get the same issue when I build the Moroher in ubuntu22.04, but when build with Dockerfile, there is no issue, I guess the reason is that the compiler used version is different

from morpher.

odarcy1 avatar odarcy1 commented on August 19, 2024

Yes, with the dockerfile, it works for me too, the array_add example/tutorial passes. But I also recently found out that in my own environment, it works too, array_add example passes. The thing the you must NOT DO even if the README file tells you to is this line:

Pull the code clone first: git clone --recurse-submodules https://github.com/ecolab-nus/Morpher.git
pull the latest changes of submodules.: git submodule update --init --remote

The first git clone command seems to pull the right versions of the 3 submodules. Everything works with that.
But if you do the second git submodule update, that screws up everything, it pull a different version of the 3 submodules, and although they all build, you get runtime errors as I mentionned in earlier posts

from morpher.

jiayi-wang98 avatar jiayi-wang98 commented on August 19, 2024

@odarcy1

Yes, with the dockerfile, it works for me too, the array_add example/tutorial passes. But I also recently found out that in my own environment, it works too, array_add example passes. The thing the you must NOT DO even if the README file tells you to is this line:

Pull the code clone first: git clone --recurse-submodules https://github.com/ecolab-nus/Morpher.git pull the latest changes of submodules.: git submodule update --init --remote

The first git clone command seems to pull the right versions of the 3 submodules. Everything works with that. But if you do the second git submodule update, that screws up everything, it pull a different version of the 3 submodules, and although they all build, you get runtime errors as I mentionned in earlier posts

Thank you so much! I got the exactly same issue with you and it works now without doing the second pulling.

from morpher.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.