Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
qjia7 committed Feb 2, 2024
1 parent ebeb628 commit 71dd18b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ const conv2dTransposeCommonSnippet =
return ${type}(0.0);
`;

const applyActivation = getActivationSnippet(attributes, type, 'f32');
const applyActivation = getActivationSnippet(attributes, type);
const userCode = `
fn mm_readA(batch: i32, row : i32, colIn : i32) -> ${type} {
${isChannelsLast ? sampleA : sampleW}
Expand Down
2 changes: 1 addition & 1 deletion js/web/lib/wasm/jsep/webgpu/ops/fuse-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface InternalActivationAttributes {
}

export const getActivationSnippet =
(attributes: InternalActivationAttributes, valueType: string, baseType: string): string => {
(attributes: InternalActivationAttributes, valueType: string, baseType = 'f32'): string => {
switch (attributes.activation) {
case 'Relu':
return `value = max(value, ${valueType}(0.0));`;
Expand Down

0 comments on commit 71dd18b

Please sign in to comment.