module cli.einsum
#
Short summary#
module mlprodict.cli.einsum
Command line to check einsum scenarios.
Functions#
function |
truncated documentation |
---|---|
Investigates whether or not the decomposing einsum is faster. |
Documentation#
Command line to check einsum scenarios.
- mlprodict.cli.einsum.einsum_test(equation='abc, cd->abd', shape='30', perm=False, runtime='python', verbose=1, fLOG=<built-in function print>, output=None, number=5, repeat=5)#
Investigates whether or not the decomposing einsum is faster.
- Parameters
equation – einsum equation to test
shape – an integer (all dimension gets the same size) or a list of shapes in a string separated with ;) or a list of integer to try out multiple shapes, example: 5, (5,5,5),(5,5), 5,6
perm – check on permutation or all letter permutations
runtime – ‘numpy’, ‘python’, ‘onnxruntime’
verbose – verbose
fLOG – logging function
output – output file (usually a csv file or an excel file), it requires pandas
number – usual parameter to measure a function
repeat – usual parameter to measure a function
Investigates whether or not the decomposing einsum is faster.
The command checks whether or not decomposing an einsum function is faster than einsum implementation.
Example:
python -m mlprodict einsum_test --equation="abc,cd->abd" --output=res.csv
<<<
python -m mlprodict einsum_test --help
>>>
usage: einsum_test [-h] [-e EQUATION] [-s SHAPE] [-p PERM] [-r RUNTIME] [-v VERBOSE] [-o OUTPUT] [-n NUMBER] [-re REPEAT] Investigates whether or not the decomposing einsum is faster. optional arguments: -h, --help show this help message and exit -e EQUATION, --equation EQUATION einsum equation to test (default: abc,cd->abd) -s SHAPE, --shape SHAPE an integer (all dimension gets the same size) or a list of shapes in a string separated with `;`) or a list of integer to try out multiple shapes, example: `5`, `(5,5,5),(5,5)`, `5,6` (default: 30) -p PERM, --perm PERM check on permutation or all letter permutations (default: False) -r RUNTIME, --runtime RUNTIME `'numpy'`, `'python'`, `'onnxruntime'` (default: python) -v VERBOSE, --verbose VERBOSE verbose (default: 1) -o OUTPUT, --output OUTPUT output file (usually a csv file or an excel file), it requires pandas (default: ) -n NUMBER, --number NUMBER usual parameter to measure a function (default: 5) -re REPEAT, --repeat REPEAT usual parameter to measure a function (default: 5)