diff --git a/cmake/onnxruntime_webassembly.cmake b/cmake/onnxruntime_webassembly.cmake index c42f8e0ce6a56..62afaec9fde07 100644 --- a/cmake/onnxruntime_webassembly.cmake +++ b/cmake/onnxruntime_webassembly.cmake @@ -243,13 +243,55 @@ else() target_compile_options(onnxruntime_flatbuffers PRIVATE ${SMEMORY_FLAG} -Wno-experimental) target_compile_options(onnxruntime_util PRIVATE ${SMEMORY_FLAG} -Wno-experimental) target_compile_options(re2 PRIVATE ${SMEMORY_FLAG} -Wno-experimental) - target_compile_options(absl_base PRIVATE ${SMEMORY_FLAG} -Wno-experimental) - target_compile_options(absl_hash PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_flags_internal PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_flags_marshalling PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_flags_reflection PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_flags_config PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_flags_program_name PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_flags_private_handle_accessor PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_flags_commandlineflag PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_flags_commandlineflag_internal PRIVATE ${SMEMORY_FLAG} -Wno-experimental) target_compile_options(absl_raw_hash_set PRIVATE ${SMEMORY_FLAG} -Wno-experimental) - target_compile_options(absl_throw_delegate PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_hashtablez_sampler PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_hash PRIVATE ${SMEMORY_FLAG} -Wno-experimental) target_compile_options(absl_city PRIVATE ${SMEMORY_FLAG} -Wno-experimental) target_compile_options(absl_low_level_hash PRIVATE ${SMEMORY_FLAG} -Wno-experimental) - + target_compile_options(absl_bad_variant_access PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_cord PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_cordz_info PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_cord_internal PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_cordz_functions PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_exponential_biased PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_cordz_handle PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_crc_cord_state PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_crc32c PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_crc_internal PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_crc_cpu_detect PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_bad_optional_access PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_str_format_internal PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_synchronization PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_graphcycles_internal PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_kernel_timeout_internal PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_stacktrace PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_symbolize PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_debugging_internal PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_demangle_internal PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_demangle_rust PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_decode_rust_punycode PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_utf8_for_code_point PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_malloc_internal PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_time PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_civil_time PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_time_zone PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_strings PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_int128 PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_strings_internal PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_string_view PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_base PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_spinlock_wait PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_throw_delegate PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_raw_logging_internal PRIVATE ${SMEMORY_FLAG} -Wno-experimental) + target_compile_options(absl_log_severity PRIVATE ${SMEMORY_FLAG} -Wno-experimental) target_link_options(onnxruntime_webassembly PRIVATE --post-js "${ONNXRUNTIME_ROOT}/wasm/js_post_js_64.js" ) @@ -277,8 +319,7 @@ else() "SHELL:--pre-js \"${ONNXRUNTIME_ROOT}/wasm/pre.js\"" ) if (onnxruntime_ENABLE_WEBASSEMBLY_MEMORY64) - set(SIGNATURE_CONVERSIONS "\ -OrtRun:_ppp_p_pp,\ + set(SIGNATURE_CONVERSIONS "OrtRun:_ppp_p_pp,\ OrtGetTensorData:_ppppp,\ OrtCreateTensor:p_pppp_,\ OrtCreateSession:pppp,\ diff --git a/onnxruntime/core/providers/js/js_kernel.h b/onnxruntime/core/providers/js/js_kernel.h index 25809811acd0c..5ed3b7f3e8131 100644 --- a/onnxruntime/core/providers/js/js_kernel.h +++ b/onnxruntime/core/providers/js/js_kernel.h @@ -200,8 +200,8 @@ class JsKernel : public OpKernel { return status; } - int status_code = EM_ASM_INT( - { return Module.jsepRunKernel($0, $1, Module.jsepSessionState.sessionHandle, Module.jsepSessionState.errors); }, + intptr_t status_code = EM_ASM_INT( + { return Module.jsepRunKernel(Number($0), Number($1), Module.jsepSessionState.sessionHandle, Module.jsepSessionState.errors); }, this, reinterpret_cast(p_serialized_kernel_context)); LOGS_DEFAULT(VERBOSE) << "outputs = " << context->OutputCount() << ". Y.data="