Sure, residual stresses are a consequence (among others) of temperature gradients causing distribution of temperature dependant strength and thermal expansion in a part. Therefore, everything which causes temperature gradients contributes to the formation of residual stresses.
If the temperature is above the material recrystalisation temperature, the grain size increases. This is the major problem occurs in heat affected zones of a weld joint. Especially in alloys the coarsening of grains reduces the density of strengthening agents in heat affected zone which reduces strength of the joint. Every research in metal joining process is interested on reducing the size of heat affected zone to improve post weld properties.