Skip to content

Fixes for large arrays with a few ops - #1299

Merged
awni merged 3 commits into
mainfrom
fix_softmax
Jul 31, 2024
Merged

awni merged 3 commits into
mainfrom
fix_softmax

Conversation

@awni

@awni awni commented Jul 30, 2024

Copy link
Copy Markdown
Member

Fixes for arrays with more than UINT32_MAX elements. (Corresponding tests in long running nightly tests clear).

  • softmax
  • RMS norm + VJP
  • Layer norm + VJP
  • Unary
  • Binary and binary two
  • Ternary
  • Copy

@awni
awni requested review from angeloskath, barronalex and jagrit06 and removed request for angeloskath and barronalex July 30, 2024 21:49

@angeloskath angeloskath left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Awesome!

Just as an aside, there is still the case that data_size / axis_size > UINT32_MAX which will fail as well as the n_rows * threadgroup_size > UINT32_MAX which will also fail. Obviously these are quite a bit rarer cases so we should merge this as is.

@awni

awni commented Jul 30, 2024

Copy link
Copy Markdown
Member Author

Indeed.. it's far from bullet proof. I think also the non-contiguous versions may still be broken in some cases. For example when we collapse contiguous dimension if the resulting dimension is > UINT_MAX.

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.

2 participants