Wrong nstallation of gem5-Aladdin

136 views
Skip to first unread message

Helen Xf

unread,
Jun 8, 2021, 10:23:52 PM6/8/21
to gem5-Aladdin users
Hi, everyone!
I just start to learn gem5 and gem5-Aladdin. I use the docker image of gem5-Aladdin (docker run -it --rm --mount source=gem5-aladdin-workspace,target=/workspace xyzsam/gem5-aladdin).  Then I build the simulator by scons build/X86/gem5.opt. There are no errors when I build it. However, when I run the tests under /workspace/gem5-aladdin/src/aladdin/integration-test/with-cpu/test_multiple_accelerators, many errors or warning occur as shown in the following figures. 

/test_multiple_accelerators
捕获00.PNG
/test_command_queue
捕获.PNG

 Am I using the wrong docker? Is there a more detailed documentation or tutorial for a beginner like me? 

Thank you!

Xiaofeng 

Sam Xi

unread,
Jun 8, 2021, 11:35:10 PM6/8/21
to Helen Xf, gem5-Aladdin users
Hi Xiaofeng,

Nothing is wrong here. We have some spammy errors and some bugs to fix with overlapping array detection. Sorry about the confusion.

If you're interested in writing programs for gem5-aladdin, check out the integration tests - they're a great place to get started. We also have some guides here for writing kernels and using the gem5-aladdin APIs for SMAUG, but the same general guidance applies.

--
You received this message because you are subscribed to the Google Groups "gem5-Aladdin users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gem5-aladdin-us...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gem5-aladdin-users/568b2235-8c63-4738-ae80-a2dcb671d29dn%40googlegroups.com.

Sam Xi

unread,
Jun 10, 2021, 1:23:22 AM6/10/21
to Helen Xf, gem5-Aladdin users
Hi Helen,

I will look into your tiling config assertion error and get back to you.

Regarding the TypeError issue: how did you build gem5? I have not seen this error before.

Regarding the power model: Aladdin will report power for the accelerators. You will need to supply your own power modeling tools for the CPU, DRAM, and any other components you care about.

Sam Xi
Google Inc., Software Engineer
http://www.samxi.org



On Wed, Jun 9, 2021 at 1:58 AM Helen Xf <xfh...@gmail.com> wrote:
Dear Sam, 

I follow the tutorials of SMAUG ( https://harvard-acc.github.io/smaug_docs/run_model_in_simulation.html ). I successfully run LSTM application under /workspace/smaug/experiments/sims/smv/tests/lstm. However, when I build and run a SMAUG model according to https://harvard-acc.github.io/smaug_docs/build_python_model.html. I get an Aborted (core dumped) error. 

All the tests run in docker xyzsam/smaug.

Could you pls. to help me solve this? Thank you and best regards!
image.png

Xiaofeng 


Sam Xi <slxi...@gmail.com> 于2021年6月9日周三 上午11:35写道:

Sam Xi

unread,
Jun 10, 2021, 1:45:49 AM6/10/21
to Helen Xf, gem5-Aladdin users
Hi Helen,

By following all the steps in the documentation with your mySim.py (which as I understand is just copied from the docs). I am not able to reproduce your tiling config issue, but I do notice one problem with your run.sh file: you are running the smaug-instrumented binary under gem5, which is not correct. That binary is only responsible for generating the dynamic trace. For gem5 simulation, you should be running the regular smaug binary, as the docs say in https://harvard-acc.github.io/smaug_docs/run_model_in_simulation.html#run-the-first-simulation. I tried but could not download your tar archive containing your dynamic trace.

Here's the tail end of the output of my command:

warn: x86 cpuid family 0x0000: unimplemented function 2
warn: x86 cpuid family 0x0000: unimplemented function 2
warn: x86 cpuid family 0x0000: unimplemented function 2
warn: instruction 'fcomi' unimplemented
warn: MOVNTDQ: Ignoring non-temporal hint, modeling as cacheable!
Model topology file: mySim_topo.pbtxt
Model parameters file: mySim_params.pb
Number of accelerators: 1
info: Increasing stack size by one page.
======================================================
      Loading the network model...
======================================================
Adding data (Data).
Adding data_1 (Data).
Adding conv (Convolution3d).
Adding max_pool (MaxPooling).
Adding reorder (Reorder).
Adding data_2 (Data).
Adding mat_mul (InnerProduct).
======================================================
      Summary of the network.
======================================================
____________________________________________________________________________________________
Layer (type)                             Output shape                 Parameters
____________________________________________________________________________________________
data_2 (Data)                            (10, 6272)                       0
____________________________________________________________________________________________
data_1 (Data)                            (32, 3, 3, 1)                    0
____________________________________________________________________________________________
data (Data)                              (1, 28, 28, 1)                   0
____________________________________________________________________________________________
conv (Convolution3d)                     (1, 28, 28, 32)                 288
____________________________________________________________________________________________
max_pool (MaxPooling)                    (1, 14, 14, 32)                  0
____________________________________________________________________________________________
reorder (Reorder)                        (1, 6272)                        0
____________________________________________________________________________________________
mat_mul (InnerProduct)                   (1, 10)                        62720
____________________________________________________________________________________________
======================================================
      Tiling operators of the network...
======================================================
Tiling conv (Convolution3d).
Tiling data (Data).
Tiling data_1 (Data).
Tiling data_2 (Data).
Tiling mat_mul (InnerProduct).
Tiling max_pool (MaxPooling).
Tiling reorder (Reorder).
Switched CPUS @ tick 30054489000
switching cpus
warn: ClockedObject: Already in the requested power state, request ignored
**** REAL SIMULATION ****
info: Entering event queue @ 30054489000.  Starting simulation...
warn: Replacement policy updates recently became the responsibility of SLICC state machines. Make sure to setMRU() near callbacks in .sm files!
======================================================
      Scheduling operators of the network...
======================================================
Scheduling data (Data).
Scheduling data_1 (Data).
Scheduling data_2 (Data).
Scheduling conv (Convolution3d).



In the future, please paste the output of any logs as text, not as screenshots. Thanks!

Sam Xi
Google Inc., Software Engineer
http://www.samxi.org

Sam Xi

unread,
Jun 11, 2021, 3:13:20 AM6/11/21
to Helen Xf, gem5-Aladdin users
Per the README, just build everything and you'll get the smaug binary.



Sam Xi
Google Inc., Software Engineer
http://www.samxi.org


On Thu, Jun 10, 2021 at 2:20 AM Helen Xf <xfh...@gmail.com> wrote:
Dear Sam,

Thanks for your help and patience. I build gem5 as follows:
1. I pull the SMAUG docker image: docker pull xyzsam/smaug
2. I run a docker instance of SMAUG: docker run -it --rm --mount source=smaug-workspace,target=/workspace xyzsam/smaug
3. Then, I go to the directory of /workspace/gem5-aladdin and build a gem5.opt: scons build/X86/gem5.opt PROTOCOL=MESI_Two_Level_aladdin -j2 (No errors)

After that, I run the example, i.e., mySim.py provided in the tutorial, and get the TypeError. Besides, I can successfully run the lstm test while I fail to run the minerva test.

Meanwhile, I cannot find a regular smaug binary under /workspace/smaug/build/bin/smaug.  There is only a smaug folder under /workspace/smaug/build/smaug. 
image.png

 I don't know what the problems are. I guess there might be something wrong with my installation.  

Host server configuration:
Host OS: Ubuntu 20.04
Docker Version: Docker version 20.10.5


Thanks again for your help and have a good day.

Regards,
Xiaofeng Hou


Sam Xi <slxi...@gmail.com> 于2021年6月10日周四 下午1:45写道:
Reply all
Reply to author
Forward
0 new messages