harvard-acc / aladdin Goto Github PK
View Code? Open in Web Editor NEWA pre-RTL, power-performance model for fixed-function accelerators
License: Other
A pre-RTL, power-performance model for fixed-function accelerators
License: Other
root@3f112d8239ca:/workspace/gem5-aladdin/src/aladdin/SHOC/triad# ls
Makefile example triad.c triad.h
root@3f112d8239ca:/workspace/gem5-aladdin/src/aladdin/SHOC/triad# make run-trace
/workspace/LLVM-Tracer/bin/get-labeled-stmts triad.c -- -I/usr/local/lib/clang/6.0.0/include -I/workspace/gem5-aladdin/src/aladdin -I/workspace/gem5-aladdin/src/aladdin/SHOC/common/ -DLLVM_TRACE
"/usr/local/bin/clang-6.0" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-llvm" "-disable-free" "-disable-llvm-verifier" "-main-file-name" "triad.c" "-static-define" "-mrelocation-model" "static" "-mthread-model" "posix" "-fmath-errno" "-masm-verbose" "-mconstructor-aliases" "-munwind-tables" "-fuse-init-array" "-target-cpu" "x86-64" "-dwarf-column-info" "-debug-info-kind=limited" "-dwarf-version=4" "-debugger-tuning=gdb" "-momit-leaf-frame-pointer" "-coverage-notes-file" "/workspace/gem5-aladdin/src/aladdin/SHOC/triad/triad.gcno" "-resource-dir" "/usr/local/lib/clang/6.0.0" "-I" "/workspace/gem5-aladdin/src/aladdin" "-I" "/workspace/gem5-aladdin/src/aladdin/SHOC/common/" "-D" "LLVM_TRACE" "-I" "/workspace/gem5-aladdin/src/aladdin/gem5" "-D" "LLVM_TRACE" "-internal-isystem" "/usr/local/include" "-internal-isystem" "/usr/local/lib/clang/6.0.0/include" "-internal-externc-isystem" "/usr/include/x86_64-linux-gnu" "-internal-externc-isystem" "/include" "-internal-externc-isystem" "/usr/include" "-O1" "-fdebug-compilation-dir" "/workspace/gem5-aladdin/src/aladdin/SHOC/triad" "-ferror-limit" "19" "-fmessage-length" "0" "-fno-unroll-loops" "-fno-builtin" "-fno-inline" "-fobjc-runtime=gcc" "-fdiagnostics-show-option" "-o" "triad.llvm" "-x" "c" "triad.c"
opt -S -load=/workspace/LLVM-Tracer/lib/full_trace.so -fulltrace -labelmapwriter triad.llvm -o triad-opt.llvm
llvm-link -o full.llvm triad-opt.llvm /workspace/LLVM-Tracer/lib/trace_logger.llvm
llc -O0 -disable-fp-elim -filetype=asm -o full.s full.llvm
g++ -O0 -fno-inline -o triad-instrumented full.s -lm -lz -lpthread
/usr/bin/ld: /tmp/ccP7FT6j.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
../common/Makefile.tracer:64: recipe for target 'triad-instrumented' failed
make: *** [triad-instrumented] Error 1
root@3f112d8239ca:/workspace/gem5-aladdin/src/aladdin/SHOC/triad#
Error while trying sh run.sh
in test_simd in integration-test/with-cpu
Note that you need to explicitly config how to partition each array in your source code. If you do not want to partition the array, declare it as partition_factor 1 in your config file, like:
like what?
I have seen most of accelerator works are finished by FPGA / ASIC / other hardware platforms, not purely completed in software level. Is ALADDIN a tool could design accelerator with inner-parallelism completely in software level? Not just some interfaces.
I have downloaded the docker image of gem5-aladdin and only built the Aladdin. I am able to run the triad example and the following output files are generated: triad_summary, out.csv, ddg_parse_progress.out.
But, I am not able to find the "<bench_name>_stats" and "<bench_name>_stats_power" files.
Do I need to set any flags for generating the stats files?
Problem 1 : pipeline did not affect the result and aladdin result show that loop pipelining always be not ON .
Problem 2 : power model just can working on 10ns cycle time , did not supports other ?
THANKYOU
The following site:
https://gitlab.engr.illinois.edu/ayooshb2/gem5-aladdin
has the “build” directory
Xyzsam/gem5-aladdin image doesn’t contain the “build” directory. Your documents say
scons build/…
can not build. Very confusing
I've compiled Aladdin and LLVM-Tracer on ubuntu 16.04 and I'm trying to run the example program in the readme. However when the opt command is invoked it returns an error about a undefined symbol.
Error opening '/home/dev2/LLVM-Tracer-master/full-trace/full_trace.so': /home/dev2/LLVM-Tracer-master/full-trace/full_trace.so: undefined symbol: _ZN4llvm8LoopInfo2IDE -load request ignored.
I built llvm from source using the cmake scripts in the tracer repo.
How did file dynamic_trace.gz come about?
Hi,
I was trying to run the fft test in SHOC. In the normal mode (without dma) it makes the dynamic trace but it does not give out the power and area summary (it does give out the stats). When I try to make the trace using the dma-trace-binary, the fft-instrumented has a segmentation fault. Please let me know if there is a workaround. My main goal is to get power and area numbers.
Thanks
Hi,
I am running a machine learning workload over Aladdin and it compiles fine when followed each and every step. However, after the instrumented file is generated, I do the "./alexnet-instrumented" command but it does not create any dynamic-trace file.
Can you let me know how to fix this issue ?
Thanks.
If an accelerator has multiple PEs and share a local buffer.
Does the buffer(memory) in ALADDIN able to support broadcast mechanism that I don't need to partition it to get correct behavior?
What I want to do is like this
int A[2];
int B[4];
int C[4];
for(i=0; i<2; i++)
for(j=0; j<4; j++)
C[j] = A[i] + B[j];
I want to unroll the second for-loop with the factor 4, but the data from array A is the same in that for-loop. As my testing result, I still need to partition all of the three arrays (A, B and C) for 4 times to get correct performance behavior. So I want to confirm that ALADDIN support the data broadcasting or not.
Thanks.
i'm trying to run my code on Docker , i met a problem when i execute $ALADDIN_HOME/common/aladdin mac ../dynamic_trace.gz config_example
cmd show :
aladdin: ScratchpadDatapath.cpp:239: virtual void ScratchpadDatapath::stepExecutingQueue(): Assertion `partition.memory_type != dma && "Host memory accesses are not supported by standalone Aladdin!"' failed.
i have tried to trace the source code , but it's too difficult for me .
Hello,
I'm new to Aladdin and Gem5-aladdin.
I have a little request, apparently, from the SHOC
benchmark suite only the triad
one has an example configuration file. It would be very useful (especially to understand the results in the papers) if some examples have been included to the other benchmarks (fft, gemm ...) ?
Thanks in advance!
Best regards,
Based on what I see in the paper, it looks like it is possible to sweep a parameter in the configuration file. For example, sweeping the values of cycle time or loop unrolling count. I tried different formats for sweeping the values, but none of them worked. Can you please explain how one can sweep the values of parameters?
Thanks,
Matt
Sorry , i got a question about Aladdin's input .
Can C++ use as a input ? or only C ?
Because paper indicate that Aladdin can use C only ,
but i try a simple C++ file as a input ,
Aladdin can also execute .
root@972a8d761493:/workspace/gem5-aladdin# scons build/X86/gem5.opt
scons: Reading SConscript files ...
Warning: Your compiler doesn't support incremental linking and lto at the same time, so lto is being disabled. To force lto on anyway, use the --force-lto option. That will disable partial linking.
Checking for C header file Python.h... yes
Checking for C library python2.7... no
Error: can't find library python2.7 required by python
I’m trying to build that framework ,
Q1 : I downloaded the docker image of gem5-aladdin , this error occurs on After setting the environment variables:
cd $ALADDIN_HOME/common
make
Cmd show that /usr/bin/ld: cannot find -lboost_regex
collect2: error: ld returned 1 exit status
Makefile:86: recipe for target 'aladdin' failed
make: *** [aladdin] Error 1
Q2 : I can’t find this file when i execute this command : $ALADDIN_HOME/common/aladdin triad ../dynamic_trace.gz config_example,That occurs on step 4. Run Aladdin .
Cmd show that bash: $../ALADDIN_HOME/common/aladdin: No such file or directory
Hope u can answer my question .
Thank you !
I have written a top-level function which calls a few helper functions in order to implement an algorithm. Based on #7, I added every function's name to the WORKLOAD variable. However, I haven't partitioned any of my 1D or 2D arrays. Can you please explain what partitioning does (cyclic in particular)? What is the benefit of doing it?
The reason I am asking this question is that I get the following error when I start the simulation
Unknown partition : m@inst: 9
and I guess it has something to do with the partitioning.
Excuse me if the question is trivial. I am not from the architecture community and not very familiar with low-level details.
Thanks,
Matt
Cross-posting from harvard-acc/smaug#102, as this is mainly an Aladdin bug, not a SMAUG bug. The reason is this: typically, we store the name of the array being dereferenced in the array_label
field of ExecNode
. This works fine for very simple code, but it breaks down very easily. In this particular case, we have a hostLoad
operation, which is not treated like a normal load or store:
hostLoad
and hostStore
operations, we don't fill in an array name in the ExecNode
in the first place: link. Unlike normal loads and stores from a scratchpad or cache, these are bulk transfer operations which have two addresses (source and dest), and it's not obvious which one the array_label
would refer to.add.ptr13
rather than orig_function_param_name
. Again, this is a fundamental problem of Aladdin's reliance on variable names, which has caused no end of issues like this and resulted in numerous band-aid solutions that only partially solve the problem (such as the "forward" parameters in function calls).The only reliable way to address this is to use the address itself as the lookup key and find the array whose address range covers that key.
Failed to Build on Ubuntu machine:
Program.cpp: In memeber function 'std::__cxx11::list<std::[air<comst ExecNode . comst ExecNode> > Program::findLoopBoundaries(const SrcTypes::UniqueLabel*, const ScrTypes::DynamicLabel*_const':
Program.cpp:76:19: crror: 'loop_start' may beused inintialized in this funtion [-Weorror-unitilized]
cont ExecNode* loop_start;
Peter H. Chen ([email protected])
I've just installed Aladdin but I had some problems along the way. I think that if you add the following specifications to the installation guide it would make the life the users a lot easier:
[1] http://www.zlib.net/zlib-1.2.11.tar.gz
[2] http://releases.llvm.org/3.4/clang+llvm-3.4-x86_64-linux-gnu-ubuntu-13.10.tar.xz
it show dynamic_trace.gz: Starting to log at inst = 0. after executed ./xxx-instrumented , there are never get the stopping logging message . how i debug it ?
I've run on docker and I'm trying to run the example program in the readme .
Q1 : After pull the image , i'm starting the first step (build) , cmd show a error that
/usr/bin/ld: cannot find -lboost_regex
collect2: error: ld returned 1 exit status
Makefile:86: recipe for target 'aladdin' failed
make: *** [aladdin] Error 1
i try to use the command (sudo apt-get install -y libboost-regex-dev) to solve that problem , it remove the error in first time make . But i don't know that is it solution?
Q2 :After i solved the first Q1 , i continue execute the step following the readme , i meet the second question , when i execute the command (clang -g -O1 -S -fno-slp-vectorize -fno-vectorize -fno-unroll-loops -fno-inline -emit-llvm -o triad.llvm triad.c) , cmd show a error that
Error opening '/workspace/LLVM-Tracer/full-trace/full_trace.so': /workspace/LLVM-Tracer/full-
trace/full_trace.so: cannot open shared object file: No such file or directory
-load request ignored.
i have no idea about it .
Hope u can help me .
Thank you ,Sir .
Hi, I am trying to run bb_gem benchmark using the following config file.
pipelining,0
cycle_time,2
partition,cyclic,x,1024,4,1
partition,cyclic,y,256,4,1
partition,cyclic,z,1024,4,1
I am getting the following output of the aladdin. Can you please let me know where am I going wrong:
[ERROR]: At node 239, invalid array access: y: Attempting to access offset 256, but total size = 256
Hello, I would like to add power data under different technologies for test, but it seems the repository doesn’t contain the microbenchmarks you used (as mentioned in readme). I wonder whether the microbenchmarks are RTL covering the basic functional units, then synthesize them by dc to extract power data, since I hope to learn from the method of Aladdin to get the power data if possible. Could you please give me any suggestion about it?
Meanwhile, it is said the technology is 45nm in readme, and in common/power_func.h the comments show it’s 40nm, I wonder whether the power data is from the opensource 45nm pdk?
Thank you!
It can design DNN accelerator?
I am trying to install LLVM Tracer but the cmake never makes it through. It requires zlib 1.2.10 specifically. I have 1.2.8 on my system as mentioned in the README. However, it looks like the Tracer requires zlib 1.2.10.
Hi,
Is Aladdin not supporting external library functions like <math.h>? I tried running exp, it can compile when I add the -lm flag to the makefile and creates a trace, so I saw this output "dynamic_trace.gz: Stopping logging at inst 443." but when I ran Aladdin, it doesn't show any computation/cycle count and reaches the end of the trace immediately. Do you have a suggestion to solve the issue? Thanks.
Below is the ppt document to
cd
run.sh
001_Run_Gem5_Aladdin.pptx
I tried to generate trace using LLVM-tracer as follows:
export WORKLOAD=aes256_encrypt_ecb
clang -g -O1 -static -S -fno-slp-vectorize -fno-vectorize -fno-unroll-loops -fno-inline -emit-llvm -o aes.llvm aes.c
opt -S -load=$(TRACER_HOME)/full-trace/full_trace.so -fulltrace aes.llvm -o aes-opt.llvm
llvm-link -o full.llvm aes-opt.llvm $(TRACER_HOME)/profile-func/trace_logger.llvm
llc -filetype=asm -o full.s full.llvm
gcc -static -fno-inline -o aes-instrumented full.s ../../common/harness.c -lz -lm
./aes-instrumented input.data check.data
The trace was successfully generated, then I tried to simulate aes with Aladdin using the following configuration saved in "config_example":
unrolling,aes256_encrypt_ecb,5,2
pipelining,1
cycle_time,6
and invoked Aladdin as:
aladdin aes dynamic_trace.gz config_excample
Unfortunately, Aladdin aborted with the following errors:
Unknown partition : rcon@inst: 1
Could anyone help on resolve this issue? Or maybe I should ask at the very beginning, is Aladdin able to simulate benchmarks from MachSuite? Sorry if this is not the right place to ask for help. Please point me to the right place, since I did not see any user mailing list or something similar from Aladdin's project page.
Thanks for releasing the great Aladdin tool!
About
https://github.com/harvard-acc/ALADDIN/blob/master/integration-test/with-cpu/test_aes/aes
and
https://github.com/harvard-acc/ALADDIN/blob/master/integration-test/with-cpu/test_aes/dynamic_trace.gz
these two files.
About these two files, After I modify the code corresponding to the aes algorithm in the MachSuite folder, how do I generate the 'aes' and 'dynamic_trace.gz' file corresponding to the new code?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.