mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
Support ORT WASM compilation with the training flag (#10973)
* Add training support for ORT web assembly compilation * Use wrapper for eigen includes in training
This commit is contained in:
parent
b28e5064f3
commit
565318ce86
2 changed files with 9 additions and 1 deletions
|
|
@ -110,6 +110,10 @@ if (onnxruntime_BUILD_WEBASSEMBLY_STATIC_LIB)
|
|||
re2::re2
|
||||
)
|
||||
|
||||
if (onnxruntime_ENABLE_TRAINING OR onnxruntime_ENABLE_TRAINING_OPS)
|
||||
bundle_static_library(onnxruntime_webassembly tensorboard)
|
||||
endif()
|
||||
|
||||
if (onnxruntime_BUILD_UNIT_TESTS)
|
||||
file(GLOB_RECURSE onnxruntime_webassembly_test_src CONFIGURE_DEPENDS
|
||||
"${ONNXRUNTIME_ROOT}/test/wasm/test_main.cc"
|
||||
|
|
@ -169,6 +173,10 @@ else()
|
|||
re2::re2
|
||||
)
|
||||
|
||||
if (onnxruntime_ENABLE_TRAINING OR onnxruntime_ENABLE_TRAINING_OPS)
|
||||
target_link_libraries(onnxruntime_webassembly PRIVATE tensorboard)
|
||||
endif()
|
||||
|
||||
set(EXPORTED_RUNTIME_METHODS "['stackAlloc','stackRestore','stackSave','UTF8ToString','stringToUTF8','lengthBytesUTF8']")
|
||||
|
||||
set_target_properties(onnxruntime_webassembly PROPERTIES LINK_FLAGS " \
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-result"
|
||||
#endif
|
||||
#include "unsupported/Eigen/SpecialFunctions"
|
||||
#include "core/common/eigen_common_wrapper.h"
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(pop)
|
||||
#else
|
||||
|
|
|
|||
Loading…
Reference in a new issue