Also add a small benchmark for automatic differentiation. Change-Id: I01c985495a973bc2a2fdc6c33fa1eb5ab788d7ef