Repository navigation
Closes #3568: Update flatten_benchmark - #4611
Merged
Merged
Conversation
ajpotts
force-pushed
the
3568_Update_flatten_benchmark
branch
6 times, most recently
from
June 20, 2025 17:19
bfa0eb8 to
83d8c5f
Compare
ajpotts
marked this pull request as ready for review
June 20, 2025 18:45
1RyanK
approved these changes
Jun 30, 2025
1RyanK
left a comment
Contributor
There was a problem hiding this comment.
Looks good! I suspect the current flatten will work well on (2, N // 2), decently on square, and probably not that well on the other.
ajpotts
force-pushed
the
3568_Update_flatten_benchmark
branch
from
June 30, 2025 15:50
83d8c5f to
6e14164
Compare
ajpotts
commented
Jul 1, 2025
ajpotts
force-pushed
the
3568_Update_flatten_benchmark
branch
from
July 7, 2025 13:50
6e14164 to
c9e7fcc
Compare
vasslitvinov
reviewed
Jul 7, 2025
vasslitvinov
reviewed
Jul 7, 2025
vasslitvinov
reviewed
Jul 7, 2025
vasslitvinov
approved these changes
Jul 7, 2025
vasslitvinov
left a comment
Contributor
There was a problem hiding this comment.
I would like to double-check that producing the test data arr2d using reshape is adequate. In other words, ensure that reshape does not create a peculiar internal representation for the array that 2-d arrays would usually not have, therefore skewing performance results.
ajpotts
force-pushed
the
3568_Update_flatten_benchmark
branch
from
July 8, 2025 13:40
c9e7fcc to
e4741c3
Compare
ajpotts
enabled auto-merge
July 8, 2025 18:15
1RyanK
approved these changes
Jul 8, 2025
ajpotts
added this pull request to the merge queue
Jul 8, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR: Add
flattenBenchmark to Mimic NumPy'sflattenBehaviorThis PR introduces a new benchmark for
ak.flattenthat mimics the behavior ofnp.flatten, i.e., flattening a reshaped 2D array into 1D.✅ Key Features
NumPy-Style Flattening
ak.flattenon a reshaped(M, N)2D array created from a 1D Arkouda array.np.flatten().Supports Multiple Dtypes
int64,float64, andbooldtypes.Correctness Verification (
--correctness_only)np.flatten()usingnp.testing.assert_array_equal.Scalable Benchmarking
10**4when--correctness_onlyis used.pedantic(...)with transfer rate calculation inGiB/sec.🧪 Benchmark Group
Benchmarks are grouped under:
@benchmark(group="AK_flatten")