-
Notifications
You must be signed in to change notification settings - Fork 117
adopt mlx 0.29.1 and related mlx-c #273
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
base: main
Are you sure you want to change the base?
Conversation
"mlx/mlx/backend/metal/no_metal.cpp", | ||
|
||
// special handling for cuda -- we need to keep one file: | ||
// mlx/mlx/backend/cuda/no_cuda.cpp |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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] { |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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]) |
There was a problem hiding this comment.
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.
Still needed: