Overview:
tensor expression + format language + schedule
-->
SAM Graph
-->
dot file and png of dot file
-->
RTL Graph or Simulator Graph
Init the taco/ repo as a submodule
make submodules
Setup the compilation for the taco/ repo
make taco/build
Run the script to generate a handful of example sam graphs
make sam
The example sam graphs should now be located in compiler/sam-outputs/
in both the dot/
and png/
folers.
Naming rules
Metadata Naming
Metadata naming convention for other blocks:
pip install -e .
The simulator uses pytest to run tests
To run all tests type
cd sam/sim/
pytest
Use the following pytest optional arguments below
--debug-sim Turn on debug mode for sim
--count=<n> Repeat each test for n iterations
-k <testname>[<paramlist>] Run only tests with testname and paramlist
-vv Double verbose
-s Forward printouts to stdout
--full-trace Print full trace to stdout
Full kernel tests follow the naming convention test_<kernel>_<rand|direct>_<outformat>_<in1format>_<in2format>_...<innformat>
where:
<kernel>
is the name of the tensor algebra kernel being tested (e.g. mat_elemmul, mat_mul, vec_elemmul, etc.)*format
takes on u | c | s
for formats uncompressed, compressed, singleton respectivelyPrimitive unit tests follow the naming convention test_<primitive>_<feature>_<order>
where:
<primitive>
is the name of the primitive being tested (e.g. array, intersect, union, etc.)<feature>
is the name of the feature being tested (e.g. for an array we can test both loads and stores)<order>
is the name of the order of stream being tested (1d for vectors,
2d for matrices, ..., and nd for all dimensions/tensor orders, etc.)sim
│
│
│
└───src
│ │ base.py
│ │ joiner.py
│ │ ... # All primitive block classes
│
└───test
│ │ test.py
│ │ file022.txt
│ │
│ └───apps
│ │ test_mat_elemmul.py
│ │ ... # Full kernel/expression tests
│
└───────primitives
│ test_joiner.py
│ ... # Primitive unit tests
See the README
in sam/sam/onyx
All files in this project (code, scripts, documentaiton) are released under the MIT License