Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unary sharded sweeps #15300

Merged
merged 47 commits into from
Dec 23, 2024
Merged

Add unary sharded sweeps #15300

merged 47 commits into from
Dec 23, 2024

Conversation

amalbasaTT
Copy link
Contributor

@amalbasaTT amalbasaTT commented Nov 21, 2024

Ticket

Link to Github Issue

Problem description

  1. Inside file sharded_utils.py, function gen_sharded_spec_unary needs support for generating input spec when parameter tile_layout of a function ttnn.create_sharded_memory_config_ is set to True
  2. All existing sharded sweeps should include vector invalidation for when input_layout == "ROW_MAJOR_LAYOUT" and shard_orientation == "COL_MAJOR" and input_shape[-1] % input_shape[-2] != 0.
  3. Missing sweeps for sharded versions of ops:
  • triu
  • tril
  • heaviside
  • hardtanh
  • hardsigmoid
  • hardswish
  • hardshrink

What's changed

  1. Added mention vector invalidation to all existing sharded sweeps (including the new ones).
  2. Added sharded versions of sweeps for ops mentioned in the Problem description section above.
  3. Minor refactoring of non-sharded versions of added sharded sweeps to include shapes with last two dimensions not divisible by 32.

Pass rates for all sharded sweeps:

sweeps/eltwise/unary/frac/frac_sharded.py: 114 fail, 462 pass (80.208333%).
sweeps/eltwise/unary/hardshrink/hardshrink_sharded.py: 295 fail, 473 pass (61.588542%).
sweeps/eltwise/unary/hardsigmoid/hardsigmoid_sharded.py: 174 fail, 594 pass 768 (77.34375%).
sweeps/eltwise/unary/hardswish/hardswish_sharded.py: 174 fail, 594 pass (77.34375%).
sweeps/eltwise/unary/hardtanh/hardtanh_sharded.py: 174 fail, 594 pass (77.34375%).
sweeps/eltwise/unary/heaviside/heaviside_sharded.py: 144 fail, 624 pass (81.25%)
sweeps/eltwise/unary/isfinite/isfinite_sharded.py : 147 fail, 832 pass (84.984678%).
sweeps/eltwise/unary/isinf/isinf_sharded.py: 979 fail, 0 pass (0%).
sweeps/eltwise/unary/isnan/isnan_sharded.py: 979 fail, 0 pass (0%).
sweeps/eltwise/unary//isneginf/isneginf_sharded.py: 979 fail, 0 pass (0%).
sweeps/eltwise/unary/isposinf/isposinf_sharded.py: 147 fail, 832 pass (84.984678%).
sweeps/eltwise/unary/lgamma/lgamma_sharded.py: 384 fail, 0 pass (0%).
sweeps/eltwise/unary/logit/logit_sharded.py: 68 fail, 316 pass (82.291667%).
sweeps/eltwise/unary/mish/mish_sharded.py: 174 fail, 594 pass (77.34375%).
sweeps/eltwise/unary/multigammaln/multigammaln_sharded.py 384 fail, 0 pass (0%).
sweeps/eltwise/unary/softshrink/softshrink_sharded.py : 208 fail, 944 pass (81.944444%).
sweeps/eltwise/unary/tril/tril_sharded.py: 66 fail, 318 pass (82.812%).
sweeps/eltwise/unary/triu/triu_sharded.py:68 fail, 316 pass (82.291667%).
sweeps/eltwise/unary/trunc/trunc_sharded.py: 174 fail, 594 pass (77.34375%).

Checklist

@amalbasaTT amalbasaTT force-pushed the amalbasaTT/unary_sharded-sweeps-2 branch 4 times, most recently from 8871c6c to 0a72c2f Compare November 27, 2024 11:37
@amalbasaTT amalbasaTT marked this pull request as ready for review November 27, 2024 14:26
Copy link
Contributor

@jdesousa-TT jdesousa-TT left a comment

Choose a reason for hiding this comment

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

Please run these new sweeps in the pipeline before merge.

@umadevimcw
Copy link
Contributor

@amalbasaTT can you replace ttnn.create_sharded_memory_config with ttnn.create_sharded_memory_config_ as it is updated compared to former module?

@amalbasaTT
Copy link
Contributor Author

@umadevimcw done

@amalbasaTT amalbasaTT changed the title Amalbasa tt/unary sharded sweeps 2 Add unary sharded sweeps Nov 29, 2024
@amalbasaTT amalbasaTT force-pushed the amalbasaTT/unary_sharded-sweeps-2 branch 2 times, most recently from f44a51f to 154f292 Compare December 2, 2024 16:34
@amalbasaTT amalbasaTT force-pushed the amalbasaTT/unary_sharded-sweeps-2 branch 3 times, most recently from e68aeba to c2dfe37 Compare December 3, 2024 13:47
@amalbasaTT
Copy link
Contributor Author

@mywoodstock Could you take a look at changes done to create_sharded_memory_config_ inside ttnn/ttnn/core.py?

@amalbasaTT amalbasaTT force-pushed the amalbasaTT/unary_sharded-sweeps-2 branch from c9089c4 to 06caf1d Compare December 23, 2024 09:12
@amalbasaTT amalbasaTT merged commit 98b7a42 into main Dec 23, 2024
31 of 37 checks passed
@amalbasaTT amalbasaTT deleted the amalbasaTT/unary_sharded-sweeps-2 branch December 23, 2024 11:22
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.

6 participants