Use Simpson DTC clips, or some similar product to allow the joists above to deflect vertically without vertically loading the partition wall. The clips also laterally stabalize the top of the partition wall. They can also allow some lateral load to be transmitted to the wall if it is a shear wall.
If the partition wall does not aligy with the joists above, 2X flat blocking can be placed between the joists above at the top of the partition wall to nail the clips DTC to.
The Simpson manual shows how to install the clips. There must be a 1/4" gap between the top plate of the partition wall and the bottom of the joists above. The same detail can be used if the joists above are roof trusses.
Mike McCann
MMC Engineering
Motto: KISS
Motivation: Don't ask