ecolab-nus / morpher Goto Github PK
View Code? Open in Web Editor NEWAn Open-Source Tool for CGRA Accelerators
License: MIT License
An Open-Source Tool for CGRA Accelerators
License: MIT License
I am trying to run the HPCA tutorial. But it gives following error
Kernel: array_add
C source: /home/hpca/morpher/Morpher_DFG_Generator/benchmarks/morpher_benchmarks/array_add/array_add.c
CGRA arch: /home/hpca/morpher/Morpher_CGRA_Mapper/json_arch/hycube_original_mem.json
Config: config/default_config.yaml
Run mode: runall
-----Running Morpher_DFG_Generator-----
rm: cannot remove 'memtraces/*': No such file or directory
rm: cannot remove '*.xml': No such file or directory
rm: cannot remove '*.dot': No such file or directory
Generating IR..
Optimizing IR..
Generating DFG (array_add_PartPredDFG.xml/dot) and data layout (array_add_mem_alloc.txt)..
Error opening '/home/hpca/morpher/Morpher_DFG_Generator/build/src/libdfggenPass.so': /home/hpca/morpher/Morpher_DFG_Generator/build/src/libdfggenPass.so: cannot open shared object file: No such file or directory
-load request ignored.
opt: Unknown command line argument '-fn'. Try: 'opt --help'
opt: Did you mean '-S'?
opt: Unknown command line argument '-nobanks'. Try: 'opt --help'
opt: Did you mean '--loops'?
opt: Unknown command line argument '-banksize'. Try: 'opt --help'
opt: Did you mean '--tls-size'?
opt: Unknown command line argument '-type'. Try: 'opt --help'
opt: Did you mean '--tbaa'?
opt: Unknown command line argument '-skeleton'. Try: 'opt --help'
opt: Did you mean '--version'?
opt: Too many positional arguments specified!
Can specify at most 1 positional arguments: See: opt --help
Error: dot: can't open array_add_PartPredDFG.dot
cp: cannot stat 'array_add_PartPredDFG.xml': No such file or directory
rm: cannot remove '*.log': No such file or directory
Code instrumentation..
llvm-link: array_add_opt_instrument.ll: error: Could not open input file: No such file or directory
llvm-link: error: loading file 'array_add_opt_instrument.ll'
llc: error: llc: final.ll: error: Could not open input file: No such file or directory
clang: error: no such file or directory: 'final.o'
clang: error: no input files
Running instrumented code to generate the data memory content (memtraces/array_add_trace_x.txt)..
cp: cannot stat 'memtraces/array_add_trace_0.txt': No such file or directory
cp: cannot stat 'array_add_mem_alloc.txt': No such file or directory
cp: cannot stat 'array_add_mem_alloc.txt': No such file or directory
-----Running Morpher_CGRA_Mapper-----
Updating memory allocation..
Traceback (most recent call last):
File "/home/hpca/morpher/Morpher_CGRA_Mapper/update_mem_alloc.py", line 54, in <module>
get_mem_alloc()
File "/home/hpca/morpher/Morpher_CGRA_Mapper/update_mem_alloc.py", line 16, in get_mem_alloc
f = open(mem_alloc_file, 'r')
FileNotFoundError: [Errno 2] No such file or directory: 'array_add_mem_alloc.txt'
sh: 1: /home/hpca/morpher/Morpher_CGRA_Mapper/build/src/cgra_xml_mapper: not found
rm: cannot remove '*.bin': No such file or directory
cp: cannot stat '*.bin': No such file or directory
-----Running hycube_simulator-----
0it [00:00, ?it/s]
Could you provide more information on how to write the architecture description language? I'm not sure to what extent the ADL can support with no mapping mistakes. Thank a lot.
#define CHAN_SIZE 3
#define row_size 80
#define col_size 80
attribute((noinline)) void scale_fxp(int *input, int *output) {
for (int chan = 0; chan < CHAN_SIZE; chan++)
for (int row = 0; row < row_size; row++)
for (int col = 0; col < col_size; col++) {
#ifdef CGRA_COMPILER
please_map_me();
#endif
output[chan * row_size * col_size + row * col_size + col] =
input[chan * row_size * col_size + row * col_size + col] *
1.0 / 255;
}
}
python -u run_morpher.py cava_cgra/isp.c scale_fxp config/microspeech_hycube_mm_0.yaml
.Runnig the below command fails with module not found
~/morpher$ python -u run_morpher_array_add.py
Traceback (most recent call last):
File "run_morpher_array_add.py", line 10, in
import scripts.bin_to_trace as BT
ModuleNotFoundError: No module named 'scripts.bin_to_trace'
Here's the code:
int a[10], b[10], c[10];
__attribute__((noinline)) void test() {
for (int i = 0; i < 10; i++) {
#ifdef CGRA_COMPILER
please_map_me();
#endif
c[i] = a[i] * b[i];
}
}
int main() { test(); }
Here's my command:
python -u run_morpher.py cava/test_recii.c test config/microspeech_hycube_mm_0.yaml
And Morpher says:
MAP begin...
Initial target II = 4 (ResMin II = 2 , RecMin II = 4, UserGiven II = 0 )
Current target II = 4, Iteration = 0
noConflicts!
Current target II = 4, Iteration = 1
noCongestion!
noConflicts!
Map Success with II = 4!!!
That's weird because there's no dependency between the i-th iteration and (i+1)-th iteration. Could you please explain the reason why RecMin II is 4 here? I really appreciate that. @zhaoying-LI
After installing LLVM and building Morpher, when executing $python -u run_morpher.py morpher_benchmarks/array_add/array_add.c array_add
, there is no resulting pdf generated (as per the presentation). Although .bin file is being generated.
I notice that there are some operators in the DFG including
CMERGE, MOVC, LOADB, STOREB, SELECT
I assume that SELECT is coverted from phi.
But I have troubling understand the other four operators. Could you explain?
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.