Skip to content

Commit

Permalink
Fix the input_output_stride for 4-dim input.
Browse files Browse the repository at this point in the history
  • Loading branch information
satyajandhyala committed Jan 21, 2025
1 parent 1009fc9 commit a4d8482
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion onnxruntime/contrib_ops/webgpu/bert/rotary_embedding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Status RotaryEmbedding::ComputeInternal(onnxruntime::webgpu::ComputeContext& con
input_shape.NumDimensions() == 3
? std::vector<uint32_t>({batch_stride, hidden_size, head_size, 1})
: (input_shape.NumDimensions() == 4
? std::vector<uint32_t>({batch_stride, head_size, sequence_length * head_size, 1})
? std::vector<uint32_t>({batch_stride, sequence_length * head_size, head_size, 1})
: std::vector<uint32_t>({}));

program
Expand Down

0 comments on commit a4d8482

Please sign in to comment.