Skip to content

Conversation

mattt
Copy link
Collaborator

@mattt mattt commented Sep 17, 2025

TensorUtils contains a handful of utilities for working with Core ML types, along with some math functions that wrap Accelerate APIs. These are used exclusively by the Generation module, so it makes sense to put them there instead of declaring them in a separate module.

The one exception I found was Weights & Safetensors. I decided to move that under Models, since that seemed to be a better home for it (but I'm very open to alternative suggestions).

In the process of doing that, this PR also reorganized targets so that each library target (exported or not) has a corresponding test target (e.g., Models -> ModelsTests).

These changes are purely for our own benefit, since none of these targets are exported by / products of the package. So this is entirely motivated by my own preference for 1:1 correspondence between library and test target, and a vague dispreference for "Utils" modules.

@mattt mattt requested a review from pcuenca September 17, 2025 13:57
@mattt mattt force-pushed the mattt/consolidate-tensorutils branch from 4a856a9 to d77f66f Compare September 17, 2025 14:03
Copy link
Member

@pcuenca pcuenca left a comment

Choose a reason for hiding this comment

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

Makes sense to me, yes.

@pcuenca pcuenca added the v1.0 label Sep 17, 2025
@mattt mattt merged commit 69de809 into main Sep 17, 2025
2 checks passed
@mattt mattt deleted the mattt/consolidate-tensorutils branch September 17, 2025 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants