You can only have targeted ads if you ask users for their consent which is why these pop ups etc are necessary - going back to the original question.
If you use data that the user actually enter, or their IP for some reason, then yes, you do need to ask, but you could just ask when they are entering the data.
If you want to target based on activities across website, then you'll most likely need to ask, but that's already the case with the cookie law.
You do have me wondering if I'm correct, but I would still claim that if you noticed that browser with the "cookie XYZ1234" read five article related to child and then ask your ad partner for an ad for "people with children" would allow you to be GDPR complaint without any pop ups. It does flip the current ad tech model upside down though.