-
Notifications
You must be signed in to change notification settings - Fork 683
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NVDLA Integration + Cleanup Ariane Preprocessing #505
Changes from all commits
7be0cd1
bdb8fcd
1c0b249
5c9ff11
ef97407
2418d0c
8c558dd
b4e379e
b460322
e65f0ca
047ab17
efa7d7c
10d4975
85853b3
cae69b6
c582fb7
432b908
7b8e018
c692ce3
604b169
8d5dfb7
ff46956
c160111
57af5ff
e359cf2
0bc0e35
bd748d1
425838f
6cbeea2
0b4644c
ee8c698
6b2def8
9611bba
39100c8
01f4c12
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
NVDLA | ||
==================================== | ||
|
||
`NVDLA <http://nvdla.org/>`_ is an open-source deep learning accelerator developed by NVIDIA. | ||
The `NVDLA` is attached as a TileLink peripheral so it can be used as a component within the `Rocket Chip SoC generator`. | ||
The accelerator by itself exposes an AXI memory interface (or two if you use the "Large" configuration), a control interface, and an interrupt line. | ||
The main way to use the accelerator in Chipyard is to use the `NVDLA SW repository <https://github.com/ucb-bar/nvdla-sw>`_ that was ported to work on FireSim Linux. | ||
However, you can also use the accelerator in baremetal simulations (refer to ``tests/nvdla.c``). | ||
|
||
For more information on both the HW architecture and the SW, please visit their `website <http://nvdla.org/>`_. | ||
|
||
NVDLA Software with FireMarshal | ||
------------------------------- | ||
|
||
Located at ``software/nvdla-workload`` is a FireMarshal-based workload to boot Linux with the proper NVDLA drivers. | ||
Refer to that ``README.md`` for more information on how to run a simulation. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,14 +44,12 @@ class WithPeripheryBusFrequency(freq: BigInt) extends Config((site, here, up) => | |
case PeripheryBusKey => up(PeripheryBusKey).copy(dtsFrequency = Some(freq)) | ||
}) | ||
|
||
|
||
class WithPerfCounters extends Config((site, here, up) => { | ||
case RocketTilesKey => up(RocketTilesKey) map (tile => tile.copy( | ||
core = tile.core.copy(nPerfCounters = 29) | ||
)) | ||
}) | ||
|
||
|
||
// Disables clock-gating; doesn't play nice with our FAME-1 pass | ||
class WithoutClockGating extends Config((site, here, up) => { | ||
case DebugModuleKey => up(DebugModuleKey, site).map(_.copy(clockGate = false)) | ||
|
@@ -63,15 +61,16 @@ class WithScalaTestFeatures extends Config((site, here, up) => { | |
case TracePortKey => up(TracePortKey, site).map(_.copy(print = true)) | ||
}) | ||
|
||
|
||
// FASED Config Aliases. This to enable config generation via "_" concatenation | ||
// which requires that all config classes be defined in the same package | ||
class DDR3FRFCFS extends FRFCFS16GBQuadRank | ||
class DDR3FRFCFSLLC4MB extends FRFCFS16GBQuadRankLLC4MB | ||
|
||
class WithNIC extends icenet.WithIceNIC(inBufFlits = 8192, ctrlQueueDepth = 64) | ||
|
||
|
||
// Adds a small/large NVDLA to the system | ||
class WithNVDLALarge extends nvidia.blocks.dla.WithNVDLA("large") | ||
class WithNVDLASmall extends nvidia.blocks.dla.WithNVDLA("small") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are these here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IIRC to do something like this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
|
||
// Tweaks that are generally applied to all firesim configs | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/usr/bin/python | ||
|
||
# replaces a `include with the full include file | ||
# | ||
# args | ||
# $1 - file to remove includes from | ||
# $2 - file to write output to | ||
# $3 - list of directories to search for includes in (note: NON-RECURSIVE must specify all dirs) | ||
# includes are found relative to this path | ||
# this is equivalent to something like +incdir+ | ||
|
||
import sys | ||
import re | ||
import os | ||
|
||
inVlog = sys.argv[1] | ||
outVlog = sys.argv[2] | ||
print("[INFO] Replaces includes from: " + str(inVlog)) | ||
|
||
if inVlog == outVlog: | ||
sys.exit("[ERROR] The input and output file cannot be the same.") | ||
|
||
# add directories to search list | ||
incDirs = sys.argv[3:] | ||
print("[INFO] Searching following dirs for includes: " + str(incDirs)) | ||
|
||
# open file | ||
with open(inVlog, 'r') as inFile: | ||
with open(outVlog, 'w') as outFile: | ||
# for each include found, search through all dirs and replace if found, error if not | ||
for num, line in enumerate(inFile, 1): | ||
match = re.match(r"^ *`include +\"(.*)\"", line) | ||
if match: | ||
# search for include and replace | ||
found = False | ||
for d in incDirs: | ||
potentialIncFileName = d + "/" + match.group(1) | ||
if os.path.exists(potentialIncFileName): | ||
found = True | ||
with open(potentialIncFileName, 'r') as incFile: | ||
for iline in incFile: | ||
outFile.write(iline) | ||
break | ||
|
||
# must find something to include with | ||
if not found: | ||
sys.exit("[ERROR] Couldn't replace include \"" + str(match.group(1)) + "\" found on line " + str(num)) | ||
else: | ||
outFile.write(line) | ||
|
||
print("[INFO] Success. Writing output to: " + str(outVlog)) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,7 +72,6 @@ ARIANE_VERILATOR_FLAGS = \ | |
--unroll-count 256 \ | ||
-Werror-PINMISSING \ | ||
-Werror-IMPLICIT \ | ||
-Wno-fatal \ | ||
-Wno-PINCONNECTEMPTY \ | ||
-Wno-ASSIGNDLY \ | ||
-Wno-DECLFILENAME \ | ||
|
@@ -91,9 +90,11 @@ TIMESCALE_OPTS := $(shell verilator --version | perl -lne 'if (/(\d.\d+)/ && $$1 | |
VERILATOR_NONCC_OPTS = \ | ||
$(TIMESCALE_OPTS) \ | ||
--top-module $(VLOG_MODEL) \ | ||
-Wno-fatal \ | ||
$(shell if ! grep -iq "module.*ariane" $(build_dir)/*.*v; then echo "$(CHIPYARD_VERILATOR_FLAGS)"; else echo "$(ARIANE_VERILATOR_FLAGS)"; fi) \ | ||
--output-split 10000 \ | ||
--output-split-cfuncs 100 \ | ||
--max-num-width 1048576 \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was done to match RC: chipsalliance/rocket-chip#2377 |
||
-f $(sim_common_files) \ | ||
$(sim_vsrcs) | ||
|
||
|
+0 −2 | .gitignore | |
+1 −1 | boards/firechip/drivers/icenet-driver | |
+12 −14 | marshal | |
+1 −1 | riscv-linux | |
+1 −0 | scripts/.gitignore | |
+25 −22 | scripts/full_test.sh | |
+33 −0 | scripts/linux_cscope.sh | |
+1 −1 | test/drivers.json | |
+2 −3 | test/drivers/baseOutput/drivers/uartlog | |
+2 −3 | test/drivers/jobOutput/driversJob-j0/uartlog | |
+1 −1 | test/driversJob.json | |
+1 −0 | test/dummy-bare/.gitignore | |
+0 −1 | test/dummy-bare/hello | |
+14 −4 | test/incremental/test.py | |
+5 −2 | test/post-bin-jobs.json | |
+3 −1 | test/post-bin.json | |
+16 −0 | test/post-bin/cleanup.sh | |
+0 −0 | test/post-bin/create-file.sh | |
+2 −0 | test/post-bin/refOutputBase/post-bin/uartlog | |
+0 −0 | test/post-bin/refOutputJobs/post-bin-jobs-j0/uartlog | |
+0 −0 | test/post-bin/refOutputJobs/post-bin-jobs-j1/uartlog | |
+0 −1 | test/post-bin2/.gitignore | |
+1 −1 | test/simArgs/refOutput/simArgs/uartlog | |
+1 −0 | test/spike-args/.gitignore | |
+0 −1 | test/spike-args/hello | |
+0 −1 | test/spike/hello | |
+4 −5 | wlutil/build.py | |
+5 −1 | wlutil/wlutil.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How likely is this to get broken upon Linux kernel upgrades?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully not by much... but frankly I wouldn't know until one happened.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One is expected to happen this week? firesim/FireMarshal#151
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the SW to match the bumped kernel (added extra instructions in the SW workload section to address this).