If you in Section 29 of the datasheet, you will see Signature bytes:
ATmega328 0x1E 0x95 0x14
ATmega328P 0x1E 0x95 0x0F
There is a difference between non-P and P devices.
There is Not a difference for the physical package, -AU vs -PU.
What you can do is this:
Open your local avrdude.conf.
Find the Atmega328P section.
Change the signature bytes to reflect '328
Bootload your device.
When done, change the signature bytes back to reflect '328P.
I'm pretty sure that will work.