2007 Mazda 6 sport GT

while driving my 2007 Automatic Transmission Mazda 6 sport gt on the highway and i accelerate abruptly the rpm is getting to a high number like 7000 but the car isn’t accelerating,it feels like i am driving a manual transmission car and i stepped on the clutch all the way and accelerated.What do you think is the problem and how it should be fixed?