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

fix: 2881 akconcatenate fails trying to concatenate too many nested arrays #3207

Conversation

tcawlfield
Copy link
Collaborator

When concatenating arrays at a depth > 0 (not outermost), current code has a limitation
of 128 arrays to be combined.

This PR relaxes that requirement.

This breaks a bunch of old tests, but passes the
original test in 2881. Needs scrutiny etc.
Expanding the template instances for:
* awkward_UnionArray_nestedfill_tags_index
* awkward_UnionArray_simplify_one
* awkward_UnionArray_simplify
These allow 64-bit tags in certain cases, for ak_concatenate.
@tcawlfield tcawlfield linked an issue Aug 7, 2024 that may be closed by this pull request
@tcawlfield tcawlfield self-assigned this Aug 7, 2024
@tcawlfield tcawlfield requested a review from jpivarski August 7, 2024 19:09
Copy link
Member

@jpivarski jpivarski left a comment

Choose a reason for hiding this comment

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

This is looking good!

One thing that's missing is for UnionArray.simplified to document that it accepts 64-bit tags, but if the final result would be to make a UnionArray with more than more than 127 contents, it still raises an error. (And also, that check needs to be implemented.)

src/awkward/contents/unionarray.py Outdated Show resolved Hide resolved
src/awkward/operations/ak_concatenate.py Outdated Show resolved Hide resolved
src/awkward/operations/ak_concatenate.py Outdated Show resolved Hide resolved
Also a few style modifications.
The reason for moving those length checks
is so that I do not wish even temporarily hold on
to content tags with invalid data.
Copy link
Collaborator

@ianna ianna left a comment

Choose a reason for hiding this comment

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

@tcawlfield - looks great to me! All CUDA tests pass as expected! Thanks!

@tcawlfield tcawlfield marked this pull request as ready for review August 8, 2024 18:36
@tcawlfield tcawlfield merged commit af232f5 into main Aug 8, 2024
40 checks passed
@tcawlfield tcawlfield deleted the 2881-akconcatenate-fails-trying-to-concatenate-too-many-nested-arrays branch August 8, 2024 18:40
@agoose77
Copy link
Collaborator

agoose77 commented Aug 9, 2024

This is fantastic @tcawlfield !

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.

ak.concatenate fails trying to concatenate too many nested arrays
4 participants