Skip to content

Commit

Permalink
Merge branch 'develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
rotx-eva authored Jun 18, 2024
2 parents 8d4fbda + 493df82 commit 4d1c4ef
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 6 deletions.
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ADI MAX78000/MAX78002 Model Training and Synthesis

May 20, 2024
June 18, 2024

**Note: This branch is compatible with PyTorch 1.8. Please go to the “pytorch-2” branch for PyTorch 2.3 compatibility.**

Expand Down Expand Up @@ -726,7 +726,7 @@ The machine also implements a streaming mode. Streaming allows input data dimens

The following illustration shows the basic principle: In order to produce the first output pixel of the second layer, not all data needs to be present at the input. In the example, a 5×5 input needs to be available.

<img src="docs/Streaming.png"/>
<img src="docs/Streaming.png" alt="Illustration of Streaming Mode"/>

In the accelerator implementation, data is shifted into the Tornado memory in a sequential fashion, so prior rows will be available as well. In order to produce the _blue_ output pixel, input data up to the blue input pixel must be available.

Expand Down Expand Up @@ -3268,6 +3268,21 @@ When running C code generated with `--energy`, the power display on the EVKit wi
See the [benchmarking guide](https://github.com/analogdevicesinc/MaximAI_Documentation/blob/main/Guides/MAX7800x%20Power%20Monitor%20and%20Energy%20Benchmarking%20Guide.pdf) for more information about benchmarking.
#### Moving from MAX78000 to MAX78002 (or vice versa)
Assuming the network is compatible with the new deployment target, changing the `--device` parameter will create new code that differs as follows:
| File | Changes | Recommended Action |
| -------------- | ------------------------------------------------------------ | ----------------------------- |
| cnn.c | Modified register and memory addresses, modified clock configuration | Replace file |
| main.c | Modified input memory addresses, modified clock configuration | Replace file or edit |
| Makefile | Modified TARGET variables | Replace file or edit |
| .launch | Modified values for `.cfg` and `.svd` | Replace file or edit |
| sampleoutput.h | Modified memory addresses | Replace file |
| weights.h | Modified memory addresses | Replace file |
| .settings/ | Modified TARGET value | Replace folder or edit .prefs |
| .vscode/ | Modified target variable | Replace folder or edit .json |
## Further Information
Expand Down
Binary file modified README.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion izer/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ class MakefileMapping(MutableMapping):
'SRCS +=', etc. is done "on the fly" through this mapping object.
The key:value rules are as follows:
* The key is lowercase, and any '.' is replaced is '_'. (revelant for JSON parsing)
* The key is lowercase, and any '.' is replaced is '_'. (relevant for JSON parsing)
* The value is a tuple with 2 items:
* index 0: The template string
Expand Down
6 changes: 4 additions & 2 deletions izer/izer.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,8 @@ def main():
f'{pixelcount}) does not match the '
f'sum of all pixels ({pixels}) in the layer\'s `in_sequences`.')
input_dim[ll] = conf_input_dim[ll]
if operator[ll] != op.CONV1D:

if operator[ll] != op.CONV1D and (operator[ll] != op.NONE or input_dim[ll][1] != 1):
if pool_stride[ll][0] != pool_stride[ll][1]:
eprint(f'{layer_pfx(ll)}{op.string(operator[ll])} does not support '
f'non-square pooling stride (currently set to '
Expand All @@ -512,6 +513,7 @@ def main():
(input_dim[ll][1] + pool_stride[ll][1] - pool[ll][1]
- pool_dilation[ll][1] + 1) // pool_stride[ll][1]]
else:
pool[ll][1] = 1
pooled_size = [(input_dim[ll][0] + pool_stride[ll][0] - pool[ll][0]
- pool_dilation[ll][0] + 1) // pool_stride[ll][0],
1]
Expand All @@ -521,7 +523,7 @@ def main():
eprint(f'{layer_pfx(ll)}Pooling or zero-padding results in a zero data '
f'dimension (input {input_dim[ll]}, result {pooled_dim[ll]}).')

if operator[ll] != op.CONV1D:
if operator[ll] != op.CONV1D and (operator[ll] != op.NONE or input_dim[ll][1] != 1):
if stride[ll][0] != stride[ll][1]:
eprint(f'{layer_pfx(ll)}{op.string(operator[ll])} does not support '
f'non-square stride (currently set to {stride[ll][0]}x{stride[ll][1]}).')
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ target-version = ['py36']
count = ''
ignore-words-list = 'nervana,cconfiguration'
quiet-level = 3
skip = '*.dasm,*.map,./rtldev,./.mypy_cache,./sdk,./venv,./.git,./super-linter.log'
skip = '*.dasm,*.map,*.pdf,./rtldev,./.mypy_cache,./sdk,./venv,./.git,./super-linter.log'
ignore-regex = '^\s+"image/png".*$'

0 comments on commit 4d1c4ef

Please sign in to comment.