Skip to content

Conversation

davidkoski
Copy link
Collaborator

Still needed:

  • tags for mlx-c
  • upate Cmake build

@davidkoski davidkoski requested a review from awni September 24, 2025 20:48
"mlx/mlx/backend/metal/no_metal.cpp",

// special handling for cuda -- we need to keep one file:
// mlx/mlx/backend/cuda/no_cuda.cpp
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a little more complicated than I wish, but we can't exclude the directory + include one file, so I need to just list them.

/// - ``asArray(_:)``
/// - ``asData(access:)``
public func asMTLBuffer(device: any MTLDevice, noCopy: Bool = false) -> (any MTLBuffer)? {
let data = asData(access: noCopy ? .noCopyIfContiguous : .copy)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

From #259 -- this line is unused.


// If it's just a simple slice, just do a slice update and return
if operations.count == 1, case let .slice(slice) = operations[0] {
if operations.count == 1, case .slice(let slice) = operations[0] {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just the new swift-format.

/// - values: values with shape `[B, N_kv, T_kv, D]`
/// - scale: scale for queries, typically `1 / sqrt(q.dim(-1))`
/// - mask: mask array
/// - sinks: optional array of attention sinks
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

New optional argument

}

let x = MLXArray(1)
let x = MLXArray([1])
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was incorrect before -- a dimensionless parameter is not the same as a shaped array. Now it throws as the back end rejects it.

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.

1 participant