Skip to content

py_backend

Ala Fnayou edited this page May 16, 2023 · 3 revisions

The Python Backend

Path: py_backend The python backend is responsible for: - Compiling the cpp_interface library using CFFI, thereby generating the cpp_interface.so under the py_backend directory. - Providing a wrapper around the call to the C++ function distributed_inference_interface() from the compiled cpp_interface library

The cpp_backend Script

Path: cpp_backend.py This script is invoked by main.py to run the distributed_inference function.

Usage:
import cpp_backend
cpp_backend.distributed_inference(input_data, output_data, input_data_size:int output_data_size)

The compile Script

Path: compile.py This script is invoked by the build target on the following Makefile which in turn is called by the compile target on this Makefile

Usage:
python3 compile.py

Clone this wiki locally