Giter Club home page Giter Club logo

dynamatic's People

Contributors

andrea-guerrieri avatar lana555 avatar lucas-rami 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  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  avatar  avatar  avatar

dynamatic's Issues

xxx.dot could not be opened when run Buffers

Hi,
I have a question about Buffers.
When I run the following command by README
bin/buffers buffers -filename=xxx -period=5
but I get a error say the file could not be opened, just like this.


dataflow graph name: /home/actri/dynamatic/elastic-circuits/examples/_build/boolean_graph
milp solver: cbc
delay: 0, period: 5
timeout: 180
set optimization: true
first MG optimization: false


File /home/actri/dynamatic/elastic-circuits/examples/_build/boolean_graph.dot could not be opened.

I tried to change the file path, the file does exist. Can you help me?

Getting `Assertion `entryBB != invalidDataflowID' failed`.

I am using the provided VM and trying to test the following code:

#include <stdlib.h>
#include <cmath>

# define N 4
#define sincos(t, s, c) *s=sin(t); *c=cos(t)

int christoffel(double dst[4][4][4], double const pos[4])
{
  const double spin_ = 0;
  const double a2_=spin_*spin_;
  int a, mu, nu;
  for (a=0; a<4; ++a)
    for(mu=0; mu<4; ++mu)
      for(nu=0; nu<4; ++nu)
	dst[a][mu][nu]=0.;

  double r = pos[1];
  double sth, cth;
  sincos(pos[2], &sth, &cth);
  double
    sth2 = sth*sth, cth2 = cth*cth, sth4=sth2*sth2,
    s2th = 2.*sth*cth, c2th=cth2-sth2,
    s4th = 2.*s2th*c2th,
    s2th2= s2th*s2th, ctgth=cth/sth;
  double r2=r*r, r4=r2*r2, r6=r4*r2;
  double Sigma=r2+a2_*cth2, Sigma2=Sigma*Sigma;
  double Delta=r2-2.*r+a2_;
  double Deltam1=1./Delta,
    Sigmam1=1./Sigma,
    Sigmam2=Sigmam1*Sigmam1,
    Sigmam3=Sigmam2*Sigmam1,
    a2cthsth=a2_*cth*sth,
    rSigmam1=r*Sigmam1,
    Deltam1Sigmam2=Deltam1*Sigmam2,
    r2plusa2 = r2+a2_;
  dst[1][1][1]=(1.-r)*Deltam1+rSigmam1;
  dst[1][2][1]=dst[1][1][2]=-a2cthsth*Sigmam1;
  dst[1][2][2]=-Delta*rSigmam1;
  dst[1][3][3]=-Delta*sth2*(r+(a2_*(-2.*r2+Sigma)*sth2)/Sigma2)/Sigma;
  dst[1][3][0]=dst[1][0][3]=spin_*Delta*(-2*r2+Sigma)*sth2*Sigmam3;
  dst[1][0][0]=-Delta*(-2.*r2+Sigma)*Sigmam3;
  dst[2][1][1]=a2cthsth*Deltam1*Sigmam1;
  dst[2][2][1]=dst[2][1][2]=rSigmam1;
  dst[2][2][2]=-a2cthsth*Sigmam1;
  dst[2][3][3]=
    -sth*cth*Sigmam3 * (Delta*Sigma2 + 2.*r*r2plusa2*r2plusa2);
  dst[2][0][3]=dst[2][3][0]=spin_*r*r2plusa2*s2th*Sigmam3;
  dst[2][0][0]=-2.*a2cthsth*r*Sigmam3;
  dst[3][3][1]=dst[3][1][3]=
    Deltam1*Sigmam2 * (r*Sigma*(Sigma-2.*r) + a2_*(Sigma-2.*r2)*sth2);
  dst[3][3][2]=dst[3][2][3]=
    Sigmam2*ctgth * (-(Sigma+Delta)*a2_*sth2 + r2plusa2*r2plusa2);
  dst[3][0][1]=dst[3][1][0]=spin_*(2.*r2-Sigma)*Deltam1Sigmam2;
  dst[3][0][2]=dst[3][2][0]=-2.*spin_*r*ctgth*Sigmam2;
  dst[0][3][1]=dst[0][1][3]=
    -spin_*sth2*Deltam1Sigmam2 * (2.*r2*r2plusa2 + Sigma*(r2-a2_));
  dst[0][3][2]=dst[0][2][3]=Sigmam2*spin_*a2_*r*sth2*s2th;
  dst[0][0][1]=dst[0][1][0]=(a2_+r2)*(2.*r2-Sigma)*Deltam1Sigmam2;
  dst[0][0][2]=dst[0][2][0]=-a2_*r*s2th*Sigmam2;

  return 0;
} 

int main ( void )
{
 	double pos[N]; // Random position array
        double dst[4][4][4]; // Output array
	for ( int indx = 0; indx < N ; indx ++ )
	{
		pos[indx] = rand() % 100;
	}
	christoffel(dst, pos);
	return 0;
}

using this synthesis script:

set_project .
set_top_file main.cpp
set_period 15.0
analyze
elaborate
synthesize
optimize
write_hdl
exit

I am getting the following error though:

Adding elastic buffers with period=15 and buffer_delay=0

======================
ADDING ELASTIC BUFFERS
======================
Extracting marked graphs
buffers: src/DFnetlsit_BasicBlocks.cpp:269: bool Dataflow::BasicBlockGraph::calculateBackArcs(): Assertion `entryBB != invalidDataflowID' failed.
Aborted (core dumped)

mv: cannot stat './reports/main_elaborated_graph_buf.dot': No such file or directory
Error: dot: can't open ./reports/main_elaborated_optimized.dot
Done 
Write hdl
write_hdl  . ./reports/main_elaborated_optimized

Is there some obvious error on my part, or a way to get more information on what's going on?

Issue when making Buffers and dot2vhdl

I was trying to make the buffer and dot2vhdl, however, I have faced some weird error.

For buffer, I got conflicts between string.h and graphviz/cdt.h

/usr/include/string.h:65:12: error: conflicting declaration of ‘int memcmp(const void*, const void*, size_t)’ with ‘C’ linkage
 extern int memcmp (const void *__s1, const void *__s2, size_t __n)
            ^~~~~~
In file included from /usr/include/graphviz/cgraph.h:17,
                 from src/DFnetlist_read_dot.cpp:4:
/usr/include/graphviz/cdt.h:242:13: note: previous declaration with ‘C++’ linkage
 extern int  memcmp _ARG_((const Void_t*, const Void_t*, size_t));
             ^~~~~~

For now I manually commented out the relevant line in graphviz/cdt.h . Is is ok to do so? After the make, I have a file name "buffers" in the bin folder, is this what I susposed to get?

For dot2vhdl, I got the following erro message

g++ -O3 -g -Wall -static -fpermissive     src/table_printer.o src/dot_parser.o src/vhdl_writer.o src/lsq_generator.o src/checks.o src/eda_if.o src/reports.o src/string_utils.o src/sys_utils.o src/dot2vhdl.o -o bin/dot2vhdl  
/opt/rh/devtoolset-8/root/usr/libexec/gcc/x86_64-redhat-linux/8/ld: cannot find -lm
/opt/rh/devtoolset-8/root/usr/libexec/gcc/x86_64-redhat-linux/8/ld: cannot find -lc
collect2: error: ld returned 1 exit status
make: *** [Makefile:62: bin/dot2vhdl] Error 1

I do not see -lc in the Makefile, and the 2 -lm are both commented out. Do you have any idea why -lm and -lc are needed and how I can get those during the make?

I am now running dynamatic on Centos 7. Latest version of Graphviz available is 2.30.1. The gcc is of version 8.3.1, from using devtoolset-8.

Thank you very much for your help!

Consider changing `.dot` extension to avoid collision with GraphViz.

I'm not sure how much infrastructure is built around using the .dot file extension, but if the answer is "not much", you should consider changing the file extension to avoid collision with GraphViz files. These days GraphViz seems to have migrated to using the .gv extension, but there are plenty of people and projects using the .dot extension.

In fact, when I first saw .DOT in the README.md, my immediate assumption was that it was talking about GraphViz files, and it took me 5-10s more to read the context and figure out, "Oh, no, it's just a bespoke file format".

Again, if there's a lot of effort invested in experiment scripts etc. hardcoded with the .DOT extension, changing it isn't worth it. But if it's just a matter of tweaking a constant string somewhere and updating the documentation, I think it would be ideal to change it to something else.

Fail to generate a .DOT file

Hi!
I was trying to run an example with elastic-circuits, however, I have met an error:

opt -load ../_build/MemElemInfo/libLLVMMemElemInfo.so -load ../_build/ElasticPass/libElasticPass.so -load ../_build/OptimizeBitwidth/libLLVMOptimizeBitWidth.so -load ../_build/MyCFGPass/libMyCFGPass.so -polly-process-unprofitable -mycfgpass _build/2mm/2mm_mem2reg_constprop_simplifycfg_die.ll -S -cfg-outdir=_build/2mm
0Time elapsed: 1e-06s.
couldn't open file _Z10kernel_2mmiiPA1024_iS0_S0_S0_S0__freq.txt
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_M_construct null not valid
#0 0x000055eb87a924d3 llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/llvm-6.0.1.src/lib/Support/Unix/Signals.inc:398:0
#1 0x000055eb87a92566 PrintStackTraceSignalHandler(void*) /home/llvm-6.0.1.src/lib/Support/Unix/Signals.inc:462:0
#2 0x000055eb87a9073b llvm::sys::RunSignalHandlers() /home/llvm-6.0.1.src/lib/Support/Signals.cpp:49:0
#3 0x000055eb87a91d3f SignalHandler(int) /home/llvm-6.0.1.src/lib/Support/Unix/Signals.inc:252:0
#4 0x00007f11ccf17980 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12980)
#5 0x00007f11cbbc8fb7 gsignal /build/glibc-S7xCS9/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
#6 0x00007f11cbbca921 abort /build/glibc-S7xCS9/glibc-2.27/stdlib/abort.c:81:0
#7 0x00007f11cc5bd957 __strtof_l (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x8c957)
#8 0x00007f11cc5c3ae6 (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x92ae6)
#9 0x00007f11cc5c3b21 (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x92b21)
#10 0x00007f11cc5c3d54 (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x92d54)
#11 0x00007f11cc5bf79f __strtof_l (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x8e79f)
#12 0x000055eb87a1fda7 void std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag) /usr/include/c++/7/bits/basic_string.tcc:215:0
#13 0x00007f11cb63db55 read_data_from_csv(int, int, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >) /home/dynamatic/elastic-circuits/ElasticPass/ComponentsTiming.cpp:69:0
#14 0x00007f11cb63e422 get_component_delay(std::__cxx11::basic_string<char, std::char_traits, std::allocator >, int, std::__cxx11::basic_string<char, std::char_traits, std::allocator >) /home/dynamatic/elastic-circuits/ElasticPass/ComponentsTiming.cpp:122:0
#15 0x00007f11cb6784e8 getNodeDotParams(ENode*, std::__cxx11::basic_string<char, std::char_traits, std::allocator >) /home/dynamatic/elastic-circuits/ElasticPass/PrintDot.cpp:1188:0
#16 0x00007f11cb679f48 printDotNodes(std::vector<ENode*, std::allocator<ENode*> >, bool, std::__cxx11::basic_string<char, std::char_traits, std::allocator >) /home/dynamatic/elastic-circuits/ElasticPass/PrintDot.cpp:1327:0
#17 0x00007f11cb67ef88 printDotDFG(std::vector<ENode
, std::allocator<ENode*> >, std::vector<BBNode, std::allocator<BBNode*> >*, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool, std::__cxx11::basic_string<char, std::char_traits, std::allocator >) /home/dynamatic/elastic-circuits/ElasticPass/PrintDot.cpp:1826:0
#18 0x00007f11cb0f6f2c (anonymous namespace)::MyCFGPass::compileAndProduceDOTFile(llvm::Function&) /home/ dynamatic/elastic-circuits/MyCFGPass/MyCFGPass.cpp:165:0
#19 0x00007f11cb0f7253 (anonymous namespace)::MyCFGPass::runOnFunction(llvm::Function&) /home/dynamatic/elastic-circuits/MyCFGPass/MyCFGPass.cpp:173:0
#20 0x000055eb872b1604 llvm::FPPassManager::runOnFunction(llvm::Function&) /home/ dynamatic/elastic-circuits/llvm-6.0.1.src/lib/IR/LegacyPassManager.cpp:1520:0
#21 0x000055eb872b17a9 llvm::FPPassManager::runOnModule(llvm::Module&) /home/ dynamatic/elastic-circuits/llvm-6.0.1.src/lib/IR/LegacyPassManager.cpp:1541:0
#22 0x000055eb872b1b31 (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&) /home/dynamatic/elastic-circuits/llvm-6.0.1.src/lib/IR/LegacyPassManager.cpp:1597:0
#23 0x000055eb872b225b llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/dynamatic/elastic-circuits/llvm-6.0.1.src/lib/IR/LegacyPassManager.cpp:1700:0
#24 0x000055eb872b2453 llvm::legacy::PassManager::run(llvm::Module&) /home/dynamatic/elastic-circuits/llvm-6.0.1.src/lib/IR/LegacyPassManager.cpp:1732:0
#25 0x000055eb8652a799 main /home/dynamatic/elastic-circuits/llvm-6.0.1.src/tools/opt/opt.cpp:765:0
#26 0x00007f11cbbabbf7 __libc_start_main /build/glibc-S7xCS9/glibc-2.27/csu/../csu/libc-start.c:344:0
#27 0x000055eb864fa43a _start (/home/dynamatic/elastic-circuits/llvm-6.0.1/bin/opt+0x101543a)
Stack dump:
0.Program arguments: /home/dynamatic/elastic-circuits/llvm-6.0.1/bin/opt -load ../_build/MemElemInfo/libLLVMMemElemInfo.so -load ../_build/ElasticPass/libElasticPass.so -load ../_build/OptimizeBitwidth/libLLVMOptimizeBitWidth.so -load ../_build/MyCFGPass/libMyCFGPass.so -polly-process-unprofitable -mycfgpass _build/2mm/2mm_mem2reg_constprop_simplifycfg_die.ll -S -cfg-outdir=_build/2mm
1.Running pass 'Function Pass Manager' on module '_build/2mm/2mm_mem2reg_constprop_simplifycfg_die.ll'.
2.Running pass 'Creates new CFG pass' on function '@Z10kernel_2mmiiPA1024_iS0_S0_S0_S0'

I don’t know how to solve this problem.
Thank you very much for your help!

Exception while trying to run the elastic circuits examples

I tried running the examples from elastic-circuits/examples by following the README instructions, but I get an unhandled exception error. You will find the corresponding execution trace below.

Is this a known issue?

$ make name=loop_array graph
mkdir -p _build/loop_array
rm -rf _build/loop_array/*.dot
../../../llvm-6.0/bin/clang  -Xclang -disable-O0-optnone -emit-llvm -S  -c loop_array.cpp -o _build/loop_array/loop_array.ll
../../../llvm-6.0/bin/opt  -mem2reg  _build/loop_array/loop_array.ll -S -o _build/loop_array/loop_array_mem2reg.ll
../../../llvm-6.0/bin/opt  -loop-rotate -constprop  _build/loop_array/loop_array_mem2reg.ll -S -o _build/loop_array/loop_array_mem2reg_constprop.ll
../../../llvm-6.0/bin/opt  -simplifycfg _build/loop_array/loop_array_mem2reg_constprop.ll -S -o _build/loop_array/loop_array_mem2reg_constprop_simplifycfg.ll
../../../llvm-6.0/bin/opt  -die -instcombine -lowerswitch _build/loop_array/loop_array_mem2reg_constprop_simplifycfg.ll -S -o _build/loop_array/loop_array_mem2reg_constprop_simplifycfg_die.ll
../../../llvm-6.0/bin/opt  -load ../_build/MemElemInfo/libLLVMMemElemInfo.so -load ../_build/ElasticPass/libElasticPass.so -load ../_build/OptimizeBitwidth/libLLVMOptimizeBitWidth.so -load ../_build/MyCFGPass/libMyCFGPass.so -polly-process-unprofitable -mycfgpass  _build/loop_array/loop_array_mem2reg_constprop_simplifycfg_die.ll -S -cfg-outdir=_build/loop_array
0Time elapsed: 1e-06s.
couldn't open file _Z5dummyii_freq.txt
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string: construction from null is not valid
llvm-symbolizer: .../dynamatic/etc/llvm/include/llvm/ADT/Optional.h:156: T&& llvm::Optional<T>::getValue() && [with T = const char*]: Assertion `hasVal' failed.
llvm-symbolizer(+0xbd2e3)[0x55e6ea0452e3]
llvm-symbolizer(+0xbd37f)[0x55e6ea04537f]
llvm-symbolizer(+0xbb4f8)[0x55e6ea0434f8]
llvm-symbolizer(+0xbcb3d)[0x55e6ea044b3d]
/usr/lib/libc.so.6(+0x39ab0)[0x7fa4e604fab0]
/usr/lib/libc.so.6(+0x8926c)[0x7fa4e609f26c]
/usr/lib/libc.so.6(gsignal+0x18)[0x7fa4e604fa08]
/usr/lib/libc.so.6(abort+0xd7)[0x7fa4e6038538]
/usr/lib/libc.so.6(+0x2245c)[0x7fa4e603845c]
/usr/lib/libc.so.6(+0x323d6)[0x7fa4e60483d6]
llvm-symbolizer(+0x166b50)[0x55e6ea0eeb50]
llvm-symbolizer(+0x162460)[0x55e6ea0ea460]
llvm-symbolizer(+0x162d2e)[0x55e6ea0ead2e]
llvm-symbolizer(+0x163684)[0x55e6ea0eb684]
llvm-symbolizer(+0x1635d1)[0x55e6ea0eb5d1]
llvm-symbolizer(+0x12297e)[0x55e6ea0aa97e]
llvm-symbolizer(+0x123932)[0x55e6ea0ab932]
llvm-symbolizer(+0x1192ea)[0x55e6ea0a12ea]
llvm-symbolizer(+0x10c48b)[0x55e6ea09448b]
llvm-symbolizer(+0x4ec28)[0x55e6e9fd6c28]
/usr/lib/libc.so.6(+0x23850)[0x7fa4e6039850]
/usr/lib/libc.so.6(__libc_start_main+0x8a)[0x7fa4e603990a]
llvm-symbolizer(+0x4e015)[0x55e6e9fd6015]
Stack dump:
0.	Program arguments: llvm-symbolizer --functions=linkage --inlining --demangle 
../../../llvm-6.0/bin/opt(llvm::sys::PrintStackTrace(llvm::raw_ostream&)+0x39)[0x557bccb91d35]
../../../llvm-6.0/bin/opt(+0x1b9bdd1)[0x557bccb91dd1]
../../../llvm-6.0/bin/opt(llvm::sys::RunSignalHandlers()+0x8a)[0x557bccb8ff4a]
../../../llvm-6.0/bin/opt(+0x1b9b58f)[0x557bccb9158f]
/usr/lib/libc.so.6(+0x39ab0)[0x7f6d83962ab0]
/usr/lib/libc.so.6(+0x8926c)[0x7f6d839b226c]
/usr/lib/libc.so.6(gsignal+0x18)[0x7f6d83962a08]
/usr/lib/libc.so.6(abort+0xd7)[0x7f6d8394b538]
/usr/lib/libstdc++.so.6(+0x9ca6f)[0x7f6d83c9ca6f]
/usr/lib/libstdc++.so.6(+0xb011c)[0x7f6d83cb011c]
/usr/lib/libstdc++.so.6(+0xb0189)[0x7f6d83cb0189]
/usr/lib/libstdc++.so.6(+0xb03ed)[0x7f6d83cb03ed]
/usr/lib/libstdc++.so.6(std::__throw_logic_error(char const*)+0x44)[0x7f6d83ca00b3]
/usr/lib/libstdc++.so.6(+0x15ca48)[0x7f6d83d5ca48]
../_build/ElasticPass/libElasticPass.so(read_data_from_csv(int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int)+0x157)[0x7f6d837deac7]
../_build/ElasticPass/libElasticPass.so(get_component_delay(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int)+0x285)[0x7f6d837df3f5]
../_build/ElasticPass/libElasticPass.so(getNodeDotParams(ENode*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)+0x3ff2)[0x7f6d83821bf1]
../_build/ElasticPass/libElasticPass.so(printDotNodes(std::vector<ENode*, std::allocator<ENode*> >*, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)+0x312)[0x7f6d838263ff]
../_build/ElasticPass/libElasticPass.so(printDotDFG(std::vector<ENode*, std::allocator<ENode*> >*, std::vector<BBNode*, std::allocator<BBNode*> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)+0x19c)[0x7f6d8382b2d8]
../_build/MyCFGPass/libMyCFGPass.so(+0xea6f)[0x7f6d83fffa6f]
../_build/MyCFGPass/libMyCFGPass.so(+0xee33)[0x7f6d83fffe33]
../../../llvm-6.0/bin/opt(llvm::FPPassManager::runOnFunction(llvm::Function&)+0x135)[0x557bcc37cf6d]
../../../llvm-6.0/bin/opt(llvm::FPPassManager::runOnModule(llvm::Module&)+0x70)[0x557bcc37d12a]
../../../llvm-6.0/bin/opt(+0x13874e7)[0x557bcc37d4e7]
../../../llvm-6.0/bin/opt(llvm::legacy::PassManagerImpl::run(llvm::Module&)+0x100)[0x557bcc37dc72]
../../../llvm-6.0/bin/opt(llvm::legacy::PassManager::run(llvm::Module&)+0x27)[0x557bcc37de89]
../../../llvm-6.0/bin/opt(main+0x24f6)[0x557bcb59ac2b]
/usr/lib/libc.so.6(+0x23850)[0x7f6d8394c850]
/usr/lib/libc.so.6(__libc_start_main+0x8a)[0x7f6d8394c90a]
../../../llvm-6.0/bin/opt(_start+0x25)[0x557bcb568365]
Stack dump:
0.	Program arguments: ../../../llvm-6.0/bin/opt -load ../_build/MemElemInfo/libLLVMMemElemInfo.so -load ../_build/ElasticPass/libElasticPass.so -load ../_build/OptimizeBitwidth/libLLVMOptimizeBitWidth.so -load ../_build/MyCFGPass/libMyCFGPass.so -polly-process-unprofitable -mycfgpass _build/loop_array/loop_array_mem2reg_constprop_simplifycfg_die.ll -S -cfg-outdir=_build/loop_array 
1.	Running pass 'Function Pass Manager' on module '_build/loop_array/loop_array_mem2reg_constprop_simplifycfg_die.ll'.
2.	Running pass 'Creates new CFG pass' on function '@dummy(int, int)'
make: [Makefile:65: test] Aborted (core dumped) (ignored)
#mv print.txt _build/loop_array || true
#mv *_graph.dot _build/loop_array
dot -Tpng _build/loop_array/*_graph.dot > _build/loop_array/loop_array_graph.png
dot -Tpng _build/loop_array/*bbgraph.dot > _build/loop_array/loop_array_bbgraph.png
Error: dot: can't open _build/loop_array/*bbgraph.dot: No such file or directory
make: *** [Makefile:79: graph] Error 2

Failed to build and install LLVM

Hi!

I think Build and install LLVM does not work in my local environment.

When I tried to clone the LLVM repository, it failed with the following error message.

➜  ~ git clone http://llvm.org/git/llvm.git --branch release_60 --depth 1
Cloning into 'llvm'...
fatal: unable to access 'http://llvm.org/git/llvm.git/': Maximum (20) redirects followed

Also, Auto-Installer Package in the dynamatic homepage does not work with the same problem.

+) My workaround was installing LLVM release 6.0 manually from this link

Hi. I may have a possible solution for your problem.

Hi. I may have a possible solution for your problem.

Try to initialize your execution environment with the following commands (replacing your installation path) before running dynamatic.

export PATH=$PATH:/home/dynamatic/Dynamatic/bin/
export CLANG_DIR=/home/dynamatic/Dynamatic/etc/llvm-6.0/bin
export DHLS_INSTALL_DIR=/home/dynamatic/Dynamatic
export OPT_DIR=$CLANG_DIR
export ELASTIC_DIR=/home/dynamatic/Dynamatic/etc/dynamatic/elastic-circuits

Also, please move or create a symbolic link to the dynamatic repository into $DHLS_INSTALL_DIR/etc. A possible command could be (adapted with your installation path)

ln -s your_repository_path $DHLS_INSTALL_DIR/etc/dynamatic

Please tell me if this solve or not the problem. Thanks

Originally posted by @Andrea-Guerrieri in #7 (comment)

Questions about pragmas.

Hi! I would like to inquire about how to use pragmas. I have seen that pragmas can be processed in elastic pass. How can I add pragmas into cpp files and what format should I follow?

Unable to run elastic pass

Hi all,

I encountered an error when trying to run elastic pass. When I run "make name=loop_array graph" I have this,

Screenshot from 2020-09-03 11-07-37

The error seems to be "Error: dot: can't open _build/loop_array/*_graph.dot"?

I wonder has anyone encountered something similar before?

Thanks in advance.

issues

I was trying to run the elastic-circuits, however, I have faced some error:

opt: /home/vtt/llvm-6.0/include/polly/ScopInfo.h:983: polly::MemoryKind polly::MemoryAccess::getOriginalKind() const: Assertion `!getOriginalScopArrayInfo() || getOriginalScopArrayInfo()->getKind() == Kind' failed.
#0 0x000055e0283fcfca llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/vtt/Dynamic/Dynamatic/etc/llvm/lib/Support/Unix/Signals.inc:402:0
#1 0x000055e0283fb246 llvm::sys::RunSignalHandlers() /home/vtt/Dynamic/Dynamatic/etc/llvm/lib/Support/Signals.cpp:50:0
#2 0x000055e0283fb37b SignalHandler(int) /home/vtt/Dynamic/Dynamatic/etc/llvm/lib/Support/Unix/Signals.inc:242:0
#3 0x00007fd80aea3980 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12980)
#4 0x00007fd809f9bfb7 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x3efb7)
#5 0x00007fd809f9d921 abort (/lib/x86_64-linux-gnu/libc.so.6+0x40921)
#6 0x00007fd809f8d48a (/lib/x86_64-linux-gnu/libc.so.6+0x3048a)
#7 0x00007fd809f8d502 (/lib/x86_64-linux-gnu/libc.so.6+0x30502)
#8 0x00007fd809d0c3f5 polly::MemoryAccess::getOriginalKind() const /home/vtt/llvm-6.0/include/polly/ScopInfo.h:984:0
#9 0x00007fd809d0c416 polly::MemoryAccess::isOriginalArrayKind() const /home/vtt/llvm-6.0/include/polly/ScopInfo.h:994:0
#10 0x00007fd809d0c436 polly::MemoryAccess::isArrayKind() const /home/vtt/llvm-6.0/include/polly/ScopInfo.h:1004:0
#11 0x00007fd809d0c53b polly::ScopStmt::getArrayAccessOrNULLFor(llvm::Instruction const*) const /home/vtt/llvm-6.0/include/polly/ScopInfo.h:1473:0
#12 0x00007fd809d0c5bf polly::ScopStmt::getArrayAccessFor(llvm::Instruction const*) const /home/vtt/llvm-6.0/include/polly/ScopInfo.h:1489:0
#13 0x00007fd809d09f14 ScopMeta::addScopStmt(polly::ScopStmt&) /home/vtt/Dynamic/Dynamatic/etc/dynamatic/elastic-circuits/MemElemInfo/IndexAnalysis.cpp:255:0
#14 0x00007fd809d08ac0 IndexAnalysisPass::processScop(polly::Scop&) /home/vtt/Dynamic/Dynamatic/etc/dynamatic/elastic-circuits/MemElemInfo/IndexAnalysis.cpp:92:0
#15 0x00007fd809d0822e IndexAnalysisPass::runOnFunction(llvm::Function&) /home/vtt/Dynamic/Dynamatic/etc/dynamatic/elastic-circuits/MemElemInfo/IndexAnalysis.cpp:21:0
#16 0x000055e027ea6208 llvm::FPPassManager::runOnFunction(llvm::Function&) /home/vtt/Dynamic/Dynamatic/etc/llvm/lib/IR/LegacyPassManager.cpp:1520:0
#17 0x000055e027ea6253 llvm::ilist_node_impl<llvm::ilist_detail::node_options<llvm::Function, false, false, void> >::getNext() /home/vtt/Dynamic/Dynamatic/etc/llvm/include/llvm/ADT/ilist_node.h:67:0
#18 0x000055e027ea6253 llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Function, false, false, void>, false, false>::operator++() /home/vtt/Dynamic/Dynamatic/etc/llvm/include/llvm/ADT/ilist_iterator.h:159:0
#19 0x000055e027ea6253 llvm::FPPassManager::runOnModule(llvm::Module&) /home/vtt/Dynamic/Dynamatic/etc/llvm/lib/IR/LegacyPassManager.cpp:1540:0
#20 0x000055e027ea5a9f llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/vtt/Dynamic/Dynamatic/etc/llvm/lib/IR/LegacyPassManager.cpp:1597:0
#21 0x000055e027685968 main /home/vtt/Dynamic/Dynamatic/etc/llvm/tools/opt/opt.cpp:765:0
#22 0x00007fd809f7ebf7 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21bf7)
#23 0x000055e0276df91a _start (../../../llvm-6.0/bin/opt+0x3ac91a)
Stack dump:
0.	Program arguments: ../../../llvm-6.0/bin/opt -load ../_build/MemElemInfo/libLLVMMemElemInfo.so -load ../_build/ElasticPass/libElasticPass.so -load ../_build/OptimizeBitwidth/libLLVMOptimizeBitWidth.so -load ../_build/MyCFGPass/libMyCFGPass.so -polly-process-unprofitable -mycfgpass _build/loop_array/loop_array_mem2reg_constprop_simplifycfg_die.ll -S -use-lsq=false 
1.	Running pass 'Function Pass Manager' on module '_build/loop_array/loop_array_mem2reg_constprop_simplifycfg_die.ll'.
2.	Running pass 'Analyze array indices for intersecting sets' on function '@_Z5dummyii'
Makefile:14: recipe for target 'test_f' failed
make: [test_f] Aborted (core dumped) (ignored)
#-../../../llvm-6.0/bin/opt  -load ../_build/MemElemInfo/libLLVMMemElemInfo.so -load ../_build/ElasticPass/libElasticPass.so -load ../_build/OptimizeBitwidth/libLLVMOptimizeBitWidth.so -load ../_build/MyCFGPass/libMyCFGPass.so -polly-process-unprofitable -mycfgpass  _build/loop_array/loop_array_mem2reg_constprop_simplifycfg_die.ll -S
rm *_freq.txt mapping.txt
mv print.txt _build/loop_array || true
mv: cannot stat 'print.txt': No such file or directory
#mv *_graph.dot _build/loop_array
mv *_graph.dot  _build/loop_array
mv: cannot stat '*_graph.dot': No such file or directory
Makefile:45: recipe for target 'graph_f' failed
make: *** [graph_f] Error 1

opt: /home/vtt/llvm-6.0/include/polly/ScopInfo.h:983: polly::MemoryKind polly::MemoryAccess::getOriginalKind() const: Assertion `!getOriginalScopArrayInfo() || getOriginalScopArrayInfo()->getKind() == Kind' failed.
Makefile:14: recipe for target 'test_f' failed
make: [test_f] Aborted (core dumped) (ignored)
I don’t know how to solve these problem.
Thank you very much for your help!

Roadmap of Dynamatic

Hi there, I'd like to know is there any roadmap for this project? quite interesting to engage in and make some contribution!

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.