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:
Baiju Meswani 2022-03-22 16:13:35 -07:00 committed by GitHub
parent b28e5064f3
commit 565318ce86
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -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 " \

View file

@ -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