pybind add sync mode

Signed-off-by: xiehuc <xiehuc@gmail.com>