-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add neureka support * Fix Ne16 weight rolling was unpacking to bits instead of 8 * Fix Arpan's name in the contributors * Add multi-accelerator support and neureka as a target * Skip invalid tests * Add readme per accelerator * Remove ne16 input dim 2 stride calculation * Move common validators to NnxTest * Rename test/<acc>.py to test/<acc>MemoryLayout.py * Extract functional model from test gen * Add isort * Add without norm_quant * Remove -flto * Move stride shift to ne16_task_set_dims_stride2x2 function * Set quantMode in *_set_bits function * Fix output d0 stride * Fixes to strides and stride2x2 Fixed stride2x2 mode for 32bit output. Changed stride meaning from number of elements in that dimension, to number of bytes between elements in that dimension. This also required a change of dimension names. * Rename divnceil and remainder, and add nnx_ prefix * Add citation * Add sdk and compiler commit hashes * Change task size to a define * Remove __PLATFORM__ check from the library since it's pulp-sdk specific * Change channel and bits with w_in_stride for task_set_ptrs
- Loading branch information
Showing
62 changed files
with
2,827 additions
and
1,519 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* | ||
* Luka Macan <luka.macan@unibo.it> | ||
* | ||
* Copyright 2023 ETH Zurich and University of Bologna | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include "neureka.h" | ||
#include "neureka_siracusa_bsp.h" | ||
#include "neureka_task.h" | ||
#include <stdint.h> | ||
|
||
/* PULP-NNX interface */ | ||
|
||
void neureka_nnx_init(neureka_dev_t *dev, neureka_siracusa_conf_t *conf); | ||
void neureka_nnx_term(neureka_dev_t *dev); | ||
|
||
/** neureka_nnx_dispatch_check | ||
* | ||
* Check whether you can dispatch to the accelerator. | ||
*/ | ||
int neureka_nnx_dispatch_check(neureka_dev_t *dev); | ||
|
||
/** neureka_nnx_dispatch_wait | ||
* | ||
* Block until you can dispatch to the accelerator. | ||
*/ | ||
void neureka_nnx_dispatch_wait(neureka_dev_t *dev); | ||
|
||
/** neureka_nnx_dispatch | ||
* | ||
* Dispatch a task to the accelerator. | ||
* Fails with return code 1 if the task cannot be dispatched. Otherwise returns | ||
* 0. | ||
*/ | ||
int neureka_nnx_dispatch(neureka_dev_t *dev, neureka_task_t *task); | ||
|
||
/** neureka_nnx_resolve_check | ||
* | ||
* Check whether the task has been resolved. | ||
*/ | ||
int neureka_nnx_resolve_check(neureka_dev_t *dev, neureka_task_t *task); | ||
|
||
/** neureka_nnx_resolve_wait | ||
* | ||
* Block until you can resolve the task. | ||
*/ | ||
void neureka_nnx_resolve_wait(neureka_dev_t *dev, neureka_task_t *task); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# NE16 | ||
|
||
## Docs | ||
|
||
- Github repo [link](https://github.com/pulp-platform/ne16). | ||
|
||
## Implemented features | ||
|
||
- [x] Convolution w/ kernel shape 1x1 | ||
- [x] Convolution w/ kernel shape 3x3 | ||
- [x] Depthwise convolution w/ kernel shape 3x3 | ||
- [x] Stride 2x2 | ||
- [ ] Normalization and quantization | ||
- [x] With | ||
- [x] Without | ||
- [x] Relu (w/ and w/o) | ||
- [x] Bias (w/ and w/o) | ||
- [ ] Per-channel shift | ||
- [x] Per-layer shift | ||
- [ ] Rounding | ||
- [ ] Input type | ||
- [x] uint8 | ||
- [ ] uint16 | ||
- [ ] Output type | ||
- [x] int8 | ||
- [x] uint8 (only w/ Relu) | ||
- [x] int32 | ||
- [ ] Scale type | ||
- [x] uint8 | ||
- [ ] uint16 | ||
- [ ] uint32 | ||
- [x] Bias type | ||
- [x] int32 | ||
- [ ] Weight type | ||
- [x] int8 | ||
- [ ] int2-7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.