Computational modeling of gradient hardening in polycrystals