Coder Social home page Coder Social logo

morpher's People

Contributors

actions-user avatar dhananjayadmd avatar thilinikb avatar zhaoying-li avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

morpher's Issues

HPCA tutorial does not work

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]

request for more details on ADL

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.

Mapping simple loop to cgra fails.

Here's my code:

#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;
}
}

int main() {
int *acc_input = malloc(sizeof(int) * row_size * col_size * CHAN_SIZE);
int *acc_input_scaled =
malloc(sizeof(int) * row_size * col_size * CHAN_SIZE);
scale_fxp(acc_input, acc_input_scaled);
}

Here's my command: python -u run_morpher.py cava_cgra/isp.c scale_fxp config/microspeech_hycube_mm_0.yaml.
And the error is:

terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_M_construct null not valid
Aborted (core dumped)

microspeech_1 test error

The command: python -u run_morpher.py woset_benchmarks/microspeech_1/microspeech.c microspeech_conv_layer_hycube config/microspeech_hycube_m
m_0.yaml

The result:

image

Weird RecMin II generated by Morpher.

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

run_morpher.py, array_add.c does not generate dfg pdf file

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.

The meaning of several operators in DFG.

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?

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.