diff --git a/README.md b/README.md index 41e8696c..6296dc0b 100644 --- a/README.md +++ b/README.md @@ -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.** @@ -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. - +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. @@ -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 diff --git a/README.pdf b/README.pdf index a016b0ef..b1a171b8 100644 Binary files a/README.pdf and b/README.pdf differ diff --git a/izer/assets.py b/izer/assets.py index 86db3723..0fdb2d7e 100644 --- a/izer/assets.py +++ b/izer/assets.py @@ -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 diff --git a/izer/izer.py b/izer/izer.py index 29e48f49..483c6cb7 100644 --- a/izer/izer.py +++ b/izer/izer.py @@ -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 ' @@ -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] @@ -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]}).') diff --git a/pyproject.toml b/pyproject.toml index 81397eea..1dbfffe4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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".*$'