Граф коммитов

131 Коммитов

Автор SHA1 Сообщение Дата
Luis Vega 83d2418a58 [VTA][Config] hotfix denano10 (#3918) 2019-09-09 10:31:31 -07:00
Hua Jiang 50c4546f59 [VTA] Support TLPP in function simulator. (#3555)
* [VTA] Support TLPP in function simulator.
Issue:
currently vta function simulator just doing serialized instruction
execution, the dependency logic of runtime ISA which use for task
level pipe line parallelism can not get verified by function simulator.

Solution:
make the simulator driver to be multiple thread and support TLPP.

Benefit:
TLPP support VTA function simulator would make VTA logic testing/debug
/change more easy.

replace boost lockfree queue

add configure control for simulator tlpp enable or disable.

change code tyle into google style.

Wrap queue read/write and sync logic to make function call more simple.

Add some comments.

Remove MT logic, change into Single thread mode.

address review comments.

code style change to match google code style and add comments.

add cmake macro to enable/disable simulator tlpp logic.

submodule update.

correct file name mentioned in comments.

* remove USE_VTA_FSIM_TLPP.
2019-09-06 17:03:51 -07:00
Thierry Moreau 23c22812b8 [VTA][TOPI] Conv2d transpose (deconvolution) operator support (#3777)
* initial conv2d_transpose

* correct select operator

* cleanup

* fix

* fix correcness check

* conv2d transpose declaration fix

* autotvm conv2d_transpose tuning script

* ir pass fix

* fix tuning script

* deriving params from env, adding bias

* removing bias comp from deconvolution

* lint

* fix

* lint

* lint

* turning off cpu

* lint, ops

* lint

* import fix

* removing hard coded values

* lint
2019-09-05 11:29:42 -07:00
Thierry Moreau 028f47ce65 [VTA][Relay] Extending Vision model coverage compilation for VTA (#3740)
* adding support for graphpack over multiply op

* increasing resnet model coverage

* fix indentation

* lint

* moving recursion limit fix into graphpack pass

* moving recursionlimit to relay init

* pooling on NCHWnc format

* adding more models

* deploy_resnet_on_vta.py

* trailing line

* generalizing to vision models

* merge conflicts

* fix, apply quantization to VTA only

* improving comments

* trimming models that have runtime issues for the moment

* lint

* lint

* lint
2019-09-05 11:17:09 -07:00
Liangfu Chen 734df8d59b [VTA] de10-nano driver (#3394)
* rework;

* `de10-nano` -> `de10nano`;

* fix compilation error;

* bug fix;

* Update install.md

* Update install.md

* Update install.md

* update with current runtime;

* add debug messages;

* bug fix in cma kernel module;
2019-09-05 09:52:10 -07:00
Luis Vega f07fe80aaf [VTA][Chisel] add ISA BitPat generation (#3891) 2019-09-04 10:36:21 -07:00
Luis Vega 5fe61fd1b4 [VTA][Chisel] add scalafmt and format existing scala codebase (#3880)
* [VTA][Chisel] add scalafmt and format existing scala codebase

* change column width to 100

* add scalafmt conf file as a valid file type

* add asf header to scalafmt conf file and rerun formatter
2019-09-03 22:19:01 -07:00
Liangfu Chen f4a28c4bc5 [VTA] Fix TSIM compile error in Linux (add missing -fPIC flag) (#3876)
* [VTA] Fix TSIM compile error in Linux (add missing -fPIC flag);

* [VTA] Fix TSIM compile error in Linux (add missing -fPIC flag);

* fix indentation problem;
2019-09-03 09:31:31 -07:00
Luis Vega 4434a89c17 [VTA][Chisel] rename USE_TSIM macro with USE_VTA64 and cleanup runtime (#3872) 2019-09-02 11:08:53 -07:00
Luis Vega 9d880bd3d1 [VTA][TSIM] add virtual memory support to tsim example (#3868)
* [VTA][TSIM] add virtual memory support to tsim example

* fix identation

* remove USE_TSIM macro and use 32-bit addr instead
2019-08-31 17:49:17 -07:00
Hua Jiang 187600daef [VTA] Fix RewriteForceSerial Function logic issue. (#3854)
Issue:
RewriteForceSerial is a debug function to force instructions
to be serialize instead of parrallel running, by doing so we
can isolate some parallel problem or do performance compare
between parallel and serialize. But this function have some
problem, once get enabled by set debug flag, vta would stuck
when running on pynq board.

Analysis:
once enable RewriteForceSerial, the dependency logic is different
with default one, but we still use same logic to generate FINISH
and other logic, this would cause dead lock.

Solution:
give a different dependency settings when enable RewriteForceSerial.
2019-08-29 10:48:42 -07:00
Liangfu Chen 347e3d9d35 [VTA] Parameterization and bug fix in TensorLoad module (#3841) 2019-08-26 23:13:18 -07:00
Liangfu Chen 92b6ca7127 [VTA][TSIM] Introduce Virtual Memory for TSIM Driver (#3686)
* initial virtual memory;

* initial integration;

* include the header file in cmake;

* implement allocation with virtual to logical address mapping;

* virtual memory for tsim_driver;

* implement the missing memory release function;

* readability improvement;

* readability improvement;

* address review comments;

* improved robustness in virtual memory allocation;

* remove VTA_TSIM_USE_VIRTUAL_MEMORY macro and use virtual memory for tsim by default;

* link tvm against vta library;

* merge with master

* build virtual memory system without linking tvm against vta;

* minor change;

* reuse VTA_PAGE_BYTES;

* using DRAM class from sim_driver as VirtualMemoryManager;

* satisfy linter;

* add comments in code;

* undo changes to Makefile

* undo changes to Makefile

* retrigger ci;

* retrigger ci;

* directly call into VirtualMemoryManager::Global()
2019-08-26 09:36:23 -07:00
Liangfu Chen 80fc943f09 [VTA][TSIM] parallel TSIM hardware compilation with macOS and debug support (#3797)
* [VTA][TSIM] parallel hardware compilation with macOS and debug support

* simplify
2019-08-18 16:19:22 -07:00
Luis Vega aee16d8715 [VTA][Chisel] scale dram base address in hardware instead of runtime (#3772)
* [VTA][Chisel] scale dram base address in hardware instead of runtime

* remove trailing spaces
2019-08-14 10:42:59 -07:00
Thierry Moreau d0c406e6ef fix dense tuning (#3768) 2019-08-14 00:17:19 -07:00
Benjamin Tu 4c01e8ee71 syntax fix (#3765) 2019-08-13 16:03:13 -07:00
Luis Vega e9782030db [VTA][Chisel] run all unittests by default (#3766)
* [VTA][Chisel] run all unittests by default

* better naming

* add generated unittest folder to clean rule
2019-08-13 16:02:48 -07:00
Thierry Moreau e518fe1ce2 [VTA][TSIM][Build] Towards TSIM CI testing (#3704)
* building TSIM specific library along with fast simulator to quickly switch between dlls

* cmake controlled TSIM libraries

* always build tsim driver in either simulation modes

* build DLLs based on CMAKE flags

* updating the jenkinsfile

* small restructuring

* reducing the cmake flags

* update instructions

* reverting to 3 flags

* update Jenkinsfile

* adding new line

* enabling TSIM unit and integration tests

* fix description

* temporarily disabling task_python_vta tests in CPU Build stage

* move CPU tests in unit test stage

* stage  reorg

* better make

* disabling TSIM tests for now

* reverting some restructuring

* fix
2019-08-13 14:01:46 -07:00
Benjamin Tu 5f9c5e4302 [VTA] [Chisel] Improved Data Gen, Added ALU Test (#3743)
* added alutest

* fix indent

* name change for cycle

* improved data gen and infra

* added alutest

* fix indent

* name change for cycle

* improved data gen and infra

* fix space

* fix indent

* fixes

* aluRef

* fix randomarary

* add

* Revert "add"

This reverts commit 87077daebbe055dee11f80e37da3a6291138e0f0.

* Revert "fix randomarary"

This reverts commit df386c1e660eb6ebcff1a1f905610573676f1589.

* Revert "aluRef"

This reverts commit 8665f0d4a7b12b796b2cb1ca6bf9cfe5613ee389.

* should fix dlmc-core
2019-08-13 09:58:32 -07:00
Benjamin Tu d76612d81b [VTA] [Chisel] Bug fix for VME Shell (#3737)
* fix

* fixes
2019-08-08 13:53:27 -07:00
Thierry Moreau 6026e04cb8 [VTA][Dockerfile] Chisel dependencies for TSIM CI (#3721) 2019-08-07 08:53:41 -07:00
Liangfu Chen 8d5de5ed6b safe to remove thread related headers? (#3713) 2019-08-06 13:58:38 -07:00
Benjamin Tu 05c528c145 [VTA] [Chisel] Added Chisel Module Unit Test Infrastructure (#3698)
* added wholething

* changed build and makefile
2019-08-02 23:04:38 -07:00
Liangfu Chen 83591aa5a1 [VTA] VTA Compilation Script for Intel FPGA (#3494)
* initial compilation script for chisel-vta;

* replace tabs with spaces;

* compile script for de10-nano;

* remove generated verilog source code;

* remove `altsource_probe`, `debounce`, `edge_detect` ip;

* replace quartus project files with a single tcl script;

* Update install.md

* improved makefile-based compilation script;

* complete makefile-based compilation of chisel-vta for de10-nano;

* install quartus;

* conversion to .rbf file;

* document chisel-vta compilation process for de10-nano;

* rename generated bitstream file;

* download and extract custom ip for de10-nano;

* minor change

* minor change

* fix indentation;

* bug fix;

* improved robustness in makefile;

* clean up;

* add `.sdc .ipx .qsys` allowance in jenkins;

* add ASF header;

* add ASF header;

* remove IntelShell.scala, update vta_hw.tcl, clean up Makefile & soc_system.qsys;

* add ASF header;

* keep sources compact;

* keep sources compact;

* it's not necessary now

* AXI4LiteClient -> AXI3Client for IntelShell

* remove connection to fpga_only_master;

* a few important bug fix: wire reset pin, and set host_r_last to high

* remove intel specific interface definition;

* add NO_DSP option in Makefile;

* AXI4Lite is not used in IntelShell;

* minor fix: disable dsp and use logic instead;

* quartus version change: 18.0 -> 18.1

* remove altera related statement;

* compose compile_design.tcl

* initial tcl script for soc_system generation;

* remove .qsys file;

* remove unused;

* .qsys can be generated by tcl script;

* remove hps_io and shrink size of soc_system;

* integrate into makefile;

* version change: 18.0 -> 18.1

* add sample config file for de10-nano;

* parameterize DEVICE and PROJECT_NAME

* remove extra lines;

* brief description on flashing sd card image for de10-nano

* docs on building additional components

* parameterize DEVICE and DEVICE_FAMILY

* parameterize DEVICE and DEVICE_FAMILY

* parameterize DEVICE and DEVICE_FAMILY

* de10-nano -> de10nano

* minor change

* add comment in code and document in order to address review comments;
2019-07-31 00:19:54 -07:00
Thierry Moreau 6c7f0c4d08 [VTA] Support for batched inference (#3661)
* fix in IR pass to support padding on 6-d tensors

* support for both N>1 and N==1 for padding

* batch size > 1 tuning and base config

* output formatting

* batch conv2d

* print all category results

* revert to single-batch config

* pick record best

* fix conv test

* improving reporting

* address batching bug in fast simulator

* fix
2019-07-30 14:01:31 -07:00
Thierry Moreau 9b355fc355 removing deprecated script (#3667) 2019-07-30 14:00:38 -07:00
Luis Vega a88b284247 [VTA] [Chisel] make dram offset configurable for uops different than 4-bytes (#3654) 2019-07-29 11:11:53 -07:00
Thierry Moreau f55609b4a1 [VTA] Refactor to increase platform coverage (Ultra96 etc.) (#3496)
* hardware refactor for increased FPGA coverage, small optimizations

* fix header

* cleaning up parameters that won't be needed for now

* streamlining makefile, and simplifying tcl scripts

* moving parameter derivation into pkg_config.py, keeping tcl scripts lightweight

* refactoring tcl script to avoid global variables

* deriving AXI signals in pkg_config.py

* unifying address map definition for hardware and software drivers

* single channel design for ultra96 to simplify build

* enable alu by default, no mul opcode for now

* hardware fix

* new bitstream; vta version

* avoid error when env variable is not set

* ultra96 cleanup

* further cleaning up tcl script for bitstream generation

* preliminary rpc server support on ultra96

* rpc server tracker scripts

* ultra96 ldflag

* ultra96 support

* ultra96 support

* cleanup line

* cmake support for ultra96

* simplify memory instantiation

* cleaning up IP parameter initialization

* fix queue instantiation

* 2019.1 transition

* fix macro def

* removing bus width from config

* cleanup

* fix

* turning off testing for now

* cleanup ultra96 ps insantiation

* minor refactor

* adding comments

* upgrading to tophub v0.6

* model used in TVM target now refers to a specific version of VTA for better autoTVM scheduling

* revert change due to bug

* rename driver files to be for zynq-type devices

* streamlining address mapping

* unifying register map offset values between driver and hardware generator

* rely on cma library for cache flush/invalidation

* coherence management

* not make buffer packing depend on data types that can be wider than 64bits

* refactor config derivation to minimize free parameters

* fix environment/pkg config interaction

* adding cfg dump property to pkgconfig:

* fix rpc reconfig

* fix spacing

* cleanup

* fix spacing

* long line fix

* fix spacing and lint

* fix line length

* cmake fix

* environment fix

* renaming after pynq since the driver stack relies on the pynq library - see pynq.io

* update doc

* adding parameterization to  name

* space

* removing reg width

* vta RPC

* update doc on how to edit vta_config.json

* fix path

* fix path
2019-07-28 18:41:10 -07:00
Luis Vega bca8ac17ae fix comment/doc in TensorLoad (#3646) 2019-07-28 16:18:34 -07:00
Luis Vega 9a542e37de fix case when offset is odd and size is even (#3643) 2019-07-28 00:20:53 -07:00
Luis Vega da40645fa9 [VTA] [Chisel] fix tensor issue/commit in gemm (#3637)
* fix tensor issue/commit in gemm

* remove trailing spaces
2019-07-27 13:39:37 -07:00
Benjamin Tu 87e18a4411 [VTA] [Chisel] support for different inp/wgt bits, rewrote DotProduct for clarity (#3605)
* support for different inp/wgt bits, rewrote dot for clarity

* [VTA] [Chisel] support for different inp/wgt bits, rewrote DotProduct for clarity

* [VTA] [Chisel] support for different inp/wgt bits, rewrote DotProduct for clarity

* change back to sim

* fix index

* fix index

* fix indent

* fix indent

* fix indent

* fix trailing spaces

* fix trailing spaces

* change to more descriptive name

* matric->matrix

* fix spacing

* fix spacing & added generic name for dot

* better parameter flow

* spacing

* spacing

* spacing

* update requirement (tested) for dot, spacing

* function call convention

* small edit
2019-07-25 18:47:04 -07:00
Luis Vega 66f3bf836f remove tabs (#3603) 2019-07-23 10:23:10 -07:00
Thierry Moreau 9d64d32143 [VTA] Runtime refactor to allow for non-shared memory FPGAs (e.g. F1) (#3554)
* updated runtime to support non-shared memory FPGAs for instruction and micro-op kernels

* adding driver-defined memcpy function to handle F1 cases

* refactor to include flush/invalidate in memcpy driver function

* update tsim driver

* bug fixes

* cleanup

* pre-allocate fpga readable buffers to improve perf

* fix

* remove instruction stream address rewrite pass for micro op kernels

* fix:

* white spaces

* fix lint

* avoid signed/unsigned compilation warning

* avoid signed/unsigned compilation warning

* fix

* fix

* addressing comments

* whitespace

* moving flush/invalidate out of memmove

* clearnup

* fix

* cosmetic

* rename API

* comment fix
2019-07-22 08:31:37 -07:00
Luis Vega 5b5ae98041 add coherent, length, and user bits option to Shell Config (#3593) 2019-07-21 15:45:48 -07:00
Luis Vega 3116eeec51 bugfix function args order in alu instruction generation (#3592) 2019-07-19 20:33:18 -07:00
Thierry Moreau 4c9729bf70 avoiding cast None to int errors (#3578) 2019-07-18 18:35:19 -07:00
Luis Vega 5c864ac81b fix pynq 32-bit address pointers (#3558) 2019-07-16 23:49:40 -07:00
Ramana Radhakrishnan b10dda6945 Fix pylint issue in vta/python/vta/top/graphpack.py (#3519)
This appears in linting using the docker scripts. I'm not sure
why this isn't failing in the standard CI for TVM and it might
be that the docker images haven't been updated in the CI system.

python3 -m pylint vta/python/vta --rcfile=/workspace/tests/lint/pylintrc
Using config file /workspace/tests/lint/pylintrc
************* Module vta.top.graphpack
C:131, 4: Missing method docstring (missing-docstring)
2019-07-10 08:59:01 -07:00
Luis Vega a31dd16257 [VTA] TSIM improvements and fixes (#3505)
* add tsim init function

* add sim device

* test wait and resume

* launch simulation thread from DPILoader

* add VTASimDPI module to handle all simulation related stuff

* test tsim init

* move exit to simdpi module

* update vta driver

* add chisel DPI module

* get back simshell

* update vta to support dpi sim

* update unittests

* add tsim to integration-conv2d test

* run resnet on tsim

* remove max-cycles

* match tsim counters with sim counters

* use env in simulator to switch between sim and tsim

* update unittest

* rollback conv2d test

* update resnet

* add stats to matrix multiply

* add stats

* print stats after assert

* update other tests

* add stats to gemm

* add return and remove unused libs

* add missing arg

* return lib

* update comments for linter

* add more comments to VTASimDPI module

* remove trailing spaces

* remove trailing spaces
2019-07-07 23:47:48 -07:00
Zhi f35f22767d [relay][frontend] Return Module from get_workload (#3483)
* [relay][frontend] Return Module from get_workload

* pass entry_func to autotvm

* disable tune

* add property to module

* mod.entry_func to main

* .main -> mod["main"]

* fix
2019-07-05 21:23:27 -07:00
Thierry Moreau 1efc84a479 [VTA][Hotfix] Avoiding error when environment variable is not set (#3497)
* avoid error when env var is not set

* extra content
2019-07-05 13:53:00 -07:00
Thierry Moreau 882ae1267c producing simulation statistics instead of time to get useful information out of simulation runs (#3481) 2019-07-02 20:25:49 -07:00
Zhi e3d6074a5b Clean up pass.h (#3312) 2019-07-02 09:14:52 -07:00
Thierry Moreau 3818b2a250 [VTA][Relay] Relay Compilation + AutoTVM compatible operator libraries for VTA (#3135) 2019-06-28 09:28:20 -07:00
Hua Jiang 5abbeb7e79 [VTA][TSIM] Verilator compile report error for printf (#3438)
[Symptom]
after follow the tsim example readme, doing verilator install by 'sudo apt-get-install verilator'
Once enable 'debug' or manually add 'printf' logic in chisel module, verilator would report
following error.
'syntax error, unexpected INTEGER NUMBER, expecting IDENTIFIER'

[Fix]
upgrade verilator to 4.012, issue fixed.

[Solution]
Link README.md verilator install steps with verilator home website
install instruction.
2019-06-27 09:38:27 -07:00
Hua Jiang fb95a98593 [VTA] Add VTA PYNQ metal_test bitstream program logic and fix compile issue. (#3400)
* [VTA] Add VTA PYNQ metal_test bitstream program logic and fix couple compile issue.

Issue:
VTAProgram not exist and cause compile error.
No logic to program the bitstream into FPGA.
metal test still use pynq 2.1 library which not support on latest
pynq 2.4.

Solution:
remove old VTAProgram.
when setting is pynq, program the bitstream during compile.
change DMA link library to libcma.

* Address review commends.
2019-06-25 00:26:47 -07:00
Luis Vega 1e66455b86 [VTA] [APPS] Update README on tsim example (#3409)
* update README

* fix typo
2019-06-21 11:45:16 -07:00
Hua Jiang 917ad9f682 [VTA] Fix VTA function Vivado Compile Error. (#3375)
Issue:
when using vivado compile vta.cc with top function 'vta', vivado
report deadlock error like '...with default size is used in a non -dataflow
region, which may result in deadlock Please consider to resize the
stream using the directive ‘set_directive_stream’ or the ‘HL S stream’
pragma.'

Solution:
give the queue a default size as 8.
2019-06-19 20:23:50 -07:00