diff --git a/js/web/lib/wasm/jsep/webgpu/op-resolve-rules.ts b/js/web/lib/wasm/jsep/webgpu/op-resolve-rules.ts index 77f362bb6d..1ea5b89d21 100644 --- a/js/web/lib/wasm/jsep/webgpu/op-resolve-rules.ts +++ b/js/web/lib/wasm/jsep/webgpu/op-resolve-rules.ts @@ -34,6 +34,7 @@ export const WEBGPU_OP_RESOLVE_RULES: Map = new ['Div', [binaryOps.div]], ['Elu', [unaryOps.elu, unaryOps.parseAlphaAttributes]], ['Erf', [unaryOps.erf]], + ['Exp', [unaryOps.exp]], ['Floor', [unaryOps.floor]], ['Gemm', [gemm, parseGemmAttributes]], ['GlobalAveragePool', [pool.globalAveragePool, pool.parseGlobalAveragePoolAttributes]], diff --git a/js/web/lib/wasm/jsep/webgpu/ops/unary-op.ts b/js/web/lib/wasm/jsep/webgpu/ops/unary-op.ts index 6f0c6519fe..7598404091 100644 --- a/js/web/lib/wasm/jsep/webgpu/ops/unary-op.ts +++ b/js/web/lib/wasm/jsep/webgpu/ops/unary-op.ts @@ -161,6 +161,10 @@ export const erf = (context: ComputeContext): void => { }`)); }; +export const exp = (context: ComputeContext): void => { + context.compute(createElementwiseProgramInfoLoader(context.inputs[0], 'Exp', 'exp')); +}; + export const floor = (context: ComputeContext): void => { context.compute(createElementwiseProgramInfoLoader(context.inputs[0], 'Floor', 'floor')); }; diff --git a/js/web/test/suite-test-list.jsonc b/js/web/test/suite-test-list.jsonc index 90a5c084ad..7b640fd753 100644 --- a/js/web/test/suite-test-list.jsonc +++ b/js/web/test/suite-test-list.jsonc @@ -517,8 +517,8 @@ // "test_equal_bcast", // "test_equal", "test_erf", - // "test_exp_example", - // "test_exp", + "test_exp_example", + "test_exp", // "test_expand_dim_changed", // "test_expand_dim_unchanged", // "test_eyelike_populate_off_main_diagonal",