diff --git a/js/web/lib/wasm/jsep/webgpu/ops/fuse-utils.ts b/js/web/lib/wasm/jsep/webgpu/ops/fuse-utils.ts index 956ef18eb5..a920875be1 100644 --- a/js/web/lib/wasm/jsep/webgpu/ops/fuse-utils.ts +++ b/js/web/lib/wasm/jsep/webgpu/ops/fuse-utils.ts @@ -15,7 +15,10 @@ export const getActivationSnippet = (attributes: InternalActivationAttributes, i } => { switch (attributes.activation) { case 'Relu': - return {activationFunction: '', applyActivation: 'value = max(value, 0.0);'}; + return { + activationFunction: '', + applyActivation: isVec4 ? 'value = max(value, vec4(0.0));' : 'value = max(value, 0.0);' + }; case 'Sigmoid': return {activationFunction: '', applyActivation: 'value = (1.0 / (1.0 + exp(-value)));'}; case 'Clip': diff --git a/js/web/lib/wasm/jsep/webgpu/program-manager.ts b/js/web/lib/wasm/jsep/webgpu/program-manager.ts index 341e6edf26..02691b2b6e 100644 --- a/js/web/lib/wasm/jsep/webgpu/program-manager.ts +++ b/js/web/lib/wasm/jsep/webgpu/program-manager.ts @@ -127,7 +127,7 @@ export class ProgramManager { const userCode = programInfo.getShaderSource(shaderHelper); const code = `${extensions.join('\n')}\n${shaderHelper.additionalImplementations}\n${userCode}`; const shaderModule = device.createShaderModule({code, label: programInfo.name}); - LOG_DEBUG('verbose', () => `[WebGPU] shader code: ${code}`); + LOG_DEBUG('verbose', () => `[WebGPU] ${programInfo.name} shader code: ${code}`); const computePipeline = device.createComputePipeline( {compute: {module: shaderModule, entryPoint: 'main'}, layout: 'auto', label: programInfo.name});