Skip to content

Commit 4c50015

Browse files
fix: Minimize gpu memory fragmentation
1 parent 0499ea5 commit 4c50015

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fastembed/common/onnx_model.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def _load_onnx_model(
8585

8686
so = ort.SessionOptions()
8787
so.graph_optimization_level = ort.GraphOptimizationLevel.ORT_ENABLE_ALL
88-
88+
so.add_session_config_entry("memory.enable_memory_arena_shrinkage", "1")
8989
if threads is not None:
9090
so.intra_op_num_threads = threads
9191
so.inter_op_num_threads = threads

0 commit comments

Comments
 (0)