Skip to content

Commit

Permalink
Use Number cast to jsepRunKernel
Browse files Browse the repository at this point in the history
  • Loading branch information
satyajandhyala committed Jul 19, 2024
1 parent ab2e3b1 commit b20c654
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 8 deletions.
53 changes: 47 additions & 6 deletions cmake/onnxruntime_webassembly.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Check warning on line 247 in cmake/onnxruntime_webassembly.cmake

View workflow job for this annotation

GitHub Actions / Optional Lint

[misspell] reported by reviewdog 🐶 "marshalling" is a misspelling of "marshaling" Raw Output: ./cmake/onnxruntime_webassembly.cmake:247:38: "marshalling" is a misspelling of "marshaling"
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"
)
Expand Down Expand Up @@ -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,\
Expand Down
4 changes: 2 additions & 2 deletions onnxruntime/core/providers/js/js_kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -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); },

Check warning on line 204 in onnxruntime/core/providers/js/js_kernel.h

View workflow job for this annotation

GitHub Actions / Lint C++

[cpplint] reported by reviewdog 🐶 Lines should be <= 120 characters long [whitespace/line_length] [2] Raw Output: onnxruntime/core/providers/js/js_kernel.h:204: Lines should be <= 120 characters long [whitespace/line_length] [2]
this, reinterpret_cast<uintptr_t>(p_serialized_kernel_context));

LOGS_DEFAULT(VERBOSE) << "outputs = " << context->OutputCount() << ". Y.data="
Expand Down

0 comments on commit b20c654

Please sign in to comment.