[CUDACachingAllocator] Simplify update_stat and avoid casts (#120964)
update_stat in CUDACachingAllocator.cpp was split into increase and decrease functions in this PR to simplify the implementation and avoid type casts throughout the code.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/120964
Approved by: https://github.com/albanD