A ground-to-exosphere Martian general circulation model is applied to study the thermal and dynamical structure of the upper Martian atmosphere during solstitial conditions. Special attention is paid to the reproduction of the thermospheric polar warming observed by Mars Odyssey during southern hemisphere (SH) summer solstice. The intensity and latitudinal distribution of this polar warming are successfully reproduced by the model. The heating balance and the dynamical structure of the upper atmosphere are studied. It is shown that a strong interhemispheric transport produces a convergence and descent of air over the winter pole, producing an adiabatic heating and a polar warming. This structure confirms previous results made by other models. The most novel aspect of this study is a sensitivity study showing the importance of the tides excited in situ in the upper atmosphere. These tides are critical to the simulated thermal and dynamical structure and remain key components of the interhemispheric transport mechanism responsible for the thermospheric polar warming. The day-night temperature differences created by these in situ tides produce a day-night transport that reinforces the summer-to-winter circulation and the descent of air over the pole, becoming an essential factor for this thermospheric polar warming. The effect of upward propagating nonmigrating tides is also studied.