Skip to content

Commit

Permalink
fix f16 for attention, enable slice and flatten for more types (micro…
Browse files Browse the repository at this point in the history
  • Loading branch information
guschmue authored Jan 29, 2024
1 parent 1161753 commit f01392c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/lib/wasm/jsep/webgpu/ops/attention.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ export const computeInPlaceSoftmax = (context: ComputeContext, input: TensorView
if (sum == 0) {
for (var i: u32 = 0; i < uniforms.elements_per_wg && i + localOffset < uniforms.d_comp; i++) {
x[offset + i] = ${fillVector('f32', components, 'uniforms.d_inv')};
x[offset + i] = ${fillVector(elemValueType, components, 'uniforms.d_inv')};
}
} else {
for (var i: u32 = 0; i < uniforms.elements_per_wg && i + localOffset < uniforms.d_comp; i++) {
Expand Down

0 comments on commit f01392c

Please sign in to comment.