Skip to content

Commit 7c60522

Browse files
committed
Disable MLXFastKernel on Linux (needs new implementation)
1 parent b8beaaa commit 7c60522

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Libraries/MLXLLM/Models/SSM.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public func computeDt(_ dt: MLXArray, _ dtBias: MLXArray, _ timeStepLimit: (Floa
1818
return MLX.clip(dt, min: timeStepLimit.0, max: timeStepLimit.1)
1919
}
2020

21-
#if canImport(MLXFast)
21+
#if os(macOS) || os(iOS) | | os(tvOS) | | os(watchOS) || os(visionOS)
2222
private func makeSSMKernel() -> MLXFast.MLXFastKernel? {
2323
let source = """
2424
auto n = thread_position_in_grid.z;
@@ -87,7 +87,7 @@ public func computeDt(_ dt: MLXArray, _ dtBias: MLXArray, _ timeStepLimit: (Floa
8787
}
8888
#endif
8989

90-
#if canImport(MLXFast)
90+
#if os(macOS) || os(iOS) | | os(tvOS) | | os(watchOS) || os(visionOS)
9191
func ssmUpdateKernel(
9292
hiddenStates: MLXArray,
9393
ALog: MLXArray,

Libraries/MLXLMCommon/InterpolationUtils.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Foundation
1111
import MLX
1212

1313
// MARK: - Kernel Sources
14-
14+
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(visionOS)
1515
private func makeBicubicInterpolationKernel() -> MLXFast.MLXFastKernel {
1616
let header = """
1717
// Bicubic kernel function
@@ -452,3 +452,4 @@ public func nearestInterpolate(
452452
) -> MLXArray {
453453
nearestInterpolate(x, scaleFactor: (scaleFactor, scaleFactor))
454454
}
455+
#endif

0 commit comments

Comments
 (0)