Skip to content

add spec for hardshrink.default - #56

Closed
rsdcastro wants to merge 2 commits into
meta-pytorch:mainfrom
rsdcastro:hardshrink
Closed

rsdcastro wants to merge 2 commits into
meta-pytorch:mainfrom
rsdcastro:hardshrink

Conversation

@rsdcastro

Copy link
Copy Markdown
Contributor

Tested with calibrator (CPU) & through BackendBench (GPU).

$ PYTHONPATH=.:$PYTHONPATH python calibrator/runner.py hardshrink.default
Running op: hardshrink.default, meta_tuple: ['ArgType.Tensor torch.float32 (6, 6, 0)', 'ArgType.Scalar True']
Running op: hardshrink.default, meta_tuple: ['ArgType.Tensor torch.float64 (8, 4, 1, 0, 3, 0)', 'ArgType.Scalar 75.43707978823275']
Running op: hardshrink.default, meta_tuple: ['ArgType.Tensor torch.float16 ()', 'ArgType.Scalar 68.03832924509683']
Running op: hardshrink.default, meta_tuple: ['ArgType.Tensor torch.bfloat16 (8, 7, 5, 7, 0)', 'ArgType.Scalar 56.260045322599616']
Running op: hardshrink.default, meta_tuple: ['ArgType.Tensor torch.float64 ()', 'ArgType.Scalar 85']
Running op: hardshrink.default, meta_tuple: ['ArgType.Tensor torch.float64 (0, 0)', 'ArgType.Scalar 100.0']
Running op: hardshrink.default, meta_tuple: ['ArgType.Tensor torch.float64 (8, 8, 7, 0, 1)', 'ArgType.Scalar 0']
Running op: hardshrink.default, meta_tuple: ['ArgType.Tensor torch.bfloat16 (6, 2, 5, 0, 8, 3)', 'ArgType.Scalar 99.35536642491385']
Running op: hardshrink.default, meta_tuple: ['ArgType.Tensor torch.float64 (0, 8)', 'ArgType.Scalar False']
Running op: hardshrink.default, meta_tuple: ['ArgType.Tensor torch.bfloat16 (3, 8)', 'ArgType.Scalar False']
Running op: hardshrink.default, meta_tuple: ['ArgType.Tensor torch.float64 (4, 8)', 'ArgType.Scalar 100']
Running op: hardshrink.default, meta_tuple: ['ArgType.Tensor torch.float64 (8, 8)', 'ArgType.Scalar 13']
Running op: hardshrink.default, meta_tuple: ['ArgType.Tensor torch.float64 (0, 0)', 'ArgType.Scalar 36']
Running op: hardshrink.default, meta_tuple: ['ArgType.Tensor torch.float16 (0, 1)', 'ArgType.Scalar 100.0']
Running op: hardshrink.default, meta_tuple: ['ArgType.Tensor torch.float32 (0, 6)', 'ArgType.Scalar 38.341605024190315']
Running op: hardshrink.default, meta_tuple: ['ArgType.Tensor torch.float64 (0, 8)', 'ArgType.Scalar 0']
Running op: hardshrink.default, meta_tuple: ['ArgType.Tensor torch.bfloat16 (7,)', 'ArgType.Scalar False']
Running op: hardshrink.default, meta_tuple: ['ArgType.Tensor torch.float16 ()', 'ArgType.Scalar False']
Running op: hardshrink.default, meta_tuple: ['ArgType.Tensor torch.float16 ()', 'ArgType.Scalar 89']
Running op: hardshrink.default, meta_tuple: ['ArgType.Tensor torch.float16 ()', 'ArgType.Scalar 55.25844690631487']
Running op: hardshrink.default, meta_tuple: ['ArgType.Tensor torch.float16 ()', 'ArgType.Scalar False']
WARNING:root:Repeated meta_tuple ['ArgType.Tensor torch.float16 ()', 'ArgType.Scalar False']
Running op: hardshrink.default, meta_tuple: ['ArgType.Tensor torch.float16 ()', 'ArgType.Scalar True']
Running op: hardshrink.default, meta_tuple: ['ArgType.Tensor torch.float16 ()', 'ArgType.Scalar 0']
Running op: hardshrink.default, meta_tuple: ['ArgType.Tensor torch.float16 ()', 'ArgType.Scalar 83']
Running op: hardshrink.default, meta_tuple: ['ArgType.Tensor torch.float16 ()', 'ArgType.Scalar 87']
Running op: hardshrink.default, meta_tuple: ['ArgType.Tensor torch.float16 ()', 'ArgType.Scalar 100']
Running op: hardshrink.default, meta_tuple: ['ArgType.Tensor torch.float16 ()', 'ArgType.Scalar 0.0']
Running op: hardshrink.default, meta_tuple: ['ArgType.Tensor torch.float16 ()', 'ArgType.Scalar 78.94734480645505']
Running op: hardshrink.default, meta_tuple: ['ArgType.Tensor torch.float16 ()', 'ArgType.Scalar 82.33401180467614']
Running op: hardshrink.default, meta_tuple: ['ArgType.Tensor torch.float16 ()', 'ArgType.Scalar 100.0']
Device: cpu

SUCCESS

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jan 30, 2026
@meta-codesync

meta-codesync Bot commented Feb 6, 2026

Copy link
Copy Markdown

@rsdcastro has imported this pull request. If you are a Meta employee, you can view this in D92560526.

@meta-codesync

meta-codesync Bot commented Feb 19, 2026

Copy link
Copy Markdown

@rsdcastro merged this pull request in 36dc44b.

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

Labels

CLA Signed This label is managed by the Meta Open Source bot. Merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants