chore(ml): memory optimisations (#3934)

This commit is contained in:
Mert
2023-08-31 19:30:53 -04:00
committed by GitHub
parent c0a48d7357
commit 41461e0d5d
8 changed files with 122 additions and 107 deletions

View File

@ -53,6 +53,7 @@ class InferenceModel(ABC):
log.debug(f"Setting intra_op_num_threads to {intra_op_num_threads}")
self.sess_options.inter_op_num_threads = inter_op_num_threads
self.sess_options.intra_op_num_threads = intra_op_num_threads
self.sess_options.enable_cpu_mem_arena = False
try:
loader(**model_kwargs)