[js/webgpu] operator Exp (#15713)

### Description
operator Exp
This commit is contained in:
Yulong Wang 2023-04-27 15:04:09 -07:00 committed by GitHub
parent 627f5c9767
commit c0116af619
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

View file

@ -34,6 +34,7 @@ export const WEBGPU_OP_RESOLVE_RULES: Map<string, OperatorImplementation> = 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]],

View file

@ -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'));
};

View file

@ -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",