mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-14 20:48:00 +00:00
Enable delay loading hooker for python packages (#23227)
### Description Enable delay loading hooker for python packages
This commit is contained in:
parent
86870114eb
commit
69bb53db85
1 changed files with 3 additions and 0 deletions
|
|
@ -70,6 +70,9 @@ endif()
|
|||
onnxruntime_add_shared_library_module(onnxruntime_pybind11_state ${onnxruntime_pybind_srcs})
|
||||
|
||||
if(MSVC)
|
||||
# The following source file is only needed for the EPs that use delayloading. Namely, DML and WebGPU.
|
||||
target_sources(onnxruntime_pybind11_state PRIVATE "${ONNXRUNTIME_ROOT}/core/dll/delay_load_hook.cc")
|
||||
|
||||
target_compile_options(onnxruntime_pybind11_state PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:--compiler-options /utf-8>" "$<$<NOT:$<COMPILE_LANGUAGE:CUDA>>:/utf-8>")
|
||||
target_compile_options(onnxruntime_pybind11_state PRIVATE "/bigobj")
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Reference in a new issue