Skip to content

Conversation

@cbourjau
Copy link
Collaborator

@cbourjau cbourjau commented Aug 12, 2025

This PR implements repeat for all built-in data types. This is possible since the implementation only relies on other high-level APIs instead of the underlying layout. We used to have an implementation for ndonnx.repeat before, but it got lost during the refactoring leading up to 0.10.0. The previous implementation used searchsorted while this one uses broadcasting and reshaping. Either has compromises. The earlier one was likely heavier on the CPU, while this one may be more memory hungry in some circumstances. My gut feeling is that this implementation is the better compromise.

The change to the array-api-tests is due to this upstream issue: data-apis/array-api-tests#388

@justinchuby

@cbourjau cbourjau merged commit 1701ed7 into main Aug 13, 2025
39 checks passed
@cbourjau cbourjau deleted the reimplement-repeat branch August 13, 2025 21:15
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.

3 participants