Code Monkey home page Code Monkey logo

dsa-framework's People

Contributors

dkupsh avatar sihaoliu avatar tony-nowatzki avatar were 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dsa-framework's Issues

Simple architecture and workload fails

I am trying to use the micro_demo.scala CGRA (from dsa-cgra-gen) to run the workload compile/01_vector_add (from dsa-examples). I haven't modified any files, and I am on the latest version of dsa-examples, dsa-framework, and all submodules of dsa-framework.

The micro_demo architecture has 2 input ports, 1 output port, and a PE that supports addition and multiplication. The vector_add workload does a single addition per iteration and is not unrolled, so my understanding is that the micro_demo architecture should be able to execute the workload.

Here are the steps to repro:

  1. Run sbt from dsa-framework/dsa-cgra-gen
  2. Run runMain real.micro_demo
  3. Modify dsa-examples/common/Makefile to support different CGRAs, like so
diff --git a/common/Makefile.compile b/common/Makefile.compile
index c35cda3..8827199 100644
--- a/common/Makefile.compile
+++ b/common/Makefile.compile
@@ -15,13 +15,17 @@ OPT   = opt
 LLC   = llc
 GCC   = riscv64-unknown-elf-g++

+ifndef SBCONFIG
+SBCONFIG = $(SS)/spatial.json
+endif
+
 # Compile pragma hinted high-level language to encoded metadata.
 %.bc: %.cc
        $(CLANG) $< -o $@ $(CLANG_FLAGS) $(IFLAGS) --sysroot=$(RV_ROOT)

 # Transform code regions to be accelerated to decoupled spatial IR.
 dsa-%.bc: %.bc
-       SBCONFIG=$(SS)/spatial.json                                \
+       SBCONFIG=$(SBCONFIG)                                       \
        $(OPT) -load $(SS)/dsa-llvm-project/build/lib/DSAPass.so   \
                   -stream-specialize $< -o $@
  1. Run SBCONFIG=$SS/dsa-cgra-gen/my_cgra_div.json ./run.sh O3-dsa-answer.out from dsa-examples/compile/01_vector_add

I get the following assertion
dsa-framework/dsa-llvm-project/llvm/lib/Transforms/DSAPass/Transformation.cpp:1254: void DfgFile::EmitAndScheduleDfg(): Assertion Query->MF.EXTRACT failed.

(Edited for formatting)

Extracting the DFGs for a recurrence stream has unexpected results

For mm.cc, I did make with EXTRACT=1 (using python dfgs.py), and the resultant dfg file has results in a performance of 0 (with an unroll of 4) using ss_sched. Digging in deeper, I see this is because of the conc pragma not being set in the DFG file. Any suggestions on how can I debug this further?

The resultant dfg file for mm.cc with unroll of 4 is : kernel_dfg.txt

build error in given riscv-gnu-toolchain

info:


libtool: link: gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144 -g -O2 -static-libstdc++ -static-libgcc -o gprof basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o aarch64.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o ../bfd/.libs/libbfd.a -L/home/wky/work/stream-datapath/stream-specialization-stack/riscv-gnu-toolchain/build/build-binutils-newlib/zlib -lz ../libiberty/libiberty.a -lm -ldl
make[6]: Leaving directory '/home/wky/work/stream-datapath/stream-specialization-stack/riscv-gnu-toolchain/build/build-binutils-newlib/gprof'
make[5]: Leaving directory '/home/wky/work/stream-datapath/stream-specialization-stack/riscv-gnu-toolchain/build/build-binutils-newlib/gprof'
make[4]: Leaving directory '/home/wky/work/stream-datapath/stream-specialization-stack/riscv-gnu-toolchain/build/build-binutils-newlib/gprof'
make[3]: Leaving directory '/home/wky/work/stream-datapath/stream-specialization-stack/riscv-gnu-toolchain/build/build-binutils-newlib'
Makefile:848: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/wky/work/stream-datapath/stream-specialization-stack/riscv-gnu-toolchain/build/build-binutils-newlib'
Makefile:375: recipe for target 'stamps/build-binutils-newlib' failed
make[1]: *** [stamps/build-binutils-newlib] Error 2
make[1]: Leaving directory '/home/wky/work/stream-datapath/stream-specialization-stack/riscv-gnu-toolchain/build'
Makefile:39: recipe for target 'riscv-gnu-toolchain' failed
make: *** [riscv-gnu-toolchain] Error 2


any solutions? or can I use my own riscv toolchain?

gem5.opt: command not found

Hi

I followed the steps the to build dsa-framework on docker. The build was successful. But, I am getting following error on Ubuntu 20.04.

(ss-stack) ➜ demo git:(bd6777e) ./run.sh ss-vecadd.out
make: *** No rule to make target 'ss-vecadd.out'. Stop.
./run.sh: line 30: gem5.opt: command not found

Could you please advise how to fix this issue? I also don't see gem5.opt in gem5 build directory. I wonder if it's being compiled at all.

Thanks

make: *** No rule to make target 'ss-vecadd.out'. Stop.

I use dockerfile in fccm2023 branch. build the image myself.
make -j16 to build.
It takes me 19 hours.

./run.sh ss-vecadd.out
make: *** No rule to make target 'ss-vecadd.out'.  Stop.
warn: CheckedInt already exists in allParams. This may be caused by the Python 2.7 compatibility layer.
warn: Enum already exists in allParams. This may be caused by the Python 2.7 compatibility layer.
warn: ScopedEnum already exists in allParams. This may be caused by the Python 2.7 compatibility layer.
gem5 Simulator System.  http://gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 version 20.0.0.2
gem5 compiled Jan 31 2024 06:48:56
gem5 started Jan 31 2024 07:02:17
gem5 executing on mcnode31, pid 1607367
command line: gem5.opt /root/dsa-framework/dsa-gem5/configs/example/se.py --cpu-type=MinorCPU --l1d_size=32kB --l1d_assoc=8 --l1i_size=16kB --caches --l2_size=512kB --l2cache --num-cpus=1 --cpu-clock=1GHz --sys-clock=1GHz --mem-type=DDR4_2400_16x4 --cmd=./ss-vecadd.out --options=

Global frequency set at 1000000000000 ticks per second
warn: No dot file generated. Please install pydot to generate the dot file and pdf.
warn: DRAM device capacity (32768 Mbytes) does not match the address range assigned (512 Mbytes)
panic: panic condition fd < 0 occurred: Failed to open file ./ss-vecadd.out.
Memory Usage: 1026220 KBytes
Program aborted at tick 0
--- BEGIN LIBC BACKTRACE ---
gem5.opt[0x1060115]
gem5.opt[0x106e5c9]
/usr/lib64/libpthread.so.0(+0x12c20)[0x7f3e806c7c20]
/usr/lib64/libc.so.6(gsignal+0x10f)[0x7f3e7f4cb37f]
/usr/lib64/libc.so.6(abort+0x127)[0x7f3e7f4b5db5]
gem5.opt[0xd7e0ff]
gem5.opt[0xec7ae7]
gem5.opt[0xec819d]
gem5.opt[0x109eb80]
gem5.opt[0x159168e]
gem5.opt[0xdd9cab]
/root/anaconda3/envs/ss-stack/lib/libpython3.8.so.1.0(PyCFunction_Call+0x63)[0x7f3e80a053d3]
/root/anaconda3/envs/ss-stack/lib/libpython3.8.so.1.0(_PyObject_MakeTpCall+0x1f4)[0x7f3e809f6864]
/root/anaconda3/envs/ss-stack/lib/libpython3.8.so.1.0(+0x130148)[0x7f3e80a05148]
/root/anaconda3/envs/ss-stack/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x4bb5)[0x7f3e809f3305]
/root/anaconda3/envs/ss-stack/lib/libpython3.8.so.1.0(+0x12fe74)[0x7f3e80a04e74]
/root/anaconda3/envs/ss-stack/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x4bb5)[0x7f3e809f3305]
/root/anaconda3/envs/ss-stack/lib/libpython3.8.so.1.0(+0x12fe74)[0x7f3e80a04e74]
/root/anaconda3/envs/ss-stack/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x4bb5)[0x7f3e809f3305]
/root/anaconda3/envs/ss-stack/lib/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0x2e2)[0x7f3e809ed932]
/root/anaconda3/envs/ss-stack/lib/libpython3.8.so.1.0(_PyFunction_Vectorcall+0x19d)[0x7f3e809fbfed]
/root/anaconda3/envs/ss-stack/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x3b2)[0x7f3e809eeb02]
/root/anaconda3/envs/ss-stack/lib/libpython3.8.so.1.0(_PyFunction_Vectorcall+0x103)[0x7f3e809fbf53]
/root/anaconda3/envs/ss-stack/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x6ae)[0x7f3e809eedfe]
/root/anaconda3/envs/ss-stack/lib/libpython3.8.so.1.0(+0x12fe74)[0x7f3e80a04e74]
/root/anaconda3/envs/ss-stack/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x4bb5)[0x7f3e809f3305]
/root/anaconda3/envs/ss-stack/lib/libpython3.8.so.1.0(+0x12fe74)[0x7f3e80a04e74]
/root/anaconda3/envs/ss-stack/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x4bb5)[0x7f3e809f3305]
/root/anaconda3/envs/ss-stack/lib/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0x2e2)[0x7f3e809ed932]
/root/anaconda3/envs/ss-stack/lib/libpython3.8.so.1.0(_PyFunction_Vectorcall+0x19d)[0x7f3e809fbfed]
/root/anaconda3/envs/ss-stack/lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x4bb5)[0x7f3e809f3305]
/root/anaconda3/envs/ss-stack/lib/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0x2e2)[0x7f3e809ed932]
--- END LIBC BACKTRACE ---
./run.sh: line 36: 1607367 Aborted                 (core dumped) FU_FIFO_LEN=15 ${GEM5} $SS/dsa-gem5/configs/example/se.py --cpu-type=MinorCPU --l1d_size=$L1DSIZE --l1d_assoc=$L1DASOC --l1i_size=$L1ISIZE --caches --l2_size=$L2SIZE --l2cache --num-cpus=1 --cpu-clock=1GHz --sys-clock=1GHz --mem-type="DDR4_2400_16x4" --cmd=./$1 --options=${OPTIONS}

failed to compile gem5 and install scons.

I followed the tutorial to use Docker Build image and compile it. I thought I succeeded, but I didn't run through the demo. Originally, I didn't even install scons and didn't compile Gem5

Error when setup with docker

I tried to set up asa-framework using docker.
I follow the instructions in https://dsa-framework.readthedocs.io/en/latest/Basics/Setup.html
I DO SKIP the "./scripts/init-submodules.sh" command.
But I met Errors on command "make all -j"
Here is the error log!
Could you help me fix it?
Thank you!

gmake[6]: Leaving directory '/root/dsa-framework/chipyard/toolchains/riscv-tools/riscv-gnu-toolchain/build/build-binutils-newlib/bfd'
gmake[5]: *** [Makefile:1641: all-recursive] Error 1
gmake[5]: Leaving directory '/root/dsa-framework/chipyard/toolchains/riscv-tools/riscv-gnu-toolchain/build/build-binutils-newlib/bfd'
mv -f .deps/elflink.Tpo .deps/elflink.Plo
gmake[4]: *** [Makefile:1167: all] Error 2
/bin/sh ./libtool --tag=CC --mode=link gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144 -I/root/dsa-framework/chipyard/toolchains/riscv-tools/riscv-gnu-toolchain/build/../riscv-gdb/bfd/../zlib -g -O2 -rpath /root/dsa-framework/chipyard/riscv-tools-install/x86_64-pc-linux-gnu/riscv64-unknown-elf/lib -release cat libtool-soversion -o libbfd.la archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coff-bfd.lo compress.lo corefile.lo elf-properties.lo format.lo hash.lo init.lo libbfd.lo linker.lo merge.lo opncls.lo reloc.lo section.lo simple.lo stab-syms.lo stabs.lo syms.lo targets.lo binary.lo ihex.lo srec.lo tekhex.lo verilog.lo cat ofiles -ldl -L./../zlib -lz -ldl
gmake[4]: Leaving directory '/root/dsa-framework/chipyard/toolchains/riscv-tools/riscv-gnu-toolchain/build/build-binutils-newlib/bfd'
gmake[3]: *** [Makefile:2690: all-bfd] Error 2
gmake[3]: Leaving directory '/root/dsa-framework/chipyard/toolchains/riscv-tools/riscv-gnu-toolchain/build/build-binutils-newlib'
gmake[2]: *** [Makefile:849: all] Error 2
gmake[2]: Leaving directory '/root/dsa-framework/chipyard/toolchains/riscv-tools/riscv-gnu-toolchain/build/build-binutils-newlib'
gmake[1]: *** [Makefile:391: stamps/build-binutils-newlib] Error 2
gmake[1]: *** Waiting for unfinished jobs....
libtool: link: ar rc .libs/libbfd.a archive.o archures.o bfd.o bfdio.o bfdwin.o cache.o coff-bfd.o compress.o corefile.o elf-properties.o format.o hash.o init.o libbfd.o linker.o merge.o opncls.o reloc.o section.o simple.o stab-syms.o stabs.o syms.o targets.o binary.o ihex.o srec.o tekhex.o verilog.o elf64-riscv.o elf64.o elfxx-riscv.o elf32.o elf.o elflink.o elf-attrs.o elf-strtab.o elf-eh-frame.o dwarf1.o dwarf2.o elf32-riscv.o elf64-gen.o elf32-gen.o plugin.o cpu-riscv.o cpu-plugin.o archive64.o
libtool: link: ranlib .libs/libbfd.a
libtool: link: ( cd ".libs" && rm -f "libbfd.la" && ln -s "../libbfd.la" "libbfd.la" )
libtooldir=/bin/sh ./libtool --config | /bin/sed -n -e 's/^objdir=//p'; \

Cannot generate verilog code

After I generated the json description file, it reported an error when using it to generate the verilog code. This json file is the softbrain framework given in the project, I don't know why. I would be very grateful if you can give an answer
屏幕截图 2021-11-11 233357

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.