<commit_before>Neural Network Dataflow Scheduling
==================================

This Python tool allows you to explore the energy-efficient dataflow scheduling
for neural networks.

We assume an Eyeriss-style NN accelerator for the hardware, i.e., a 2D array of
processing elements, each of which has a local register file, and a global SRAM
buffer.

We decouple the scheduling problem into two subproblem, mapping and ordering.
Mapping deals with mapping one 2D convolution computation (one 2D ifmap
convolves with one 2D filter to get one 2D ofmap) onto the hardware
accelerator; ordering then decides the order between all 2D convolutions. We
currently only support row stationary mapping, and support exhaustive search
over all loop blocking and reordering schemes.

See the details in our ASPLOS'17 paper.

If you use this tool in your work, we kindly request that you reference our
ASPLOS'17 paper (Gao et al., "TETRIS: Scalable and Efficient Neural Network
Acceleration with 3D Memory", ASPLOS, April 2017), and send us a citation of
your work.


Find optimal schedule
-----------------------
First, define the NN structure in `examples/`. We already defined five NNs for
you, i.e., AlexNet, ZFNet, VGG16, VGG19, and ResNet.

Then, use `tools/eyeriss_search.py` to search for the optimal schedule for the
NN. Type
```
> python ./tools/eyeriss_search.py -h
```
for detailed options. You can specify PE array size, number of parallel arrays,
NN batch size and word size, register file and global buffer capacity, and the
energy cost of all components.

Finally, the two options, `--solve-loopblocking` and `--hybrid-partition2d`,
correspond to the analytical bypass schedule solution, and the hybrid
partitioning scheme, in our ASPLOS'17 paper. See the paper for details.


Verification
------------
To verify the tool against the Eyeriss ISCA'16 paper, run the following command
at the top directory.
```
> python ./tools/reproduce_eyeriss_papers.py isca16
```
Use the output results to draw the energy breakdown and compare against Figure
10 in the Eyeriss paper.


Copyright & License
-------------------
`nn_dataflow` is free software; you can redistribute it and/or modify it under
the terms of the [BSD License](LICENSE) as published by the Open Source
Initiative, revised version.

`nn_dataflow` was originally written by <NAME> at Stanford University, and
per Stanford University policy, the copyright of this original code remains
with the Board of Trustees of Leland Stanford Junior University.


Reference
---------
<NAME>, <NAME>, and Kozyrakis, *TETRIS: Scalable and Efficient Neural
Network Acceleration with 3D Memory*, in ASPLOS'17. April, 2017.
<commit_msg>[README] Add link to ACM DL.<commit_after>Neural Network Dataflow Scheduling
==================================

This Python tool allows you to explore the energy-efficient dataflow scheduling
for neural networks.

We assume an Eyeriss-style NN accelerator for the hardware, i.e., a 2D array of
processing elements, each of which has a local register file, and a global SRAM
buffer.

We decouple the scheduling problem into two subproblem, mapping and ordering.
Mapping deals with mapping one 2D convolution computation (one 2D ifmap
convolves with one 2D filter to get one 2D ofmap) onto the hardware
accelerator; ordering then decides the order between all 2D convolutions. We
currently only support row stationary mapping, and support exhaustive search
over all loop blocking and reordering schemes.

See the details in our ASPLOS'17 paper.

If you use this tool in your work, we kindly request that you reference our
ASPLOS'17 paper (Gao et al., "TETRIS: Scalable and Efficient Neural Network
Acceleration with 3D Memory", ASPLOS, April 2017), and send us a citation of
your work.


Find optimal schedule
-----------------------
First, define the NN structure in `examples/`. We already defined five NNs for
you, i.e., AlexNet, ZFNet, VGG16, VGG19, and ResNet.

Then, use `tools/eyeriss_search.py` to search for the optimal schedule for the
NN. Type
```
> python ./tools/eyeriss_search.py -h
```
for detailed options. You can specify PE array size, number of parallel arrays,
NN batch size and word size, register file and global buffer capacity, and the
energy cost of all components.

Finally, the two options, `--solve-loopblocking` and `--hybrid-partition2d`,
correspond to the analytical bypass schedule solution, and the hybrid
partitioning scheme, in our ASPLOS'17 paper. See the paper for details.


Verification
------------
To verify the tool against the Eyeriss ISCA'16 paper, run the following command
at the top directory.
```
> python ./tools/reproduce_eyeriss_papers.py isca16
```
Use the output results to draw the energy breakdown and compare against Figure
10 in the Eyeriss paper.


Copyright & License
-------------------
`nn_dataflow` is free software; you can redistribute it and/or modify it under
the terms of the [BSD License](LICENSE) as published by the Open Source
Initiative, revised version.

`nn_dataflow` was originally written by <NAME> at Stanford University, and
per Stanford University policy, the copyright of this original code remains
with the Board of Trustees of Leland Stanford Junior University.


Reference
---------
<NAME>, Yang, Horowitz, and Kozyrakis, *[TETRIS: Scalable and Efficient Neural
Network Acceleration with 3D
Memory](//dl.acm.org/citation.cfm?id=3037697.3037702)*, in ASPLOS'17. April,
2017.

{'fraction_non_alphanumeric': 0.08987318507627275, 'fraction_numerical': 0.015438338540709428, 'mean_word_length': 4.227665706051873, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1478273', 'n_tokens_mistral': 1560, 'n_tokens_neox': 1403, 'n_words': 758}