Skip to content

Add op test for torch.unique_consecutive - #3160

Open
Santosh Todkar (todkarsant) wants to merge 1 commit into
microsoft:mainfrom
todkarsant:add/unique-consecutive-test-2695
Open

Santosh Todkar (todkarsant) wants to merge 1 commit into
microsoft:mainfrom
todkarsant:add/unique-consecutive-test-2695

Conversation

@todkarsant

@todkarsant Santosh Todkar (todkarsant) commented Nov 5, 2026 •

Copy link
Copy Markdown

Summary

  • Adds an OpInfo test for aten.unique_consecutive to the torchlib test suite, as requested in [torchlib] Add op test to torch.unique_consecutive #2695
  • Adds sample_inputs_unique_consecutive in extra_opinfo.py with test cases covering: basic 1D input, return_inverse, return_counts, dim=0, single element, all-same elements, and no-consecutive-duplicates
  • Registers the OpInfo in OP_DB (extra_opinfo.py) and TorchLibOpInfo in TESTED_TORCHLIB_OPS (ops_test_data.py)

Test plan

  • CI passes for tests/function_libs/torch_lib/ops_test.py with the new ops.aten.unique_consecutive.default test cases
  • Verify test samples cover int32 and int64 dtypes (matching the implementation's supported types)

Fixes #2695

Add OpInfo test for `aten.unique_consecutive` to the torchlib test suite.
This covers basic usage, return_inverse, return_counts, dim=0, single
element, all-same elements, and no-consecutive-duplicates edge cases.

Fixes microsoft#2695

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@todkarsant

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

This branch has not been deployed

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

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

[torchlib] Add op test to torch.unique_consecutive

1 participant