It seems like that reserved_memory+allocated memory is bigger than the memory shown in nvidia-smi. My allocated mem is 3199MB and my reserved mem is 8766 MB, which equals 11965MB, but the mem shown in my nvidia-smi is 11131MB.
By the way, there is another question, I met an OOM when trying to allocate about 1000MB space but there was still about 8766MB in reserved space. The reserved space is designed to be reused, why is there still an OOM error?