-
Notifications
You must be signed in to change notification settings - Fork 0
CPPSourceGen Python Package
Ala Fnayou edited this page May 15, 2023
·
2 revisions
The CPPSource package is used to generate a C++ source file for executing the distributed inference. The source file generation depends on the mapping found in the model summary. The C++ source file generation relies on the Jinja package to read a template and populate its missing sections with the appropriate pieces of C++ code.
Path: generate.py
The script can be used to generate the C++ source file by reading the directory where the different single-layer models are saved and generate source files for running inference of every layer on C++ on the CPU, GPU and TPU. Note: The directory can only be created and populated after running the split.py Script. The generated Source files should be saved under the following directory.
usage:
python3 generate.py -md <path/to/tflite/single/layer/models/directory>
Arguments:
-md --ModelsDirectory Directory where the single-layer tflite models are saved
-fm --FinalMapping Path to the Model Summary