-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[software] Merge libraries for data generation
- Loading branch information
1 parent
a76f158
commit db51318
Showing
7 changed files
with
767 additions
and
435 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,29 @@ | ||
# Data Generation | ||
|
||
Data for mempool applications is generated with the `gendata_header.py` script. | ||
The `gendata_*.py` libaries contain the golden models for the applications under test. | ||
The application parameters are passed to the script by means of the `gendata_params.hjson` file. | ||
The `gendatalib.py` libaries generate random inputs and a reference golden model for the applications under test. | ||
The application parameters are passed to the script with the `gendata_params.hjson` file. | ||
|
||
An example entry follows: `matmul_f32` is the name of MemPool application under test, the `type` refers to numpy precision, the `defines` are application parameters, turned into C constant declarations in the form `#define matrix_M (16)`, the `arrays` encode the C-type and name of input vectors for the application under test. | ||
|
||
` | ||
"matmul_f32": { | ||
"type": "float32", | ||
"defines": [ | ||
("matrix_M", 16) | ||
("matrix_N", 16) | ||
("matrix_P", 16) | ||
] | ||
"arrays": [ | ||
("float", "l2_A") | ||
("float", "l2_B") | ||
("float", "l2_C") | ||
] | ||
} | ||
` | ||
|
||
## To test a new application: | ||
If a new application requires to be tested with data generated from a reference golden model: | ||
- Add a new golden model to the existing libraries, or create a new one. | ||
- Add a new golden model to the existing library `gendatalib.py`. | ||
- Add a golden model function call to the `gendata_header.py`. | ||
- Add a new item in the `gendata_params.hjson` to make function parameters configurable. |
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.