weizuo:

Could you help me understand where the 8GB memory goes?


Other processes might use it, which should be visible via nvidia-smi. Memory fragmentation could also play a role, but I doubt you are losing so much memory due to this.