optimize mem
This commit is contained in:
@@ -1,6 +1,14 @@
|
||||
import os
|
||||
|
||||
os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1"
|
||||
# https://github.com/pytorch/pytorch/issues/27971#issuecomment-1768868068
|
||||
os.environ["ONEDNN_PRIMITIVE_CACHE_CAPACITY"] = "1"
|
||||
os.environ["LRU_CACHE_CAPACITY"] = "1"
|
||||
# prevent CPU memory leak when run model on GPU
|
||||
# https://github.com/pytorch/pytorch/issues/98688#issuecomment-1869288431
|
||||
# https://github.com/pytorch/pytorch/issues/108334#issuecomment-1752763633
|
||||
os.environ["TORCH_CUDNN_V8_API_LRU_CACHE_LIMIT"] = "1"
|
||||
|
||||
|
||||
import warnings
|
||||
|
||||
|
||||
Reference in New Issue
Block a user