Skip to content

Commit

Permalink
enable streams for DML EP
Browse files Browse the repository at this point in the history
  • Loading branch information
jslhcl committed Feb 22, 2024
1 parent 3bdb10d commit 9db0160
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions cmake/adjust_global_compile_flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,8 @@ if (onnxruntime_MINIMAL_BUILD)
endif()
endif()

# Enable stream for all the non-minimal build, except for DML. There's currently a bug
# in the allocation planner when reusing buffers and more than one streams are used that
# make it possible (although rarely) to reach a reference count of 0 for a buffer that is
# still being used. Since DML doesn't benefit from multiple streams, disabling it is the
# safest option for now.
# https://github.com/microsoft/onnxruntime/issues/19480
if (NOT onnxruntime_MINIMAL_BUILD AND NOT onnxruntime_USE_DML)
# Enable stream for all the non-minimal build
if (NOT onnxruntime_MINIMAL_BUILD)
add_compile_definitions(ORT_ENABLE_STREAM)
endif()

Expand Down

0 comments on commit 9db0160

Please sign in to comment.