Skip to content

Commit

Permalink
Fix Wasm tests failure
Browse files Browse the repository at this point in the history
  • Loading branch information
krazijames committed Feb 5, 2024
1 parent a4c832a commit 6d6fc70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions wasm-static_lib/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ project(tests)
add_executable(${PROJECT_NAME} test_inference.cc)

set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "\
-s NO_DISABLE_EXCEPTION_CATCHING=1 \
-s ALLOW_MEMORY_GROWTH=1 \
-s \"EXPORTED_RUNTIME_METHODS=['FS']\" \
--preload-file ${ONNXRUNTIME_SOURCE_DIR}/onnxruntime/test/testdata@/testdata \
Expand Down
2 changes: 1 addition & 1 deletion wasm-static_lib/tests/test_inference.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <onnxruntime_cxx_api.h>

TEST(InferenceTest, test) {
Ort::Env ort_env;
Ort::Env ort_env{Ort::ThreadingOptions{}};
Ort::Session session{ort_env, ORT_TSTR("testdata/mul_1.onnx"), Ort::SessionOptions{nullptr}};
auto memory_info = Ort::MemoryInfo::CreateCpu(OrtDeviceAllocator, OrtMemTypeCPU);

Expand Down

0 comments on commit 6d6fc70

Please sign in to comment.