Fpga-Based Smartnic For Distributed Machine Learning