From ae12127bd0ef109c1eab0f4fe36e8bce80aa6b39 Mon Sep 17 00:00:00 2001 From: Satya Jandhyala Date: Wed, 17 Jul 2024 18:26:42 -0700 Subject: [PATCH] clean-up --- cmake/adjust_global_compile_flags.cmake | 5 +---- cmake/onnxruntime_webassembly.cmake | 4 ++-- js/web/lib/wasm/jsep/backend-webgpu.ts | 3 +-- js/web/lib/wasm/jsep/webgpu/types.ts | 1 - js/web/lib/wasm/wasm-types.ts | 2 -- 5 files changed, 4 insertions(+), 11 deletions(-) diff --git a/cmake/adjust_global_compile_flags.cmake b/cmake/adjust_global_compile_flags.cmake index ac98403c70071..e12ac0ae4605d 100644 --- a/cmake/adjust_global_compile_flags.cmake +++ b/cmake/adjust_global_compile_flags.cmake @@ -52,10 +52,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") endif() if (onnxruntime_ENABLE_WEBASSEMBLY_EXCEPTION_CATCHING) - if (onnxruntime_ENABLE_WEBASSEMBLY_MEMORY64) - # string(APPEND CMAKE_C_FLAGS " -fwasm-exceptions") - # string(APPEND CMAKE_CXX_FLAGS " -fwasm-exceptions") - else() + if (NOT onnxruntime_ENABLE_WEBASSEMBLY_MEMORY64) string(APPEND CMAKE_C_FLAGS " -s DISABLE_EXCEPTION_CATCHING=0") string(APPEND CMAKE_CXX_FLAGS " -s DISABLE_EXCEPTION_CATCHING=0") endif() diff --git a/cmake/onnxruntime_webassembly.cmake b/cmake/onnxruntime_webassembly.cmake index c90703cb0d2e8..c42f8e0ce6a56 100644 --- a/cmake/onnxruntime_webassembly.cmake +++ b/cmake/onnxruntime_webassembly.cmake @@ -302,7 +302,7 @@ OrtClearBoundOutputs:_p,\ OrtReleaseBinding:_p,\ OrtGetLastError:_pp,\ JsepOutput:pp_p,\ -JsepGetNodeN:pp,\ +JsepGetNodeName:pp,\ JsepOutput:pp_p,\ jsepCopy:_pp_,\ jsepCopyAsync:_pp_,\ @@ -325,7 +325,7 @@ jsepDownload:_pp_") "SHELL:-s ASYNCIFY=1" "SHELL:-s ASYNCIFY_STACK_SIZE=65536" "SHELL:-s ASYNCIFY_EXPORTS=['OrtRun']" - "SHELL:-s ASYNCIFY_IMPORTS=['Module.jsepCopy','Module.jsepCopyAsync,jsepDownload']" + "SHELL:-s ASYNCIFY_IMPORTS=['Module.jsepCopy','Module.jsepCopyAsync','Module.jsepDownload']" ) set_target_properties(onnxruntime_webassembly PROPERTIES LINK_DEPENDS ${ONNXRUNTIME_ROOT}/wasm/pre-jsep.js) endif() diff --git a/js/web/lib/wasm/jsep/backend-webgpu.ts b/js/web/lib/wasm/jsep/backend-webgpu.ts index faa08ccca38ee..c701cf3a6df85 100644 --- a/js/web/lib/wasm/jsep/backend-webgpu.ts +++ b/js/web/lib/wasm/jsep/backend-webgpu.ts @@ -219,7 +219,6 @@ export class WebGpuBackend { maxComputeWorkgroupSizeX: adapter.limits.maxComputeWorkgroupSizeX, maxComputeWorkgroupSizeY: adapter.limits.maxComputeWorkgroupSizeY, maxComputeWorkgroupSizeZ: adapter.limits.maxComputeWorkgroupSizeZ, - maxBindingsPerBindGroup: adapter.limits.maxBindingsPerBindGroup, }, requiredFeatures, }; @@ -450,7 +449,7 @@ export class WebGpuBackend { const isPersistent = validatedOutputIndices[i] === -2; const tensorView = (isTemporary || isPersistent) ? createIntermediateOutput(outputs[i].dataType, outputs[i].dims) : - createKernelOutput(outputs[i].outputIndex || validatedOutputIndices[i], outputs[i].dataType, outputs[i].dims); + createKernelOutput(validatedOutputIndices[i], outputs[i].dataType, outputs[i].dims); outputTensorViews.push(tensorView); // if tensor view data is 0, it means the output is zero-sized tensor, and there is no GPU data for it. if (tensorView.data === 0) { diff --git a/js/web/lib/wasm/jsep/webgpu/types.ts b/js/web/lib/wasm/jsep/webgpu/types.ts index 6e906cc8497ec..2a584fc0a2218 100644 --- a/js/web/lib/wasm/jsep/webgpu/types.ts +++ b/js/web/lib/wasm/jsep/webgpu/types.ts @@ -31,7 +31,6 @@ export interface GpuData { export interface TensorInfo { dims: readonly number[]; dataType: number; - outputIndex?: number; } export interface ProgramUniform { diff --git a/js/web/lib/wasm/wasm-types.ts b/js/web/lib/wasm/wasm-types.ts index 8b29e24cb2143..9a4500822d457 100644 --- a/js/web/lib/wasm/wasm-types.ts +++ b/js/web/lib/wasm/wasm-types.ts @@ -209,8 +209,6 @@ export interface OrtTrainingAPIs { */ export interface OrtWasmModule extends EmscriptenModule, OrtInferenceAPIs, Partial, Partial { - HEAP64: BigInt64Array; - HEAPU64: BigUint64Array; PTR_SIZE: number; // #region emscripten functions stackSave(): number;