Heat flux for semi-local machine-learning potentials