Skip to content

Commit 5c0b540

Browse files
committed
Lint
1 parent 38de564 commit 5c0b540

File tree

4 files changed

+7
-18
lines changed

4 files changed

+7
-18
lines changed

js/web/lib/wasm/jsep/webgpu/ops/3rd-party/matmul_packed_webgpu.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ const matMulReadWriteFnSource =
409409
${
410410
hasBias ?
411411
`value = value + ${isChannelsLast ? 'bias[colIn]' : `${typeSnippet(component, dataType)}(bias[row])`};` :
412-
''}
412+
'' }
413413
${applyActivation}
414414
${outputVariable.setByIndices('vec3<u32>(coords)', 'value')}
415415
}

js/web/lib/wasm/jsep/webgpu/ops/conv-grouped.ts

+1-7
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,7 @@ export const createGroupedConvProgramInfo =
3434
{type: DataType.uint32, data: [attributes.pads[0], attributes.pads[1]]},
3535
{type: DataType.uint32, data: outputChannelsPerGroup}
3636
];
37-
<<<<<<< HEAD
38-
if (attributes.activation === 'Clip') {
39-
programUniforms.push(
40-
{type: DataType.float, data: attributes.clipMax!}, {type: DataType.float, data: attributes.clipMin!});
41-
}
42-
== == === appendActivationUniformsData(attributes, programUniforms);
43-
>>>>>>> main
37+
appendActivationUniformsData(attributes, programUniforms);
4438
programUniforms.push(
4539
...createTensorShapeVariables(xShape), ...createTensorShapeVariables(wShape),
4640
...createTensorShapeVariables(outputShape));

js/web/lib/wasm/jsep/webgpu/ops/fuse-utils.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4+
import {DataType} from '../../../wasm-common';
45
import {MAX_CLIP, MIN_CLIP} from '../../util';
56
import {ProgramUniform} from '../types';
67

@@ -36,9 +37,11 @@ export const getActivationSnippet = (attributes: InternalActivationAttributes, v
3637
export const appendActivationUniformsData =
3738
(attributes: InternalActivationAttributes, programUniform: ProgramUniform[]) => {
3839
if (attributes.activation === 'Clip') {
39-
programUniform.push({type: 'float32', data: attributes.clipMax!}, {type: 'float32', data: attributes.clipMin!});
40+
programUniform.push(
41+
{type: DataType.float, data: attributes.clipMax!}, {type: DataType.float, data: attributes.clipMin!});
4042
} else if (attributes.activation === 'HardSigmoid') {
41-
programUniform.push({type: 'float32', data: attributes.alpha!}, {type: 'float32', data: attributes.beta!});
43+
programUniform.push(
44+
{type: DataType.float, data: attributes.alpha!}, {type: DataType.float, data: attributes.beta!});
4245
}
4346
};
4447

js/web/lib/wasm/jsep/webgpu/ops/matmul.ts

-8
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,7 @@ export const createNaiveMatmulProgramInfo =
3333
{type: DataType.uint32, data: outputSize}, {type: DataType.uint32, data: M}, {type: DataType.uint32, data: N},
3434
{type: DataType.uint32, data: K}
3535
];
36-
<<<<<<< HEAD
37-
if (activationAttributes.activation === 'Clip') {
38-
programUniforms.push(
39-
{type: DataType.float, data: activationAttributes.clipMax!},
40-
{type: DataType.float, data: activationAttributes.clipMin!});
41-
}
42-
=======
4336
appendActivationUniformsData(activationAttributes, programUniforms);
44-
>>>>>>> main
4537
programUniforms.push(
4638
...createTensorShapeVariables(outerDims), ...createTensorShapeVariables(aShape),
4739
...createTensorShapeVariables(bShape));

0 commit comments

Comments
 (0)