Flexible and high performance network acceleration for AI/ML