Skip to content

Commit

Permalink
vsort/vs_onnxruntime.cpp: disable memory pattern optimization
Browse files Browse the repository at this point in the history
related issue: #3 (comment)

this optimization is enabled in vs-mlrt v9 by dbd6803
  • Loading branch information
WolframRhodium committed Aug 7, 2022
1 parent 99ebde4 commit d7fb1a7
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion vsort/vs_onnxruntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,16 @@ static void VS_CC vsOrtCreate(
session_options,
ExecutionMode::ORT_SEQUENTIAL
));
// checkError(ortapi->EnableMemPattern(session_options));

// it is important to disable the memory pattern optimization
// for use in vapoursynth
//
// this optimization merges memory allocation calls, but it is useless
// during inference in vs since the memory usage is fixed
//
// it also prevents the use of cuda graphs which requires a static
// memory configuration
checkError(ortapi->DisableMemPattern(session_options));

// TODO: other providers
#ifdef ENABLE_CUDA
Expand Down

0 comments on commit d7fb1a7

Please sign in to comment.