[FlagGems Operator Development Competition] Add roll operator - #2597
Conversation
ad17615 to
e3fda26
Compare
e3fda26 to
6317f40
Compare
|
Hi @douxetpur, the branch has been updated to the latest |
|
Hi @douxetpur, I have fixed the issues from the previous failed checks and verified the formatting fix by passing |
|
Hi @douxetpur, the latest Could you please help rerun the CI when convenient? Thank you very much. |
|
All required checks are passing now, and the branch is up to date with the latest fixes. Could a code owner please review when convenient? Thank you very much. |
…-ai#2597) * [FlagGems Operator Development Competition] Optimize roll * Fix roll empty tensor dim handling * Avoid pytest option conflicts in mixed test runs
|
Hi maintainers, thank you very much for your time and effort in reviewing and merging this PR. My name is Zhiyuan Chen (陈致远). If any further follow-up or coordination is needed regarding the competition submission, I will respond promptly and cooperate actively. Thank you again for your support. |
Summary
Add
rolloperator for the FlagGems Operator Development Competition.This PR adds:
torch.roll(input, shifts, dims=None)Implementation
src/flag_gems/ops/roll.pytests/test_unary_pointwise_ops.pybenchmark/core_shapes.yamlImplementation details:
dims=NonedimshandlingAccuracy Validation
Correctness tests cover:
dims=Noneflatten behaviorshiftsanddimsfloat64fallbackAll outputs are compared against PyTorch reference behavior.
Note: the upstream roll test report contains
51 skippedcases. These are expected parameterized skips for invalid shape/dim combinations in the sharedPOINTWISE_SHAPESset, not hidden failures.Benchmark
Validation results:
pre-commit: passedARCH=7 python -m pytest tests/test_unary_pointwise_ops.py -m roll -q:257 passed, 51 skipped, 3397 deselectedOfficial benchmark harness
Representative benchmark cases
Test Coverage Checklist
torch.roll(input, shifts, dims=None)float16,float32,bool,float64fallback