We present a wavelength duplexer based on a compact arrayed waveguide grating (AWG) in silicon-on-insulator photonic wire waveguides. Polarization insensitive operation is achieved through a special polarization diversity approach in which we use 2-D grating fiber couplers as integrated polarization splitters. To mitigate the effects of process variations, we propagated both polarizations in opposite directions through the same AWG with a mere 600x350microm(2) footprint. This resulted in an on-chip insertion loss between -2.1dB and -6.9dB, crosstalk of -15dB, and only 0.66dB polarization dependent loss. This is the first demonstration of a functional polarization-diversity circuit implemented in SOI nanophotonic waveguides, including interfaces to single-mode fiber.