mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-26 19:52:38 +00:00
removing warnings which are causing errors from torch and changing flags for Windows
This commit is contained in:
parent
498461485f
commit
c1ecc364d9
2 changed files with 10 additions and 4 deletions
|
|
@ -1742,6 +1742,10 @@ foreach(target_name ${ONNXRUNTIME_TARGETS})
|
|||
include(${target_name}.cmake)
|
||||
endforeach()
|
||||
|
||||
if(MSVC AND onnxruntime_ENABLE_EAGER_MODE)
|
||||
target_compile_options(onnxruntime_eager PUBLIC "/wd4100" "/wd4324" "/wd4458" "/wd4127" "/wd4193" "/wd4624" "/wd4702")
|
||||
endif()
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Android")
|
||||
list(APPEND onnxruntime_EXTERNAL_LIBRARIES log)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -108,10 +108,12 @@ if (onnxruntime_ENABLE_EAGER_MODE)
|
|||
target_link_libraries(onnxruntime_pybind11_state PRIVATE onnxruntime_eager ${TORCH_LIBRARIES} ${TORCH_PYTHON_LIBRARY})
|
||||
# the ort_aten.g.cpp is generated from tools. currently it has some limitations.
|
||||
# todo: fix this
|
||||
set_source_files_properties("${ORTTRAINING_ROOT}/orttraining/eager/ort_aten.g.cpp" PROPERTIES COMPILE_FLAGS -Wno-unused-parameter)
|
||||
set_source_files_properties("${ORTTRAINING_ROOT}/orttraining/eager/ort_aten.cpp" PROPERTIES COMPILE_FLAGS -Wno-unused-parameter)
|
||||
set_source_files_properties("${ORTTRAINING_ROOT}/orttraining/eager/ort_guard.cpp" PROPERTIES COMPILE_FLAGS -Wno-unused-parameter)
|
||||
set_source_files_properties("${ORTTRAINING_ROOT}/orttraining/eager/ort_tensor.cpp" PROPERTIES COMPILE_FLAGS -Wno-unused-parameter)
|
||||
if (NOT MSVC)
|
||||
set_source_files_properties("${ORTTRAINING_ROOT}/orttraining/eager/ort_aten.g.cpp" PROPERTIES COMPILE_FLAGS -Wno-unused-parameter)
|
||||
set_source_files_properties("${ORTTRAINING_ROOT}/orttraining/eager/ort_aten.cpp" PROPERTIES COMPILE_FLAGS -Wno-unused-parameter)
|
||||
set_source_files_properties("${ORTTRAINING_ROOT}/orttraining/eager/ort_guard.cpp" PROPERTIES COMPILE_FLAGS -Wno-unused-parameter)
|
||||
set_source_files_properties("${ORTTRAINING_ROOT}/orttraining/eager/ort_tensor.cpp" PROPERTIES COMPILE_FLAGS -Wno-unused-parameter)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_link_libraries(onnxruntime_pybind11_state PRIVATE
|
||||
|
|
|
|||
Loading…
Reference in a new issue