Skip to content

add addcdiv.out, addcmul.out, baddbmm.out, cat.out etc; refactor op name according to native_functions.yaml - #2441

Merged
0x45f merged 2 commits into
flagos-ai:masterfrom
taozhiwei:myfeature2
Apr 29, 2026
Merged

add addcdiv.out, addcmul.out, baddbmm.out, cat.out etc; refactor op name according to native_functions.yaml#2441
0x45f merged 2 commits into
flagos-ai:masterfrom
taozhiwei:myfeature2

Conversation

@taozhiwei

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread src/flag_gems/ops/addcmul.py Outdated

@tengqm tengqm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please consider split this into several PRs, each with a single operator implemented along with test cases.

Comment thread src/flag_gems/ops/addcmul.py
Comment thread src/flag_gems/ops/baddbmm.py Outdated
Comment thread src/flag_gems/ops/log_softmax.py Outdated
Comment thread src/flag_gems/ops/log_softmax.py Outdated
0x45f
0x45f previously approved these changes Apr 17, 2026
Comment thread tests/test_newly_registered_dispatch_ops.py Outdated
Comment thread src/flag_gems/ops/softmax.py Outdated
Comment thread src/flag_gems/ops/softmax.py Outdated
Comment thread src/flag_gems/ops/softmax.py Outdated
Comment thread tests/test_blas_ops.py Outdated
Comment thread tests/test_blas_ops.py Outdated
Comment thread tests/test_blas_ops.py Outdated
Comment thread tests/test_special_ops.py Outdated
Comment thread tests/test_binary_pointwise_ops.py Outdated
Comment thread src/flag_gems/__init__.py
Comment thread src/flag_gems/__init__.py
Comment thread src/flag_gems/ops/__init__.py
@tengqm

tengqm commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

@taozhiwei Please help check the merge conflicts.
You may also want to split this PR into smaller ones each focusing on a single operator (with test cases). With test case files split, you can now work in parallel on several operators without worrying that there will be merge conflicts on test case files.
For foo.out operator, please use the test case test_foo.py rather than creating a new test case file, though.

@tengqm

tengqm commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

@taozhiwei We are splitting the unit tests for easy of contributions and efficiency of CI pipeline. Sorry for the short-term inconvenience caused. Please help rebase this on to master. Thank you.

@taozhiwei
taozhiwei force-pushed the myfeature2 branch 3 times, most recently from 9d9c072 to 9a02e2a Compare April 23, 2026 04:48
@taozhiwei

Copy link
Copy Markdown
Contributor Author

@taozhiwei We are splitting the unit tests for easy of contributions and efficiency of CI pipeline. Sorry for the short-term inconvenience caused. Please help rebase this on to master. Thank you.

done

…s-ai#2251)

* [FlagGems Operator Development Competition] Add asinh operator

* Drop inf edge cases from asinh test

asinh(-inf) overflows in the log(x + sqrt(x^2+1)) form under fp16 and
returns NaN, diverging from torch. The finite-value and NaN coverage
is sufficient for the accuracy check.

* Fix asinh NaN on -inf via sign(x)*log(|x|+sqrt(x^2+1))

The naive x + sqrt(x^2 + 1) form evaluates to -inf + inf = NaN when
x = -inf, so the kernel returned NaN instead of -inf. Reformulating as
sign(x) * log(|x| + sqrt(x^2 + 1)) uses magnitude in the log branch and
restores the sign, matching torch.asinh across fp16/bf16/fp32 including
the +/- inf edge cases. Restores inf and -inf to the edge-case test.

---------

Co-authored-by: yunyiliu <yunyiliu@users.noreply.github.com>
Co-authored-by: yunyiliu <genius00003@gmail.cm>
@0x45f
0x45f merged commit 8bfa13a into flagos-ai:master Apr 29, 2026
45 of 48 checks passed
"softmax",
"softmax_backward",
"softmax_backward_out",
"softmax_out",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I believe most of the newly added operators do not have corresponding benchmark added ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants