Ok, this seems weird to me. What I can tell you is that running your code takes 53.99 seconds (for the 10 000 epochs). Also, it uses around 511 MiB of memory on my GPU. You can get information about you GPU by running this command in the terminal:
watch -n 0.5 nvidia-smi

Maybe you could check if you get the same thing as me on your GPU?