Skip to content

Conversation

@prathikr
Copy link
Contributor

@prathikr prathikr commented May 22, 2025

No description provided.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can commit the suggested changes from lintrunner.

prathikr and others added 3 commits May 21, 2025 23:10
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can commit the suggested changes from lintrunner.

prathikr and others added 7 commits May 22, 2025 13:39
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@tianleiwu
Copy link
Contributor

tianleiwu commented May 23, 2025

In what situation will row_sum_shared be 0? As long as there is >=1 element(s), exp(value-max_value) = exp(0) = 1 when value = max_value, so row_sum_shared shall >= 1.

@prathikr
Copy link
Contributor Author

Continued in #24855

@prathikr prathikr closed this May 24, 2025
@prathikr prathikr changed the title [WebGPU EP] fix NaN bug in softmax operator WIP May 24, 2025
@prathikr prathikr reopened this May 27, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can commit the suggested changes from lintrunner.

Comment on lines +53 to +55
TEST(SoftmaxOperator, webgpu_nan) {
OpTester test("Softmax", 13); // axis default is -1

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TEST(SoftmaxOperator, webgpu_nan) {
OpTester test("Softmax", 13); // axis default is -1
TEST(SoftmaxOperator, webgpu_nan) {
OpTester test("Softmax", 13); // axis default is -1

Comment on lines +61 to +63
test.AddOutput<float>("Y", dimensions, expected_result);

// explicitly disable CPU EP for this test since CPU implementation does not handle NaN
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
test.AddOutput<float>("Y", dimensions, expected_result);
// explicitly disable CPU EP for this test since CPU implementation does not handle NaN
test.AddOutput<float>("Y", dimensions, expected_result);
// explicitly disable CPU EP for this test since CPU implementation does not handle NaN

@snnn snnn closed this Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants