The Swift Package Index logo.Swift Package Index

Build Information

Successful build of MetalHLO, reference main (cfec83), with Swift 6.3 for macOS (SPM) on 13 May 2026 20:54:10 UTC.

Swift 6 data race errors: 0

Build Command

env DEVELOPER_DIR=/Applications/Xcode-26.4.0.app xcrun swift build --arch arm64

Build Log

888 |         commandBuffer.addCompletedHandler { buffer in
889 |             if let error = buffer.error {
890 |                 completion(.failure(IntegratedExecutorError.executionFailed(error.localizedDescription)))
    |                 |- warning: capture of 'completion' with non-Sendable type '(Result<ExecutionResult, any Error>) -> Void' in a '@Sendable' closure [#SendableClosureCaptures]
    |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
891 |                 return
892 |             }
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/LayerAccumulationBuffer.swift:132:27: warning: result of call to 'withUnsafeBytes' is unused [#no-usage]
130 |             // Copy from Data
131 |             let dst = buffer.contents().advanced(by: offset)
132 |             snapshot.data.withUnsafeBytes { ptr in
    |                           `- warning: result of call to 'withUnsafeBytes' is unused [#no-usage]
133 |                 memcpy(dst, ptr.baseAddress!, min(ptr.count, config.snapshotBytes))
134 |             }
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/NeuralEngineTargeting.swift:933:13: warning: initialization of immutable value 'opMap' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 931 |         function: HLOFunction
 932 |     ) -> Int {
 933 |         let opMap = Dictionary(uniqueKeysWithValues: function.operations.map { ($0.result, $0) })
     |             `- warning: initialization of immutable value 'opMap' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 934 |         let partitionOpSet = Set(partition.operationIds)
 935 |         let partitionOps = function.operations.filter { partitionOpSet.contains($0.result) }
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[331/427] Compiling MLX Factory.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/IntegratedExecutor.swift:337:17: warning: capture of 'completion' with non-Sendable type '(Result<ExecutionResult, any Error>) -> Void' in a '@Sendable' closure [#SendableClosureCaptures]
335 |
336 |             if let error = buffer.error {
337 |                 completion(.failure(IntegratedExecutorError.executionFailed(error.localizedDescription)))
    |                 |- warning: capture of 'completion' with non-Sendable type '(Result<ExecutionResult, any Error>) -> Void' in a '@Sendable' closure [#SendableClosureCaptures]
    |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
338 |                 return
339 |             }
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/IntegratedExecutor.swift:352:36: warning: reference to captured var 'kernelTimings' in concurrently-executing code [#SendableClosureCaptures]
350 |                     outputs: outputs,
351 |                     executionTimeMs: executionTimeMs,
352 |                     kernelTimings: kernelTimings
    |                                    `- warning: reference to captured var 'kernelTimings' in concurrently-executing code [#SendableClosureCaptures]
353 |                 )
354 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/IntegratedExecutor.swift:890:17: warning: capture of 'completion' with non-Sendable type '(Result<ExecutionResult, any Error>) -> Void' in a '@Sendable' closure [#SendableClosureCaptures]
888 |         commandBuffer.addCompletedHandler { buffer in
889 |             if let error = buffer.error {
890 |                 completion(.failure(IntegratedExecutorError.executionFailed(error.localizedDescription)))
    |                 |- warning: capture of 'completion' with non-Sendable type '(Result<ExecutionResult, any Error>) -> Void' in a '@Sendable' closure [#SendableClosureCaptures]
    |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
891 |                 return
892 |             }
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/LayerAccumulationBuffer.swift:132:27: warning: result of call to 'withUnsafeBytes' is unused [#no-usage]
130 |             // Copy from Data
131 |             let dst = buffer.contents().advanced(by: offset)
132 |             snapshot.data.withUnsafeBytes { ptr in
    |                           `- warning: result of call to 'withUnsafeBytes' is unused [#no-usage]
133 |                 memcpy(dst, ptr.baseAddress!, min(ptr.count, config.snapshotBytes))
134 |             }
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/NeuralEngineTargeting.swift:933:13: warning: initialization of immutable value 'opMap' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 931 |         function: HLOFunction
 932 |     ) -> Int {
 933 |         let opMap = Dictionary(uniqueKeysWithValues: function.operations.map { ($0.result, $0) })
     |             `- warning: initialization of immutable value 'opMap' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 934 |         let partitionOpSet = Set(partition.operationIds)
 935 |         let partitionOps = function.operations.filter { partitionOpSet.contains($0.result) }
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[332/427] Compiling MLX MLXArray+Normalizer.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/CrossLayerFusion.swift:528:13: warning: variable 'sorted' was never mutated; consider changing to 'let' constant
526 |     private func sortAndFilterMatches(_ matches: [CrossLayerMatch]) -> [CrossLayerMatch] {
527 |         // Sort by size (larger fusions first)
528 |         var sorted = matches.sorted { $0.operationIndices.count > $1.operationIndices.count }
    |             `- warning: variable 'sorted' was never mutated; consider changing to 'let' constant
529 |
530 |         // Filter overlapping matches
[333/427] Compiling MLX MLXArray+Ops.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/CrossLayerFusion.swift:528:13: warning: variable 'sorted' was never mutated; consider changing to 'let' constant
526 |     private func sortAndFilterMatches(_ matches: [CrossLayerMatch]) -> [CrossLayerMatch] {
527 |         // Sort by size (larger fusions first)
528 |         var sorted = matches.sorted { $0.operationIndices.count > $1.operationIndices.count }
    |             `- warning: variable 'sorted' was never mutated; consider changing to 'let' constant
529 |
530 |         // Filter overlapping matches
[334/427] Compiling MLX MLXArray.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/CrossLayerFusion.swift:528:13: warning: variable 'sorted' was never mutated; consider changing to 'let' constant
526 |     private func sortAndFilterMatches(_ matches: [CrossLayerMatch]) -> [CrossLayerMatch] {
527 |         // Sort by size (larger fusions first)
528 |         var sorted = matches.sorted { $0.operationIndices.count > $1.operationIndices.count }
    |             `- warning: variable 'sorted' was never mutated; consider changing to 'let' constant
529 |
530 |         // Filter overlapping matches
[335/427] Compiling MLX MLXCustomFunction.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/CrossLayerFusion.swift:528:13: warning: variable 'sorted' was never mutated; consider changing to 'let' constant
526 |     private func sortAndFilterMatches(_ matches: [CrossLayerMatch]) -> [CrossLayerMatch] {
527 |         // Sort by size (larger fusions first)
528 |         var sorted = matches.sorted { $0.operationIndices.count > $1.operationIndices.count }
    |             `- warning: variable 'sorted' was never mutated; consider changing to 'let' constant
529 |
530 |         // Filter overlapping matches
[336/427] Compiling MetalHLOCore BufferAssignment.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/CrossLayerFusion.swift:528:13: warning: variable 'sorted' was never mutated; consider changing to 'let' constant
526 |     private func sortAndFilterMatches(_ matches: [CrossLayerMatch]) -> [CrossLayerMatch] {
527 |         // Sort by size (larger fusions first)
528 |         var sorted = matches.sorted { $0.operationIndices.count > $1.operationIndices.count }
    |             `- warning: variable 'sorted' was never mutated; consider changing to 'let' constant
529 |
530 |         // Filter overlapping matches
[337/427] Compiling MetalHLOCore Canonicalizers.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/CrossLayerFusion.swift:528:13: warning: variable 'sorted' was never mutated; consider changing to 'let' constant
526 |     private func sortAndFilterMatches(_ matches: [CrossLayerMatch]) -> [CrossLayerMatch] {
527 |         // Sort by size (larger fusions first)
528 |         var sorted = matches.sorted { $0.operationIndices.count > $1.operationIndices.count }
    |             `- warning: variable 'sorted' was never mutated; consider changing to 'let' constant
529 |
530 |         // Filter overlapping matches
[338/427] Compiling MetalHLOCore CostModel.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/CrossLayerFusion.swift:528:13: warning: variable 'sorted' was never mutated; consider changing to 'let' constant
526 |     private func sortAndFilterMatches(_ matches: [CrossLayerMatch]) -> [CrossLayerMatch] {
527 |         // Sort by size (larger fusions first)
528 |         var sorted = matches.sorted { $0.operationIndices.count > $1.operationIndices.count }
    |             `- warning: variable 'sorted' was never mutated; consider changing to 'let' constant
529 |
530 |         // Filter overlapping matches
[339/427] Compiling MetalHLOCore CrossLayerFusion.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/CrossLayerFusion.swift:528:13: warning: variable 'sorted' was never mutated; consider changing to 'let' constant
526 |     private func sortAndFilterMatches(_ matches: [CrossLayerMatch]) -> [CrossLayerMatch] {
527 |         // Sort by size (larger fusions first)
528 |         var sorted = matches.sorted { $0.operationIndices.count > $1.operationIndices.count }
    |             `- warning: variable 'sorted' was never mutated; consider changing to 'let' constant
529 |
530 |         // Filter overlapping matches
[340/427] Compiling MetalHLOCore FusionPatterns.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/FusionPatterns.swift:1055:13: warning: variable 'foundSquare' was written to, but never read
1053 |
1054 |         var foundRsqrt = false
1055 |         var foundSquare = false
     |             `- warning: variable 'foundSquare' was written to, but never read
1056 |         var foundReduce = false
1057 |         var foundMeanSubtract = false  // Should NOT be present for RMSNorm
[341/427] Compiling MetalHLOCore HLOOptimizer.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/FusionPatterns.swift:1055:13: warning: variable 'foundSquare' was written to, but never read
1053 |
1054 |         var foundRsqrt = false
1055 |         var foundSquare = false
     |             `- warning: variable 'foundSquare' was written to, but never read
1056 |         var foundReduce = false
1057 |         var foundMeanSubtract = false  // Should NOT be present for RMSNorm
[342/427] Compiling MetalHLOCore HLOPattern.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/FusionPatterns.swift:1055:13: warning: variable 'foundSquare' was written to, but never read
1053 |
1054 |         var foundRsqrt = false
1055 |         var foundSquare = false
     |             `- warning: variable 'foundSquare' was written to, but never read
1056 |         var foundReduce = false
1057 |         var foundMeanSubtract = false  // Should NOT be present for RMSNorm
[343/427] Compiling MetalHLOCore HorizontalFusion.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/FusionPatterns.swift:1055:13: warning: variable 'foundSquare' was written to, but never read
1053 |
1054 |         var foundRsqrt = false
1055 |         var foundSquare = false
     |             `- warning: variable 'foundSquare' was written to, but never read
1056 |         var foundReduce = false
1057 |         var foundMeanSubtract = false  // Should NOT be present for RMSNorm
[344/427] Compiling MetalHLOCore LayoutAssignment.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/FusionPatterns.swift:1055:13: warning: variable 'foundSquare' was written to, but never read
1053 |
1054 |         var foundRsqrt = false
1055 |         var foundSquare = false
     |             `- warning: variable 'foundSquare' was written to, but never read
1056 |         var foundReduce = false
1057 |         var foundMeanSubtract = false  // Should NOT be present for RMSNorm
[345/427] Compiling MetalHLOCore ProducerConsumerFusion.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/FusionPatterns.swift:1055:13: warning: variable 'foundSquare' was written to, but never read
1053 |
1054 |         var foundRsqrt = false
1055 |         var foundSquare = false
     |             `- warning: variable 'foundSquare' was written to, but never read
1056 |         var foundReduce = false
1057 |         var foundMeanSubtract = false  // Should NOT be present for RMSNorm
[346/427] Compiling MetalHLOCore ProfileGuidedOptimization.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/FusionPatterns.swift:1055:13: warning: variable 'foundSquare' was written to, but never read
1053 |
1054 |         var foundRsqrt = false
1055 |         var foundSquare = false
     |             `- warning: variable 'foundSquare' was written to, but never read
1056 |         var foundReduce = false
1057 |         var foundMeanSubtract = false  // Should NOT be present for RMSNorm
[347/427] Compiling MetalHLOCore QuantizationAware.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/FusionPatterns.swift:1055:13: warning: variable 'foundSquare' was written to, but never read
1053 |
1054 |         var foundRsqrt = false
1055 |         var foundSquare = false
     |             `- warning: variable 'foundSquare' was written to, but never read
1056 |         var foundReduce = false
1057 |         var foundMeanSubtract = false  // Should NOT be present for RMSNorm
[348/427] Compiling MetalHLOCore StridedTensorView.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:162:20: warning: value 'offset' was defined but never used; consider replacing with boolean test [#no-usage]
160 |         var outputBuffers: [String: MTLBuffer] = [:]
161 |         for (i, returnValue) in function.returnValues.enumerated() {
162 |             if let offset = memoryPlan.tensorOffsets[returnValue] {
    |                    `- warning: value 'offset' was defined but never used; consider replacing with boolean test [#no-usage]
163 |                 // Output is in unified buffer - create a view or copy
164 |                 let outputType = function.outputTypes[i]
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:300:17: warning: capture of 'completion' with non-Sendable type '([String : any MTLBuffer]) -> Void' in a '@Sendable' closure [#SendableClosureCaptures]
298 |
299 |             commandBuffer.addCompletedHandler { [weak self] _ in
300 |                 completion(outputBuffers)
    |                 |- warning: capture of 'completion' with non-Sendable type '([String : any MTLBuffer]) -> Void' in a '@Sendable' closure [#SendableClosureCaptures]
    |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
301 |                 self?.inflightSemaphore.signal()
302 |                 dispatchGroup.leave()
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:300:28: warning: capture of 'outputBuffers' with non-Sendable type '[String : any MTLBuffer]' in a '@Sendable' closure [#SendableClosureCaptures]
298 |
299 |             commandBuffer.addCompletedHandler { [weak self] _ in
300 |                 completion(outputBuffers)
    |                            `- warning: capture of 'outputBuffers' with non-Sendable type '[String : any MTLBuffer]' in a '@Sendable' closure [#SendableClosureCaptures]
301 |                 self?.inflightSemaphore.signal()
302 |                 dispatchGroup.leave()
/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.4.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBuffer.h:34:11: note: protocol 'MTLBuffer' does not conform to the 'Sendable' protocol
 32 |  */
 33 | API_AVAILABLE(macos(10.11), ios(8.0))
 34 | @protocol MTLBuffer <MTLResource>
    |           `- note: protocol 'MTLBuffer' does not conform to the 'Sendable' protocol
 35 |
 36 | /*!
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:8:1: warning: add '@preconcurrency' to treat 'Sendable'-related errors from module 'Metal' as warnings
  6 |
  7 | import Foundation
  8 | import Metal
    | `- warning: add '@preconcurrency' to treat 'Sendable'-related errors from module 'Metal' as warnings
  9 |
 10 | // MARK: - Execution Context
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:300:28: warning: reference to captured var 'outputBuffers' in concurrently-executing code [#SendableClosureCaptures]
298 |
299 |             commandBuffer.addCompletedHandler { [weak self] _ in
300 |                 completion(outputBuffers)
    |                            `- warning: reference to captured var 'outputBuffers' in concurrently-executing code [#SendableClosureCaptures]
301 |                 self?.inflightSemaphore.signal()
302 |                 dispatchGroup.leave()
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:258:48: warning: 'outputBuffers' mutated after capture by sendable closure
252 |
253 |             // Create output buffers
254 |             var outputBuffers: [String: MTLBuffer] = [:]
    |                 `- note: variable defined here
255 |             for (i, returnValue) in function.returnValues.enumerated() {
256 |                 let outputType = function.outputTypes[i]
257 |                 if let outputBuffer = device.makeBuffer(length: outputType.byteCount, options: .storageModeShared) {
258 |                     outputBuffers[returnValue] = outputBuffer
    |                                                `- warning: 'outputBuffers' mutated after capture by sendable closure
259 |                 }
260 |             }
    :
297 |             }
298 |
299 |             commandBuffer.addCompletedHandler { [weak self] _ in
    |                                               `- note: variable captured by sendable closure
300 |                 completion(outputBuffers)
    |                            `- note: capturing use
301 |                 self?.inflightSemaphore.signal()
302 |                 dispatchGroup.leave()
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[349/427] Compiling MetalHLOCore SubFunctionExtractor.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:162:20: warning: value 'offset' was defined but never used; consider replacing with boolean test [#no-usage]
160 |         var outputBuffers: [String: MTLBuffer] = [:]
161 |         for (i, returnValue) in function.returnValues.enumerated() {
162 |             if let offset = memoryPlan.tensorOffsets[returnValue] {
    |                    `- warning: value 'offset' was defined but never used; consider replacing with boolean test [#no-usage]
163 |                 // Output is in unified buffer - create a view or copy
164 |                 let outputType = function.outputTypes[i]
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:300:17: warning: capture of 'completion' with non-Sendable type '([String : any MTLBuffer]) -> Void' in a '@Sendable' closure [#SendableClosureCaptures]
298 |
299 |             commandBuffer.addCompletedHandler { [weak self] _ in
300 |                 completion(outputBuffers)
    |                 |- warning: capture of 'completion' with non-Sendable type '([String : any MTLBuffer]) -> Void' in a '@Sendable' closure [#SendableClosureCaptures]
    |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
301 |                 self?.inflightSemaphore.signal()
302 |                 dispatchGroup.leave()
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:300:28: warning: capture of 'outputBuffers' with non-Sendable type '[String : any MTLBuffer]' in a '@Sendable' closure [#SendableClosureCaptures]
298 |
299 |             commandBuffer.addCompletedHandler { [weak self] _ in
300 |                 completion(outputBuffers)
    |                            `- warning: capture of 'outputBuffers' with non-Sendable type '[String : any MTLBuffer]' in a '@Sendable' closure [#SendableClosureCaptures]
301 |                 self?.inflightSemaphore.signal()
302 |                 dispatchGroup.leave()
/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.4.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBuffer.h:34:11: note: protocol 'MTLBuffer' does not conform to the 'Sendable' protocol
 32 |  */
 33 | API_AVAILABLE(macos(10.11), ios(8.0))
 34 | @protocol MTLBuffer <MTLResource>
    |           `- note: protocol 'MTLBuffer' does not conform to the 'Sendable' protocol
 35 |
 36 | /*!
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:8:1: warning: add '@preconcurrency' to treat 'Sendable'-related errors from module 'Metal' as warnings
  6 |
  7 | import Foundation
  8 | import Metal
    | `- warning: add '@preconcurrency' to treat 'Sendable'-related errors from module 'Metal' as warnings
  9 |
 10 | // MARK: - Execution Context
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:300:28: warning: reference to captured var 'outputBuffers' in concurrently-executing code [#SendableClosureCaptures]
298 |
299 |             commandBuffer.addCompletedHandler { [weak self] _ in
300 |                 completion(outputBuffers)
    |                            `- warning: reference to captured var 'outputBuffers' in concurrently-executing code [#SendableClosureCaptures]
301 |                 self?.inflightSemaphore.signal()
302 |                 dispatchGroup.leave()
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:258:48: warning: 'outputBuffers' mutated after capture by sendable closure
252 |
253 |             // Create output buffers
254 |             var outputBuffers: [String: MTLBuffer] = [:]
    |                 `- note: variable defined here
255 |             for (i, returnValue) in function.returnValues.enumerated() {
256 |                 let outputType = function.outputTypes[i]
257 |                 if let outputBuffer = device.makeBuffer(length: outputType.byteCount, options: .storageModeShared) {
258 |                     outputBuffers[returnValue] = outputBuffer
    |                                                `- warning: 'outputBuffers' mutated after capture by sendable closure
259 |                 }
260 |             }
    :
297 |             }
298 |
299 |             commandBuffer.addCompletedHandler { [weak self] _ in
    |                                               `- note: variable captured by sendable closure
300 |                 completion(outputBuffers)
    |                            `- note: capturing use
301 |                 self?.inflightSemaphore.signal()
302 |                 dispatchGroup.leave()
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[350/427] Compiling MetalHLOCore TensorTransferManager.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:162:20: warning: value 'offset' was defined but never used; consider replacing with boolean test [#no-usage]
160 |         var outputBuffers: [String: MTLBuffer] = [:]
161 |         for (i, returnValue) in function.returnValues.enumerated() {
162 |             if let offset = memoryPlan.tensorOffsets[returnValue] {
    |                    `- warning: value 'offset' was defined but never used; consider replacing with boolean test [#no-usage]
163 |                 // Output is in unified buffer - create a view or copy
164 |                 let outputType = function.outputTypes[i]
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:300:17: warning: capture of 'completion' with non-Sendable type '([String : any MTLBuffer]) -> Void' in a '@Sendable' closure [#SendableClosureCaptures]
298 |
299 |             commandBuffer.addCompletedHandler { [weak self] _ in
300 |                 completion(outputBuffers)
    |                 |- warning: capture of 'completion' with non-Sendable type '([String : any MTLBuffer]) -> Void' in a '@Sendable' closure [#SendableClosureCaptures]
    |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
301 |                 self?.inflightSemaphore.signal()
302 |                 dispatchGroup.leave()
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:300:28: warning: capture of 'outputBuffers' with non-Sendable type '[String : any MTLBuffer]' in a '@Sendable' closure [#SendableClosureCaptures]
298 |
299 |             commandBuffer.addCompletedHandler { [weak self] _ in
300 |                 completion(outputBuffers)
    |                            `- warning: capture of 'outputBuffers' with non-Sendable type '[String : any MTLBuffer]' in a '@Sendable' closure [#SendableClosureCaptures]
301 |                 self?.inflightSemaphore.signal()
302 |                 dispatchGroup.leave()
/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.4.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBuffer.h:34:11: note: protocol 'MTLBuffer' does not conform to the 'Sendable' protocol
 32 |  */
 33 | API_AVAILABLE(macos(10.11), ios(8.0))
 34 | @protocol MTLBuffer <MTLResource>
    |           `- note: protocol 'MTLBuffer' does not conform to the 'Sendable' protocol
 35 |
 36 | /*!
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:8:1: warning: add '@preconcurrency' to treat 'Sendable'-related errors from module 'Metal' as warnings
  6 |
  7 | import Foundation
  8 | import Metal
    | `- warning: add '@preconcurrency' to treat 'Sendable'-related errors from module 'Metal' as warnings
  9 |
 10 | // MARK: - Execution Context
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:300:28: warning: reference to captured var 'outputBuffers' in concurrently-executing code [#SendableClosureCaptures]
298 |
299 |             commandBuffer.addCompletedHandler { [weak self] _ in
300 |                 completion(outputBuffers)
    |                            `- warning: reference to captured var 'outputBuffers' in concurrently-executing code [#SendableClosureCaptures]
301 |                 self?.inflightSemaphore.signal()
302 |                 dispatchGroup.leave()
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:258:48: warning: 'outputBuffers' mutated after capture by sendable closure
252 |
253 |             // Create output buffers
254 |             var outputBuffers: [String: MTLBuffer] = [:]
    |                 `- note: variable defined here
255 |             for (i, returnValue) in function.returnValues.enumerated() {
256 |                 let outputType = function.outputTypes[i]
257 |                 if let outputBuffer = device.makeBuffer(length: outputType.byteCount, options: .storageModeShared) {
258 |                     outputBuffers[returnValue] = outputBuffer
    |                                                `- warning: 'outputBuffers' mutated after capture by sendable closure
259 |                 }
260 |             }
    :
297 |             }
298 |
299 |             commandBuffer.addCompletedHandler { [weak self] _ in
    |                                               `- note: variable captured by sendable closure
300 |                 completion(outputBuffers)
    |                            `- note: capturing use
301 |                 self?.inflightSemaphore.signal()
302 |                 dispatchGroup.leave()
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[351/427] Compiling MetalHLOCore ZeroAllocExecutor.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:162:20: warning: value 'offset' was defined but never used; consider replacing with boolean test [#no-usage]
160 |         var outputBuffers: [String: MTLBuffer] = [:]
161 |         for (i, returnValue) in function.returnValues.enumerated() {
162 |             if let offset = memoryPlan.tensorOffsets[returnValue] {
    |                    `- warning: value 'offset' was defined but never used; consider replacing with boolean test [#no-usage]
163 |                 // Output is in unified buffer - create a view or copy
164 |                 let outputType = function.outputTypes[i]
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:300:17: warning: capture of 'completion' with non-Sendable type '([String : any MTLBuffer]) -> Void' in a '@Sendable' closure [#SendableClosureCaptures]
298 |
299 |             commandBuffer.addCompletedHandler { [weak self] _ in
300 |                 completion(outputBuffers)
    |                 |- warning: capture of 'completion' with non-Sendable type '([String : any MTLBuffer]) -> Void' in a '@Sendable' closure [#SendableClosureCaptures]
    |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
301 |                 self?.inflightSemaphore.signal()
302 |                 dispatchGroup.leave()
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:300:28: warning: capture of 'outputBuffers' with non-Sendable type '[String : any MTLBuffer]' in a '@Sendable' closure [#SendableClosureCaptures]
298 |
299 |             commandBuffer.addCompletedHandler { [weak self] _ in
300 |                 completion(outputBuffers)
    |                            `- warning: capture of 'outputBuffers' with non-Sendable type '[String : any MTLBuffer]' in a '@Sendable' closure [#SendableClosureCaptures]
301 |                 self?.inflightSemaphore.signal()
302 |                 dispatchGroup.leave()
/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.4.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBuffer.h:34:11: note: protocol 'MTLBuffer' does not conform to the 'Sendable' protocol
 32 |  */
 33 | API_AVAILABLE(macos(10.11), ios(8.0))
 34 | @protocol MTLBuffer <MTLResource>
    |           `- note: protocol 'MTLBuffer' does not conform to the 'Sendable' protocol
 35 |
 36 | /*!
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:8:1: warning: add '@preconcurrency' to treat 'Sendable'-related errors from module 'Metal' as warnings
  6 |
  7 | import Foundation
  8 | import Metal
    | `- warning: add '@preconcurrency' to treat 'Sendable'-related errors from module 'Metal' as warnings
  9 |
 10 | // MARK: - Execution Context
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:300:28: warning: reference to captured var 'outputBuffers' in concurrently-executing code [#SendableClosureCaptures]
298 |
299 |             commandBuffer.addCompletedHandler { [weak self] _ in
300 |                 completion(outputBuffers)
    |                            `- warning: reference to captured var 'outputBuffers' in concurrently-executing code [#SendableClosureCaptures]
301 |                 self?.inflightSemaphore.signal()
302 |                 dispatchGroup.leave()
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:258:48: warning: 'outputBuffers' mutated after capture by sendable closure
252 |
253 |             // Create output buffers
254 |             var outputBuffers: [String: MTLBuffer] = [:]
    |                 `- note: variable defined here
255 |             for (i, returnValue) in function.returnValues.enumerated() {
256 |                 let outputType = function.outputTypes[i]
257 |                 if let outputBuffer = device.makeBuffer(length: outputType.byteCount, options: .storageModeShared) {
258 |                     outputBuffers[returnValue] = outputBuffer
    |                                                `- warning: 'outputBuffers' mutated after capture by sendable closure
259 |                 }
260 |             }
    :
297 |             }
298 |
299 |             commandBuffer.addCompletedHandler { [weak self] _ in
    |                                               `- note: variable captured by sendable closure
300 |                 completion(outputBuffers)
    |                            `- note: capturing use
301 |                 self?.inflightSemaphore.signal()
302 |                 dispatchGroup.leave()
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[352/427] Compiling MetalHLOCore AutoTuner.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:162:20: warning: value 'offset' was defined but never used; consider replacing with boolean test [#no-usage]
160 |         var outputBuffers: [String: MTLBuffer] = [:]
161 |         for (i, returnValue) in function.returnValues.enumerated() {
162 |             if let offset = memoryPlan.tensorOffsets[returnValue] {
    |                    `- warning: value 'offset' was defined but never used; consider replacing with boolean test [#no-usage]
163 |                 // Output is in unified buffer - create a view or copy
164 |                 let outputType = function.outputTypes[i]
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:300:17: warning: capture of 'completion' with non-Sendable type '([String : any MTLBuffer]) -> Void' in a '@Sendable' closure [#SendableClosureCaptures]
298 |
299 |             commandBuffer.addCompletedHandler { [weak self] _ in
300 |                 completion(outputBuffers)
    |                 |- warning: capture of 'completion' with non-Sendable type '([String : any MTLBuffer]) -> Void' in a '@Sendable' closure [#SendableClosureCaptures]
    |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
301 |                 self?.inflightSemaphore.signal()
302 |                 dispatchGroup.leave()
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:300:28: warning: capture of 'outputBuffers' with non-Sendable type '[String : any MTLBuffer]' in a '@Sendable' closure [#SendableClosureCaptures]
298 |
299 |             commandBuffer.addCompletedHandler { [weak self] _ in
300 |                 completion(outputBuffers)
    |                            `- warning: capture of 'outputBuffers' with non-Sendable type '[String : any MTLBuffer]' in a '@Sendable' closure [#SendableClosureCaptures]
301 |                 self?.inflightSemaphore.signal()
302 |                 dispatchGroup.leave()
/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.4.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBuffer.h:34:11: note: protocol 'MTLBuffer' does not conform to the 'Sendable' protocol
 32 |  */
 33 | API_AVAILABLE(macos(10.11), ios(8.0))
 34 | @protocol MTLBuffer <MTLResource>
    |           `- note: protocol 'MTLBuffer' does not conform to the 'Sendable' protocol
 35 |
 36 | /*!
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:8:1: warning: add '@preconcurrency' to treat 'Sendable'-related errors from module 'Metal' as warnings
  6 |
  7 | import Foundation
  8 | import Metal
    | `- warning: add '@preconcurrency' to treat 'Sendable'-related errors from module 'Metal' as warnings
  9 |
 10 | // MARK: - Execution Context
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:300:28: warning: reference to captured var 'outputBuffers' in concurrently-executing code [#SendableClosureCaptures]
298 |
299 |             commandBuffer.addCompletedHandler { [weak self] _ in
300 |                 completion(outputBuffers)
    |                            `- warning: reference to captured var 'outputBuffers' in concurrently-executing code [#SendableClosureCaptures]
301 |                 self?.inflightSemaphore.signal()
302 |                 dispatchGroup.leave()
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:258:48: warning: 'outputBuffers' mutated after capture by sendable closure
252 |
253 |             // Create output buffers
254 |             var outputBuffers: [String: MTLBuffer] = [:]
    |                 `- note: variable defined here
255 |             for (i, returnValue) in function.returnValues.enumerated() {
256 |                 let outputType = function.outputTypes[i]
257 |                 if let outputBuffer = device.makeBuffer(length: outputType.byteCount, options: .storageModeShared) {
258 |                     outputBuffers[returnValue] = outputBuffer
    |                                                `- warning: 'outputBuffers' mutated after capture by sendable closure
259 |                 }
260 |             }
    :
297 |             }
298 |
299 |             commandBuffer.addCompletedHandler { [weak self] _ in
    |                                               `- note: variable captured by sendable closure
300 |                 completion(outputBuffers)
    |                            `- note: capturing use
301 |                 self?.inflightSemaphore.signal()
302 |                 dispatchGroup.leave()
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[353/427] Compiling MetalHLOCore TuningDatabase.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:162:20: warning: value 'offset' was defined but never used; consider replacing with boolean test [#no-usage]
160 |         var outputBuffers: [String: MTLBuffer] = [:]
161 |         for (i, returnValue) in function.returnValues.enumerated() {
162 |             if let offset = memoryPlan.tensorOffsets[returnValue] {
    |                    `- warning: value 'offset' was defined but never used; consider replacing with boolean test [#no-usage]
163 |                 // Output is in unified buffer - create a view or copy
164 |                 let outputType = function.outputTypes[i]
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:300:17: warning: capture of 'completion' with non-Sendable type '([String : any MTLBuffer]) -> Void' in a '@Sendable' closure [#SendableClosureCaptures]
298 |
299 |             commandBuffer.addCompletedHandler { [weak self] _ in
300 |                 completion(outputBuffers)
    |                 |- warning: capture of 'completion' with non-Sendable type '([String : any MTLBuffer]) -> Void' in a '@Sendable' closure [#SendableClosureCaptures]
    |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
301 |                 self?.inflightSemaphore.signal()
302 |                 dispatchGroup.leave()
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:300:28: warning: capture of 'outputBuffers' with non-Sendable type '[String : any MTLBuffer]' in a '@Sendable' closure [#SendableClosureCaptures]
298 |
299 |             commandBuffer.addCompletedHandler { [weak self] _ in
300 |                 completion(outputBuffers)
    |                            `- warning: capture of 'outputBuffers' with non-Sendable type '[String : any MTLBuffer]' in a '@Sendable' closure [#SendableClosureCaptures]
301 |                 self?.inflightSemaphore.signal()
302 |                 dispatchGroup.leave()
/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.4.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBuffer.h:34:11: note: protocol 'MTLBuffer' does not conform to the 'Sendable' protocol
 32 |  */
 33 | API_AVAILABLE(macos(10.11), ios(8.0))
 34 | @protocol MTLBuffer <MTLResource>
    |           `- note: protocol 'MTLBuffer' does not conform to the 'Sendable' protocol
 35 |
 36 | /*!
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:8:1: warning: add '@preconcurrency' to treat 'Sendable'-related errors from module 'Metal' as warnings
  6 |
  7 | import Foundation
  8 | import Metal
    | `- warning: add '@preconcurrency' to treat 'Sendable'-related errors from module 'Metal' as warnings
  9 |
 10 | // MARK: - Execution Context
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:300:28: warning: reference to captured var 'outputBuffers' in concurrently-executing code [#SendableClosureCaptures]
298 |
299 |             commandBuffer.addCompletedHandler { [weak self] _ in
300 |                 completion(outputBuffers)
    |                            `- warning: reference to captured var 'outputBuffers' in concurrently-executing code [#SendableClosureCaptures]
301 |                 self?.inflightSemaphore.signal()
302 |                 dispatchGroup.leave()
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:258:48: warning: 'outputBuffers' mutated after capture by sendable closure
252 |
253 |             // Create output buffers
254 |             var outputBuffers: [String: MTLBuffer] = [:]
    |                 `- note: variable defined here
255 |             for (i, returnValue) in function.returnValues.enumerated() {
256 |                 let outputType = function.outputTypes[i]
257 |                 if let outputBuffer = device.makeBuffer(length: outputType.byteCount, options: .storageModeShared) {
258 |                     outputBuffers[returnValue] = outputBuffer
    |                                                `- warning: 'outputBuffers' mutated after capture by sendable closure
259 |                 }
260 |             }
    :
297 |             }
298 |
299 |             commandBuffer.addCompletedHandler { [weak self] _ in
    |                                               `- note: variable captured by sendable closure
300 |                 completion(outputBuffers)
    |                            `- note: capturing use
301 |                 self?.inflightSemaphore.signal()
302 |                 dispatchGroup.leave()
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[354/427] Compiling MetalHLOCore PermutationUtils.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:162:20: warning: value 'offset' was defined but never used; consider replacing with boolean test [#no-usage]
160 |         var outputBuffers: [String: MTLBuffer] = [:]
161 |         for (i, returnValue) in function.returnValues.enumerated() {
162 |             if let offset = memoryPlan.tensorOffsets[returnValue] {
    |                    `- warning: value 'offset' was defined but never used; consider replacing with boolean test [#no-usage]
163 |                 // Output is in unified buffer - create a view or copy
164 |                 let outputType = function.outputTypes[i]
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:300:17: warning: capture of 'completion' with non-Sendable type '([String : any MTLBuffer]) -> Void' in a '@Sendable' closure [#SendableClosureCaptures]
298 |
299 |             commandBuffer.addCompletedHandler { [weak self] _ in
300 |                 completion(outputBuffers)
    |                 |- warning: capture of 'completion' with non-Sendable type '([String : any MTLBuffer]) -> Void' in a '@Sendable' closure [#SendableClosureCaptures]
    |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
301 |                 self?.inflightSemaphore.signal()
302 |                 dispatchGroup.leave()
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:300:28: warning: capture of 'outputBuffers' with non-Sendable type '[String : any MTLBuffer]' in a '@Sendable' closure [#SendableClosureCaptures]
298 |
299 |             commandBuffer.addCompletedHandler { [weak self] _ in
300 |                 completion(outputBuffers)
    |                            `- warning: capture of 'outputBuffers' with non-Sendable type '[String : any MTLBuffer]' in a '@Sendable' closure [#SendableClosureCaptures]
301 |                 self?.inflightSemaphore.signal()
302 |                 dispatchGroup.leave()
/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.4.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBuffer.h:34:11: note: protocol 'MTLBuffer' does not conform to the 'Sendable' protocol
 32 |  */
 33 | API_AVAILABLE(macos(10.11), ios(8.0))
 34 | @protocol MTLBuffer <MTLResource>
    |           `- note: protocol 'MTLBuffer' does not conform to the 'Sendable' protocol
 35 |
 36 | /*!
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:8:1: warning: add '@preconcurrency' to treat 'Sendable'-related errors from module 'Metal' as warnings
  6 |
  7 | import Foundation
  8 | import Metal
    | `- warning: add '@preconcurrency' to treat 'Sendable'-related errors from module 'Metal' as warnings
  9 |
 10 | // MARK: - Execution Context
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:300:28: warning: reference to captured var 'outputBuffers' in concurrently-executing code [#SendableClosureCaptures]
298 |
299 |             commandBuffer.addCompletedHandler { [weak self] _ in
300 |                 completion(outputBuffers)
    |                            `- warning: reference to captured var 'outputBuffers' in concurrently-executing code [#SendableClosureCaptures]
301 |                 self?.inflightSemaphore.signal()
302 |                 dispatchGroup.leave()
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/ZeroAllocExecutor.swift:258:48: warning: 'outputBuffers' mutated after capture by sendable closure
252 |
253 |             // Create output buffers
254 |             var outputBuffers: [String: MTLBuffer] = [:]
    |                 `- note: variable defined here
255 |             for (i, returnValue) in function.returnValues.enumerated() {
256 |                 let outputType = function.outputTypes[i]
257 |                 if let outputBuffer = device.makeBuffer(length: outputType.byteCount, options: .storageModeShared) {
258 |                     outputBuffers[returnValue] = outputBuffer
    |                                                `- warning: 'outputBuffers' mutated after capture by sendable closure
259 |                 }
260 |             }
    :
297 |             }
298 |
299 |             commandBuffer.addCompletedHandler { [weak self] _ in
    |                                               `- note: variable captured by sendable closure
300 |                 completion(outputBuffers)
    |                            `- note: capturing use
301 |                 self?.inflightSemaphore.signal()
302 |                 dispatchGroup.leave()
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[366/430] Emitting module MLX
[391/430] Compiling MLX Transforms+Vmap.swift
[392/430] Compiling MLX Transforms.swift
[393/430] Compiling MLX WiredMemory.swift
[394/432] Emitting module MLXRandom
[395/432] Compiling MLXRandom Random.swift
[396/432] Compiling MetalHLOCore Rematerialization.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/Rematerialization.swift:193:13: warning: initialization of immutable value 'originalMemory' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
191 |
192 |         // Compute original memory usage
193 |         let originalMemory = computePeakMemory(function, decisions: [:])
    |             `- warning: initialization of immutable value 'originalMemory' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
194 |
195 |         // Decide which tensors to rematerialize
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/Rematerialization.swift:334:14: warning: immutable value 'opIndex' was never used; consider replacing with '_' or removing it [#no-usage]
332 |         var costs: [String: RecomputationCost] = [:]
333 |
334 |         for (opIndex, op) in function.operations.enumerated() {
    |              `- warning: immutable value 'opIndex' was never used; consider replacing with '_' or removing it [#no-usage]
335 |             let memoryCost = op.resultType.byteCount
336 |             let computeCost = estimateComputeCost(op)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/Rematerialization.swift:470:13: warning: initialization of immutable value 'averageSegmentSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
468 |         // With checkpointing, only need to store activations between checkpoints
469 |         let numSegments = checkpoints.count + 1
470 |         let averageSegmentSize = function.operations.count / numSegments
    |             `- warning: initialization of immutable value 'averageSegmentSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
471 |
472 |         // Estimate memory per segment
[397/432] Compiling MetalHLOCore SiblingFusion.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/Rematerialization.swift:193:13: warning: initialization of immutable value 'originalMemory' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
191 |
192 |         // Compute original memory usage
193 |         let originalMemory = computePeakMemory(function, decisions: [:])
    |             `- warning: initialization of immutable value 'originalMemory' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
194 |
195 |         // Decide which tensors to rematerialize
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/Rematerialization.swift:334:14: warning: immutable value 'opIndex' was never used; consider replacing with '_' or removing it [#no-usage]
332 |         var costs: [String: RecomputationCost] = [:]
333 |
334 |         for (opIndex, op) in function.operations.enumerated() {
    |              `- warning: immutable value 'opIndex' was never used; consider replacing with '_' or removing it [#no-usage]
335 |             let memoryCost = op.resultType.byteCount
336 |             let computeCost = estimateComputeCost(op)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/Rematerialization.swift:470:13: warning: initialization of immutable value 'averageSegmentSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
468 |         // With checkpointing, only need to store activations between checkpoints
469 |         let numSegments = checkpoints.count + 1
470 |         let averageSegmentSize = function.operations.count / numSegments
    |             `- warning: initialization of immutable value 'averageSegmentSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
471 |
472 |         // Estimate memory per segment
[398/432] Compiling MetalHLOCore Lexer.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/Rematerialization.swift:193:13: warning: initialization of immutable value 'originalMemory' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
191 |
192 |         // Compute original memory usage
193 |         let originalMemory = computePeakMemory(function, decisions: [:])
    |             `- warning: initialization of immutable value 'originalMemory' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
194 |
195 |         // Decide which tensors to rematerialize
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/Rematerialization.swift:334:14: warning: immutable value 'opIndex' was never used; consider replacing with '_' or removing it [#no-usage]
332 |         var costs: [String: RecomputationCost] = [:]
333 |
334 |         for (opIndex, op) in function.operations.enumerated() {
    |              `- warning: immutable value 'opIndex' was never used; consider replacing with '_' or removing it [#no-usage]
335 |             let memoryCost = op.resultType.byteCount
336 |             let computeCost = estimateComputeCost(op)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/Rematerialization.swift:470:13: warning: initialization of immutable value 'averageSegmentSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
468 |         // With checkpointing, only need to store activations between checkpoints
469 |         let numSegments = checkpoints.count + 1
470 |         let averageSegmentSize = function.operations.count / numSegments
    |             `- warning: initialization of immutable value 'averageSegmentSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
471 |
472 |         // Estimate memory per segment
[399/432] Compiling MetalHLOCore ParseError.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/Rematerialization.swift:193:13: warning: initialization of immutable value 'originalMemory' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
191 |
192 |         // Compute original memory usage
193 |         let originalMemory = computePeakMemory(function, decisions: [:])
    |             `- warning: initialization of immutable value 'originalMemory' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
194 |
195 |         // Decide which tensors to rematerialize
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/Rematerialization.swift:334:14: warning: immutable value 'opIndex' was never used; consider replacing with '_' or removing it [#no-usage]
332 |         var costs: [String: RecomputationCost] = [:]
333 |
334 |         for (opIndex, op) in function.operations.enumerated() {
    |              `- warning: immutable value 'opIndex' was never used; consider replacing with '_' or removing it [#no-usage]
335 |             let memoryCost = op.resultType.byteCount
336 |             let computeCost = estimateComputeCost(op)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/Rematerialization.swift:470:13: warning: initialization of immutable value 'averageSegmentSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
468 |         // With checkpointing, only need to store activations between checkpoints
469 |         let numSegments = checkpoints.count + 1
470 |         let averageSegmentSize = function.operations.count / numSegments
    |             `- warning: initialization of immutable value 'averageSegmentSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
471 |
472 |         // Estimate memory per segment
[400/432] Compiling MetalHLOCore Parser.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/Rematerialization.swift:193:13: warning: initialization of immutable value 'originalMemory' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
191 |
192 |         // Compute original memory usage
193 |         let originalMemory = computePeakMemory(function, decisions: [:])
    |             `- warning: initialization of immutable value 'originalMemory' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
194 |
195 |         // Decide which tensors to rematerialize
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/Rematerialization.swift:334:14: warning: immutable value 'opIndex' was never used; consider replacing with '_' or removing it [#no-usage]
332 |         var costs: [String: RecomputationCost] = [:]
333 |
334 |         for (opIndex, op) in function.operations.enumerated() {
    |              `- warning: immutable value 'opIndex' was never used; consider replacing with '_' or removing it [#no-usage]
335 |             let memoryCost = op.resultType.byteCount
336 |             let computeCost = estimateComputeCost(op)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/Rematerialization.swift:470:13: warning: initialization of immutable value 'averageSegmentSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
468 |         // With checkpointing, only need to store activations between checkpoints
469 |         let numSegments = checkpoints.count + 1
470 |         let averageSegmentSize = function.operations.count / numSegments
    |             `- warning: initialization of immutable value 'averageSegmentSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
471 |
472 |         // Estimate memory per segment
[401/432] Compiling MetalHLOCore Token.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/Rematerialization.swift:193:13: warning: initialization of immutable value 'originalMemory' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
191 |
192 |         // Compute original memory usage
193 |         let originalMemory = computePeakMemory(function, decisions: [:])
    |             `- warning: initialization of immutable value 'originalMemory' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
194 |
195 |         // Decide which tensors to rematerialize
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/Rematerialization.swift:334:14: warning: immutable value 'opIndex' was never used; consider replacing with '_' or removing it [#no-usage]
332 |         var costs: [String: RecomputationCost] = [:]
333 |
334 |         for (opIndex, op) in function.operations.enumerated() {
    |              `- warning: immutable value 'opIndex' was never used; consider replacing with '_' or removing it [#no-usage]
335 |             let memoryCost = op.resultType.byteCount
336 |             let computeCost = estimateComputeCost(op)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/Rematerialization.swift:470:13: warning: initialization of immutable value 'averageSegmentSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
468 |         // With checkpointing, only need to store activations between checkpoints
469 |         let numSegments = checkpoints.count + 1
470 |         let averageSegmentSize = function.operations.count / numSegments
    |             `- warning: initialization of immutable value 'averageSegmentSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
471 |
472 |         // Estimate memory per segment
[402/432] Compiling MetalHLOCore BufferStorage.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/Rematerialization.swift:193:13: warning: initialization of immutable value 'originalMemory' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
191 |
192 |         // Compute original memory usage
193 |         let originalMemory = computePeakMemory(function, decisions: [:])
    |             `- warning: initialization of immutable value 'originalMemory' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
194 |
195 |         // Decide which tensors to rematerialize
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/Rematerialization.swift:334:14: warning: immutable value 'opIndex' was never used; consider replacing with '_' or removing it [#no-usage]
332 |         var costs: [String: RecomputationCost] = [:]
333 |
334 |         for (opIndex, op) in function.operations.enumerated() {
    |              `- warning: immutable value 'opIndex' was never used; consider replacing with '_' or removing it [#no-usage]
335 |             let memoryCost = op.resultType.byteCount
336 |             let computeCost = estimateComputeCost(op)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/Rematerialization.swift:470:13: warning: initialization of immutable value 'averageSegmentSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
468 |         // With checkpointing, only need to store activations between checkpoints
469 |         let numSegments = checkpoints.count + 1
470 |         let averageSegmentSize = function.operations.count / numSegments
    |             `- warning: initialization of immutable value 'averageSegmentSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
471 |
472 |         // Estimate memory per segment
[403/432] Compiling MetalHLOCore CompilationCache.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/Rematerialization.swift:193:13: warning: initialization of immutable value 'originalMemory' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
191 |
192 |         // Compute original memory usage
193 |         let originalMemory = computePeakMemory(function, decisions: [:])
    |             `- warning: initialization of immutable value 'originalMemory' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
194 |
195 |         // Decide which tensors to rematerialize
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/Rematerialization.swift:334:14: warning: immutable value 'opIndex' was never used; consider replacing with '_' or removing it [#no-usage]
332 |         var costs: [String: RecomputationCost] = [:]
333 |
334 |         for (opIndex, op) in function.operations.enumerated() {
    |              `- warning: immutable value 'opIndex' was never used; consider replacing with '_' or removing it [#no-usage]
335 |             let memoryCost = op.resultType.byteCount
336 |             let computeCost = estimateComputeCost(op)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Optimizer/Rematerialization.swift:470:13: warning: initialization of immutable value 'averageSegmentSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
468 |         // With checkpointing, only need to store activations between checkpoints
469 |         let numSegments = checkpoints.count + 1
470 |         let averageSegmentSize = function.operations.count / numSegments
    |             `- warning: initialization of immutable value 'averageSegmentSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
471 |
472 |         // Estimate memory per segment
[404/432] Compiling MetalHLOCore Analyzer.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:441:13: warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 439 |     ) -> (String, String, TuningConfig?) {
 440 |         let outputShape = outputShapes.first ?? []
 441 |         let totalElements = outputShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 442 |         let entryPoint = "kernel_\(opKind.rawValue)"
 443 |         let metalType = metalTypeName(for: elementType)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1184:13: warning: initialization of immutable value 'indexGridSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1182 |             if i != dimNumbers.indexVectorDim { indexGridShape.append(s) }
1183 |         }
1184 |         let indexGridSize = max(indexGridShape.reduce(1, *), 1)
     |             `- warning: initialization of immutable value 'indexGridSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1185 |
1186 |         // Non-collapsed, non-batched operand dims → these are offset dims in order
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1199:13: warning: initialization of immutable value 'offsetTotalSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1197 |             offsetSizes.append(sliceSizes[d])
1198 |         }
1199 |         let offsetTotalSize = max(offsetSizes.reduce(1, *), 1)
     |             `- warning: initialization of immutable value 'offsetTotalSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1200 |
1201 |         // Number of index components per grid point
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1202:13: warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1200 |
1201 |         // Number of index components per grid point
1202 |         let numIndexComponents = dimNumbers.startIndexMap.count
     |             `- warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1203 |
1204 |         // Indices stride for index_vector_dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1311:13: warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1309 |         let batchSize = operandShape[batchDim]
1310 |         let startIndexMap = dimNumbers.startIndexMap
1311 |         let sliceSizes = dimNumbers.sliceSizes
     |             `- warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1312 |         let numStartIndices = startIndexMap.count
1313 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1436:13: warning: immutable value 'operandInnerStride' was never used; consider removing it [#no-usage]
1434 |
1435 |         // Calculate operand inner stride (elements per row in operand)
1436 |         let operandInnerStride: Int
     |             `- warning: immutable value 'operandInnerStride' was never used; consider removing it [#no-usage]
1437 |         if operandShape.count >= 2 && !dimNumbers.scatterDimsToOperandDims.isEmpty
1438 |             && dimNumbers.scatterDimsToOperandDims[0] == 0 {
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1694:13: warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1692 |         let rank = operandShape.count
1693 |         let totalElements = operandShape.reduce(1, *)
1694 |         let updateElements = updateShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1695 |
1696 |         // Calculate strides
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2313:13: warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2311 |     ) -> (String, String, TuningConfig?) {
2312 |         // Compute reduction parameters
2313 |         let totalInputElements = inputShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2314 |         let reduceDimSorted = reduceDims.sorted()
2315 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2327:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2325 |             if !reduceDimSorted.contains(i) { outputShape.append(s) }
2326 |         }
2327 |         let outputCount = max(outputShape.reduce(1, *), 1)
     |             `- warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2328 |
2329 |         // innerSize = product of dims after last reduce dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2331:13: warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2329 |         // innerSize = product of dims after last reduce dim
2330 |         let lastReduceDim = reduceDimSorted.last ?? 0
2331 |         let innerSize = lastReduceDim + 1 < inputShape.count
     |             `- warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2332 |             ? inputShape.suffix(from: lastReduceDim + 1).reduce(1, *)
2333 |             : 1
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2716:13: warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2714 |
2715 |         let totalOutputElements = outputShape.reduce(1, *)
2716 |         let batchSize = totalOutputElements / (fftType == .rfft ? (N / 2 + 1) : N)
     |             `- warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2717 |         let isInverse = (fftType == .ifft || fftType == .irfft)
2718 |         let sign = isInverse ? "1.0" : "-1.0"
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3137:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3135 |         }
3136 |
3137 |         let outputCount = outputShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3138 |
3139 |         return """
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CustomCallHandlers.swift:694:13: warning: initialization of immutable value 'approximate' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 692 |
 693 |         let x = inputs[0]
 694 |         let approximate = BackendConfigParser.getBool(config, key: "approximate", default: false)
     |             `- warning: initialization of immutable value 'approximate' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 695 |
 696 |         // GELU: 0.5 * x * (1 + tanh(sqrt(2/pi) * (x + 0.044715 * x^3)))
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CustomCallHandlers.swift:749:13: warning: variable 'startIndices1' was never mutated; consider changing to 'let' constant
 747 |         // Split x into first half and second half along last dimension
 748 |         // x1 = x[..., :halfDim], x2 = x[..., halfDim:]
 749 |         var startIndices1 = [Int](repeating: 0, count: rank)
     |             `- warning: variable 'startIndices1' was never mutated; consider changing to 'let' constant
 750 |         var endIndices1 = xShape.map { $0.intValue }
 751 |         endIndices1[rank - 1] = halfDim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CustomCallHandlers.swift:789:17: warning: variable 'cosStart' was never mutated; consider changing to 'let' constant
 787 |             // freqs contains both cos and sin interleaved or concatenated
 788 |             // Assume first half is cos, second half is sin
 789 |             var cosStart = [Int](repeating: 0, count: freqsRank)
     |                 `- warning: variable 'cosStart' was never mutated; consider changing to 'let' constant
 790 |             var cosEnd = freqsShape.map { $0.intValue }
 791 |             cosEnd[freqsRank - 1] = halfDim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:2874:13: warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
2872 |
2873 |         // Transpose input to target layout
2874 |         let targetInputOrder: [Int]
     |             `- warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
2875 |         switch targetDataLayout {
2876 |         case .NHWC:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:2905:13: warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
2903 |
2904 |         // Transpose weights if needed
2905 |         let targetKernelOrder: [Int]
     |             `- warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
2906 |         switch targetWeightsLayout {
2907 |         case .HWIO:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:2953:13: warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
2951 |         ]
2952 |
2953 |         let mpsOutputOrder: [Int]
     |             `- warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
2954 |         switch sourceDataLayout {
2955 |         case .NHWC:
[405/432] Compiling MetalHLOCore CodeGenerator.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:441:13: warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 439 |     ) -> (String, String, TuningConfig?) {
 440 |         let outputShape = outputShapes.first ?? []
 441 |         let totalElements = outputShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 442 |         let entryPoint = "kernel_\(opKind.rawValue)"
 443 |         let metalType = metalTypeName(for: elementType)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1184:13: warning: initialization of immutable value 'indexGridSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1182 |             if i != dimNumbers.indexVectorDim { indexGridShape.append(s) }
1183 |         }
1184 |         let indexGridSize = max(indexGridShape.reduce(1, *), 1)
     |             `- warning: initialization of immutable value 'indexGridSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1185 |
1186 |         // Non-collapsed, non-batched operand dims → these are offset dims in order
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1199:13: warning: initialization of immutable value 'offsetTotalSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1197 |             offsetSizes.append(sliceSizes[d])
1198 |         }
1199 |         let offsetTotalSize = max(offsetSizes.reduce(1, *), 1)
     |             `- warning: initialization of immutable value 'offsetTotalSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1200 |
1201 |         // Number of index components per grid point
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1202:13: warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1200 |
1201 |         // Number of index components per grid point
1202 |         let numIndexComponents = dimNumbers.startIndexMap.count
     |             `- warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1203 |
1204 |         // Indices stride for index_vector_dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1311:13: warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1309 |         let batchSize = operandShape[batchDim]
1310 |         let startIndexMap = dimNumbers.startIndexMap
1311 |         let sliceSizes = dimNumbers.sliceSizes
     |             `- warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1312 |         let numStartIndices = startIndexMap.count
1313 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1436:13: warning: immutable value 'operandInnerStride' was never used; consider removing it [#no-usage]
1434 |
1435 |         // Calculate operand inner stride (elements per row in operand)
1436 |         let operandInnerStride: Int
     |             `- warning: immutable value 'operandInnerStride' was never used; consider removing it [#no-usage]
1437 |         if operandShape.count >= 2 && !dimNumbers.scatterDimsToOperandDims.isEmpty
1438 |             && dimNumbers.scatterDimsToOperandDims[0] == 0 {
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1694:13: warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1692 |         let rank = operandShape.count
1693 |         let totalElements = operandShape.reduce(1, *)
1694 |         let updateElements = updateShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1695 |
1696 |         // Calculate strides
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2313:13: warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2311 |     ) -> (String, String, TuningConfig?) {
2312 |         // Compute reduction parameters
2313 |         let totalInputElements = inputShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2314 |         let reduceDimSorted = reduceDims.sorted()
2315 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2327:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2325 |             if !reduceDimSorted.contains(i) { outputShape.append(s) }
2326 |         }
2327 |         let outputCount = max(outputShape.reduce(1, *), 1)
     |             `- warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2328 |
2329 |         // innerSize = product of dims after last reduce dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2331:13: warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2329 |         // innerSize = product of dims after last reduce dim
2330 |         let lastReduceDim = reduceDimSorted.last ?? 0
2331 |         let innerSize = lastReduceDim + 1 < inputShape.count
     |             `- warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2332 |             ? inputShape.suffix(from: lastReduceDim + 1).reduce(1, *)
2333 |             : 1
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2716:13: warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2714 |
2715 |         let totalOutputElements = outputShape.reduce(1, *)
2716 |         let batchSize = totalOutputElements / (fftType == .rfft ? (N / 2 + 1) : N)
     |             `- warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2717 |         let isInverse = (fftType == .ifft || fftType == .irfft)
2718 |         let sign = isInverse ? "1.0" : "-1.0"
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3137:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3135 |         }
3136 |
3137 |         let outputCount = outputShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3138 |
3139 |         return """
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CustomCallHandlers.swift:694:13: warning: initialization of immutable value 'approximate' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 692 |
 693 |         let x = inputs[0]
 694 |         let approximate = BackendConfigParser.getBool(config, key: "approximate", default: false)
     |             `- warning: initialization of immutable value 'approximate' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 695 |
 696 |         // GELU: 0.5 * x * (1 + tanh(sqrt(2/pi) * (x + 0.044715 * x^3)))
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CustomCallHandlers.swift:749:13: warning: variable 'startIndices1' was never mutated; consider changing to 'let' constant
 747 |         // Split x into first half and second half along last dimension
 748 |         // x1 = x[..., :halfDim], x2 = x[..., halfDim:]
 749 |         var startIndices1 = [Int](repeating: 0, count: rank)
     |             `- warning: variable 'startIndices1' was never mutated; consider changing to 'let' constant
 750 |         var endIndices1 = xShape.map { $0.intValue }
 751 |         endIndices1[rank - 1] = halfDim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CustomCallHandlers.swift:789:17: warning: variable 'cosStart' was never mutated; consider changing to 'let' constant
 787 |             // freqs contains both cos and sin interleaved or concatenated
 788 |             // Assume first half is cos, second half is sin
 789 |             var cosStart = [Int](repeating: 0, count: freqsRank)
     |                 `- warning: variable 'cosStart' was never mutated; consider changing to 'let' constant
 790 |             var cosEnd = freqsShape.map { $0.intValue }
 791 |             cosEnd[freqsRank - 1] = halfDim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:2874:13: warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
2872 |
2873 |         // Transpose input to target layout
2874 |         let targetInputOrder: [Int]
     |             `- warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
2875 |         switch targetDataLayout {
2876 |         case .NHWC:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:2905:13: warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
2903 |
2904 |         // Transpose weights if needed
2905 |         let targetKernelOrder: [Int]
     |             `- warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
2906 |         switch targetWeightsLayout {
2907 |         case .HWIO:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:2953:13: warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
2951 |         ]
2952 |
2953 |         let mpsOutputOrder: [Int]
     |             `- warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
2954 |         switch sourceDataLayout {
2955 |         case .NHWC:
[406/432] Compiling MetalHLOCore CustomCallHandlers.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:441:13: warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 439 |     ) -> (String, String, TuningConfig?) {
 440 |         let outputShape = outputShapes.first ?? []
 441 |         let totalElements = outputShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 442 |         let entryPoint = "kernel_\(opKind.rawValue)"
 443 |         let metalType = metalTypeName(for: elementType)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1184:13: warning: initialization of immutable value 'indexGridSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1182 |             if i != dimNumbers.indexVectorDim { indexGridShape.append(s) }
1183 |         }
1184 |         let indexGridSize = max(indexGridShape.reduce(1, *), 1)
     |             `- warning: initialization of immutable value 'indexGridSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1185 |
1186 |         // Non-collapsed, non-batched operand dims → these are offset dims in order
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1199:13: warning: initialization of immutable value 'offsetTotalSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1197 |             offsetSizes.append(sliceSizes[d])
1198 |         }
1199 |         let offsetTotalSize = max(offsetSizes.reduce(1, *), 1)
     |             `- warning: initialization of immutable value 'offsetTotalSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1200 |
1201 |         // Number of index components per grid point
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1202:13: warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1200 |
1201 |         // Number of index components per grid point
1202 |         let numIndexComponents = dimNumbers.startIndexMap.count
     |             `- warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1203 |
1204 |         // Indices stride for index_vector_dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1311:13: warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1309 |         let batchSize = operandShape[batchDim]
1310 |         let startIndexMap = dimNumbers.startIndexMap
1311 |         let sliceSizes = dimNumbers.sliceSizes
     |             `- warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1312 |         let numStartIndices = startIndexMap.count
1313 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1436:13: warning: immutable value 'operandInnerStride' was never used; consider removing it [#no-usage]
1434 |
1435 |         // Calculate operand inner stride (elements per row in operand)
1436 |         let operandInnerStride: Int
     |             `- warning: immutable value 'operandInnerStride' was never used; consider removing it [#no-usage]
1437 |         if operandShape.count >= 2 && !dimNumbers.scatterDimsToOperandDims.isEmpty
1438 |             && dimNumbers.scatterDimsToOperandDims[0] == 0 {
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1694:13: warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1692 |         let rank = operandShape.count
1693 |         let totalElements = operandShape.reduce(1, *)
1694 |         let updateElements = updateShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1695 |
1696 |         // Calculate strides
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2313:13: warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2311 |     ) -> (String, String, TuningConfig?) {
2312 |         // Compute reduction parameters
2313 |         let totalInputElements = inputShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2314 |         let reduceDimSorted = reduceDims.sorted()
2315 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2327:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2325 |             if !reduceDimSorted.contains(i) { outputShape.append(s) }
2326 |         }
2327 |         let outputCount = max(outputShape.reduce(1, *), 1)
     |             `- warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2328 |
2329 |         // innerSize = product of dims after last reduce dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2331:13: warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2329 |         // innerSize = product of dims after last reduce dim
2330 |         let lastReduceDim = reduceDimSorted.last ?? 0
2331 |         let innerSize = lastReduceDim + 1 < inputShape.count
     |             `- warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2332 |             ? inputShape.suffix(from: lastReduceDim + 1).reduce(1, *)
2333 |             : 1
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2716:13: warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2714 |
2715 |         let totalOutputElements = outputShape.reduce(1, *)
2716 |         let batchSize = totalOutputElements / (fftType == .rfft ? (N / 2 + 1) : N)
     |             `- warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2717 |         let isInverse = (fftType == .ifft || fftType == .irfft)
2718 |         let sign = isInverse ? "1.0" : "-1.0"
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3137:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3135 |         }
3136 |
3137 |         let outputCount = outputShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3138 |
3139 |         return """
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CustomCallHandlers.swift:694:13: warning: initialization of immutable value 'approximate' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 692 |
 693 |         let x = inputs[0]
 694 |         let approximate = BackendConfigParser.getBool(config, key: "approximate", default: false)
     |             `- warning: initialization of immutable value 'approximate' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 695 |
 696 |         // GELU: 0.5 * x * (1 + tanh(sqrt(2/pi) * (x + 0.044715 * x^3)))
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CustomCallHandlers.swift:749:13: warning: variable 'startIndices1' was never mutated; consider changing to 'let' constant
 747 |         // Split x into first half and second half along last dimension
 748 |         // x1 = x[..., :halfDim], x2 = x[..., halfDim:]
 749 |         var startIndices1 = [Int](repeating: 0, count: rank)
     |             `- warning: variable 'startIndices1' was never mutated; consider changing to 'let' constant
 750 |         var endIndices1 = xShape.map { $0.intValue }
 751 |         endIndices1[rank - 1] = halfDim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CustomCallHandlers.swift:789:17: warning: variable 'cosStart' was never mutated; consider changing to 'let' constant
 787 |             // freqs contains both cos and sin interleaved or concatenated
 788 |             // Assume first half is cos, second half is sin
 789 |             var cosStart = [Int](repeating: 0, count: freqsRank)
     |                 `- warning: variable 'cosStart' was never mutated; consider changing to 'let' constant
 790 |             var cosEnd = freqsShape.map { $0.intValue }
 791 |             cosEnd[freqsRank - 1] = halfDim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:2874:13: warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
2872 |
2873 |         // Transpose input to target layout
2874 |         let targetInputOrder: [Int]
     |             `- warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
2875 |         switch targetDataLayout {
2876 |         case .NHWC:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:2905:13: warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
2903 |
2904 |         // Transpose weights if needed
2905 |         let targetKernelOrder: [Int]
     |             `- warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
2906 |         switch targetWeightsLayout {
2907 |         case .HWIO:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:2953:13: warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
2951 |         ]
2952 |
2953 |         let mpsOutputOrder: [Int]
     |             `- warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
2954 |         switch sourceDataLayout {
2955 |         case .NHWC:
[407/432] Compiling MetalHLOCore EmbeddedAttentionSplitter.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:441:13: warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 439 |     ) -> (String, String, TuningConfig?) {
 440 |         let outputShape = outputShapes.first ?? []
 441 |         let totalElements = outputShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 442 |         let entryPoint = "kernel_\(opKind.rawValue)"
 443 |         let metalType = metalTypeName(for: elementType)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1184:13: warning: initialization of immutable value 'indexGridSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1182 |             if i != dimNumbers.indexVectorDim { indexGridShape.append(s) }
1183 |         }
1184 |         let indexGridSize = max(indexGridShape.reduce(1, *), 1)
     |             `- warning: initialization of immutable value 'indexGridSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1185 |
1186 |         // Non-collapsed, non-batched operand dims → these are offset dims in order
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1199:13: warning: initialization of immutable value 'offsetTotalSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1197 |             offsetSizes.append(sliceSizes[d])
1198 |         }
1199 |         let offsetTotalSize = max(offsetSizes.reduce(1, *), 1)
     |             `- warning: initialization of immutable value 'offsetTotalSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1200 |
1201 |         // Number of index components per grid point
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1202:13: warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1200 |
1201 |         // Number of index components per grid point
1202 |         let numIndexComponents = dimNumbers.startIndexMap.count
     |             `- warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1203 |
1204 |         // Indices stride for index_vector_dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1311:13: warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1309 |         let batchSize = operandShape[batchDim]
1310 |         let startIndexMap = dimNumbers.startIndexMap
1311 |         let sliceSizes = dimNumbers.sliceSizes
     |             `- warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1312 |         let numStartIndices = startIndexMap.count
1313 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1436:13: warning: immutable value 'operandInnerStride' was never used; consider removing it [#no-usage]
1434 |
1435 |         // Calculate operand inner stride (elements per row in operand)
1436 |         let operandInnerStride: Int
     |             `- warning: immutable value 'operandInnerStride' was never used; consider removing it [#no-usage]
1437 |         if operandShape.count >= 2 && !dimNumbers.scatterDimsToOperandDims.isEmpty
1438 |             && dimNumbers.scatterDimsToOperandDims[0] == 0 {
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1694:13: warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1692 |         let rank = operandShape.count
1693 |         let totalElements = operandShape.reduce(1, *)
1694 |         let updateElements = updateShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1695 |
1696 |         // Calculate strides
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2313:13: warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2311 |     ) -> (String, String, TuningConfig?) {
2312 |         // Compute reduction parameters
2313 |         let totalInputElements = inputShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2314 |         let reduceDimSorted = reduceDims.sorted()
2315 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2327:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2325 |             if !reduceDimSorted.contains(i) { outputShape.append(s) }
2326 |         }
2327 |         let outputCount = max(outputShape.reduce(1, *), 1)
     |             `- warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2328 |
2329 |         // innerSize = product of dims after last reduce dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2331:13: warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2329 |         // innerSize = product of dims after last reduce dim
2330 |         let lastReduceDim = reduceDimSorted.last ?? 0
2331 |         let innerSize = lastReduceDim + 1 < inputShape.count
     |             `- warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2332 |             ? inputShape.suffix(from: lastReduceDim + 1).reduce(1, *)
2333 |             : 1
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2716:13: warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2714 |
2715 |         let totalOutputElements = outputShape.reduce(1, *)
2716 |         let batchSize = totalOutputElements / (fftType == .rfft ? (N / 2 + 1) : N)
     |             `- warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2717 |         let isInverse = (fftType == .ifft || fftType == .irfft)
2718 |         let sign = isInverse ? "1.0" : "-1.0"
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3137:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3135 |         }
3136 |
3137 |         let outputCount = outputShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3138 |
3139 |         return """
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CustomCallHandlers.swift:694:13: warning: initialization of immutable value 'approximate' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 692 |
 693 |         let x = inputs[0]
 694 |         let approximate = BackendConfigParser.getBool(config, key: "approximate", default: false)
     |             `- warning: initialization of immutable value 'approximate' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 695 |
 696 |         // GELU: 0.5 * x * (1 + tanh(sqrt(2/pi) * (x + 0.044715 * x^3)))
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CustomCallHandlers.swift:749:13: warning: variable 'startIndices1' was never mutated; consider changing to 'let' constant
 747 |         // Split x into first half and second half along last dimension
 748 |         // x1 = x[..., :halfDim], x2 = x[..., halfDim:]
 749 |         var startIndices1 = [Int](repeating: 0, count: rank)
     |             `- warning: variable 'startIndices1' was never mutated; consider changing to 'let' constant
 750 |         var endIndices1 = xShape.map { $0.intValue }
 751 |         endIndices1[rank - 1] = halfDim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CustomCallHandlers.swift:789:17: warning: variable 'cosStart' was never mutated; consider changing to 'let' constant
 787 |             // freqs contains both cos and sin interleaved or concatenated
 788 |             // Assume first half is cos, second half is sin
 789 |             var cosStart = [Int](repeating: 0, count: freqsRank)
     |                 `- warning: variable 'cosStart' was never mutated; consider changing to 'let' constant
 790 |             var cosEnd = freqsShape.map { $0.intValue }
 791 |             cosEnd[freqsRank - 1] = halfDim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:2874:13: warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
2872 |
2873 |         // Transpose input to target layout
2874 |         let targetInputOrder: [Int]
     |             `- warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
2875 |         switch targetDataLayout {
2876 |         case .NHWC:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:2905:13: warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
2903 |
2904 |         // Transpose weights if needed
2905 |         let targetKernelOrder: [Int]
     |             `- warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
2906 |         switch targetWeightsLayout {
2907 |         case .HWIO:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:2953:13: warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
2951 |         ]
2952 |
2953 |         let mpsOutputOrder: [Int]
     |             `- warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
2954 |         switch sourceDataLayout {
2955 |         case .NHWC:
[408/432] Compiling MetalHLOCore IntegrationTypes.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:441:13: warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 439 |     ) -> (String, String, TuningConfig?) {
 440 |         let outputShape = outputShapes.first ?? []
 441 |         let totalElements = outputShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 442 |         let entryPoint = "kernel_\(opKind.rawValue)"
 443 |         let metalType = metalTypeName(for: elementType)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1184:13: warning: initialization of immutable value 'indexGridSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1182 |             if i != dimNumbers.indexVectorDim { indexGridShape.append(s) }
1183 |         }
1184 |         let indexGridSize = max(indexGridShape.reduce(1, *), 1)
     |             `- warning: initialization of immutable value 'indexGridSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1185 |
1186 |         // Non-collapsed, non-batched operand dims → these are offset dims in order
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1199:13: warning: initialization of immutable value 'offsetTotalSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1197 |             offsetSizes.append(sliceSizes[d])
1198 |         }
1199 |         let offsetTotalSize = max(offsetSizes.reduce(1, *), 1)
     |             `- warning: initialization of immutable value 'offsetTotalSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1200 |
1201 |         // Number of index components per grid point
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1202:13: warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1200 |
1201 |         // Number of index components per grid point
1202 |         let numIndexComponents = dimNumbers.startIndexMap.count
     |             `- warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1203 |
1204 |         // Indices stride for index_vector_dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1311:13: warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1309 |         let batchSize = operandShape[batchDim]
1310 |         let startIndexMap = dimNumbers.startIndexMap
1311 |         let sliceSizes = dimNumbers.sliceSizes
     |             `- warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1312 |         let numStartIndices = startIndexMap.count
1313 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1436:13: warning: immutable value 'operandInnerStride' was never used; consider removing it [#no-usage]
1434 |
1435 |         // Calculate operand inner stride (elements per row in operand)
1436 |         let operandInnerStride: Int
     |             `- warning: immutable value 'operandInnerStride' was never used; consider removing it [#no-usage]
1437 |         if operandShape.count >= 2 && !dimNumbers.scatterDimsToOperandDims.isEmpty
1438 |             && dimNumbers.scatterDimsToOperandDims[0] == 0 {
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1694:13: warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1692 |         let rank = operandShape.count
1693 |         let totalElements = operandShape.reduce(1, *)
1694 |         let updateElements = updateShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1695 |
1696 |         // Calculate strides
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2313:13: warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2311 |     ) -> (String, String, TuningConfig?) {
2312 |         // Compute reduction parameters
2313 |         let totalInputElements = inputShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2314 |         let reduceDimSorted = reduceDims.sorted()
2315 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2327:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2325 |             if !reduceDimSorted.contains(i) { outputShape.append(s) }
2326 |         }
2327 |         let outputCount = max(outputShape.reduce(1, *), 1)
     |             `- warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2328 |
2329 |         // innerSize = product of dims after last reduce dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2331:13: warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2329 |         // innerSize = product of dims after last reduce dim
2330 |         let lastReduceDim = reduceDimSorted.last ?? 0
2331 |         let innerSize = lastReduceDim + 1 < inputShape.count
     |             `- warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2332 |             ? inputShape.suffix(from: lastReduceDim + 1).reduce(1, *)
2333 |             : 1
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2716:13: warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2714 |
2715 |         let totalOutputElements = outputShape.reduce(1, *)
2716 |         let batchSize = totalOutputElements / (fftType == .rfft ? (N / 2 + 1) : N)
     |             `- warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2717 |         let isInverse = (fftType == .ifft || fftType == .irfft)
2718 |         let sign = isInverse ? "1.0" : "-1.0"
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3137:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3135 |         }
3136 |
3137 |         let outputCount = outputShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3138 |
3139 |         return """
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CustomCallHandlers.swift:694:13: warning: initialization of immutable value 'approximate' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 692 |
 693 |         let x = inputs[0]
 694 |         let approximate = BackendConfigParser.getBool(config, key: "approximate", default: false)
     |             `- warning: initialization of immutable value 'approximate' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 695 |
 696 |         // GELU: 0.5 * x * (1 + tanh(sqrt(2/pi) * (x + 0.044715 * x^3)))
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CustomCallHandlers.swift:749:13: warning: variable 'startIndices1' was never mutated; consider changing to 'let' constant
 747 |         // Split x into first half and second half along last dimension
 748 |         // x1 = x[..., :halfDim], x2 = x[..., halfDim:]
 749 |         var startIndices1 = [Int](repeating: 0, count: rank)
     |             `- warning: variable 'startIndices1' was never mutated; consider changing to 'let' constant
 750 |         var endIndices1 = xShape.map { $0.intValue }
 751 |         endIndices1[rank - 1] = halfDim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CustomCallHandlers.swift:789:17: warning: variable 'cosStart' was never mutated; consider changing to 'let' constant
 787 |             // freqs contains both cos and sin interleaved or concatenated
 788 |             // Assume first half is cos, second half is sin
 789 |             var cosStart = [Int](repeating: 0, count: freqsRank)
     |                 `- warning: variable 'cosStart' was never mutated; consider changing to 'let' constant
 790 |             var cosEnd = freqsShape.map { $0.intValue }
 791 |             cosEnd[freqsRank - 1] = halfDim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:2874:13: warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
2872 |
2873 |         // Transpose input to target layout
2874 |         let targetInputOrder: [Int]
     |             `- warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
2875 |         switch targetDataLayout {
2876 |         case .NHWC:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:2905:13: warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
2903 |
2904 |         // Transpose weights if needed
2905 |         let targetKernelOrder: [Int]
     |             `- warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
2906 |         switch targetWeightsLayout {
2907 |         case .HWIO:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:2953:13: warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
2951 |         ]
2952 |
2953 |         let mpsOutputOrder: [Int]
     |             `- warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
2954 |         switch sourceDataLayout {
2955 |         case .NHWC:
[409/432] Compiling MetalHLOCore KernelTypes.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:441:13: warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 439 |     ) -> (String, String, TuningConfig?) {
 440 |         let outputShape = outputShapes.first ?? []
 441 |         let totalElements = outputShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 442 |         let entryPoint = "kernel_\(opKind.rawValue)"
 443 |         let metalType = metalTypeName(for: elementType)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1184:13: warning: initialization of immutable value 'indexGridSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1182 |             if i != dimNumbers.indexVectorDim { indexGridShape.append(s) }
1183 |         }
1184 |         let indexGridSize = max(indexGridShape.reduce(1, *), 1)
     |             `- warning: initialization of immutable value 'indexGridSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1185 |
1186 |         // Non-collapsed, non-batched operand dims → these are offset dims in order
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1199:13: warning: initialization of immutable value 'offsetTotalSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1197 |             offsetSizes.append(sliceSizes[d])
1198 |         }
1199 |         let offsetTotalSize = max(offsetSizes.reduce(1, *), 1)
     |             `- warning: initialization of immutable value 'offsetTotalSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1200 |
1201 |         // Number of index components per grid point
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1202:13: warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1200 |
1201 |         // Number of index components per grid point
1202 |         let numIndexComponents = dimNumbers.startIndexMap.count
     |             `- warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1203 |
1204 |         // Indices stride for index_vector_dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1311:13: warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1309 |         let batchSize = operandShape[batchDim]
1310 |         let startIndexMap = dimNumbers.startIndexMap
1311 |         let sliceSizes = dimNumbers.sliceSizes
     |             `- warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1312 |         let numStartIndices = startIndexMap.count
1313 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1436:13: warning: immutable value 'operandInnerStride' was never used; consider removing it [#no-usage]
1434 |
1435 |         // Calculate operand inner stride (elements per row in operand)
1436 |         let operandInnerStride: Int
     |             `- warning: immutable value 'operandInnerStride' was never used; consider removing it [#no-usage]
1437 |         if operandShape.count >= 2 && !dimNumbers.scatterDimsToOperandDims.isEmpty
1438 |             && dimNumbers.scatterDimsToOperandDims[0] == 0 {
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1694:13: warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1692 |         let rank = operandShape.count
1693 |         let totalElements = operandShape.reduce(1, *)
1694 |         let updateElements = updateShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1695 |
1696 |         // Calculate strides
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2313:13: warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2311 |     ) -> (String, String, TuningConfig?) {
2312 |         // Compute reduction parameters
2313 |         let totalInputElements = inputShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2314 |         let reduceDimSorted = reduceDims.sorted()
2315 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2327:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2325 |             if !reduceDimSorted.contains(i) { outputShape.append(s) }
2326 |         }
2327 |         let outputCount = max(outputShape.reduce(1, *), 1)
     |             `- warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2328 |
2329 |         // innerSize = product of dims after last reduce dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2331:13: warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2329 |         // innerSize = product of dims after last reduce dim
2330 |         let lastReduceDim = reduceDimSorted.last ?? 0
2331 |         let innerSize = lastReduceDim + 1 < inputShape.count
     |             `- warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2332 |             ? inputShape.suffix(from: lastReduceDim + 1).reduce(1, *)
2333 |             : 1
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2716:13: warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2714 |
2715 |         let totalOutputElements = outputShape.reduce(1, *)
2716 |         let batchSize = totalOutputElements / (fftType == .rfft ? (N / 2 + 1) : N)
     |             `- warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2717 |         let isInverse = (fftType == .ifft || fftType == .irfft)
2718 |         let sign = isInverse ? "1.0" : "-1.0"
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3137:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3135 |         }
3136 |
3137 |         let outputCount = outputShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3138 |
3139 |         return """
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CustomCallHandlers.swift:694:13: warning: initialization of immutable value 'approximate' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 692 |
 693 |         let x = inputs[0]
 694 |         let approximate = BackendConfigParser.getBool(config, key: "approximate", default: false)
     |             `- warning: initialization of immutable value 'approximate' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 695 |
 696 |         // GELU: 0.5 * x * (1 + tanh(sqrt(2/pi) * (x + 0.044715 * x^3)))
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CustomCallHandlers.swift:749:13: warning: variable 'startIndices1' was never mutated; consider changing to 'let' constant
 747 |         // Split x into first half and second half along last dimension
 748 |         // x1 = x[..., :halfDim], x2 = x[..., halfDim:]
 749 |         var startIndices1 = [Int](repeating: 0, count: rank)
     |             `- warning: variable 'startIndices1' was never mutated; consider changing to 'let' constant
 750 |         var endIndices1 = xShape.map { $0.intValue }
 751 |         endIndices1[rank - 1] = halfDim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CustomCallHandlers.swift:789:17: warning: variable 'cosStart' was never mutated; consider changing to 'let' constant
 787 |             // freqs contains both cos and sin interleaved or concatenated
 788 |             // Assume first half is cos, second half is sin
 789 |             var cosStart = [Int](repeating: 0, count: freqsRank)
     |                 `- warning: variable 'cosStart' was never mutated; consider changing to 'let' constant
 790 |             var cosEnd = freqsShape.map { $0.intValue }
 791 |             cosEnd[freqsRank - 1] = halfDim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:2874:13: warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
2872 |
2873 |         // Transpose input to target layout
2874 |         let targetInputOrder: [Int]
     |             `- warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
2875 |         switch targetDataLayout {
2876 |         case .NHWC:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:2905:13: warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
2903 |
2904 |         // Transpose weights if needed
2905 |         let targetKernelOrder: [Int]
     |             `- warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
2906 |         switch targetWeightsLayout {
2907 |         case .HWIO:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:2953:13: warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
2951 |         ]
2952 |
2953 |         let mpsOutputOrder: [Int]
     |             `- warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
2954 |         switch sourceDataLayout {
2955 |         case .NHWC:
[410/432] Compiling MetalHLOCore MPSGraphCompiler.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:441:13: warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 439 |     ) -> (String, String, TuningConfig?) {
 440 |         let outputShape = outputShapes.first ?? []
 441 |         let totalElements = outputShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 442 |         let entryPoint = "kernel_\(opKind.rawValue)"
 443 |         let metalType = metalTypeName(for: elementType)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1184:13: warning: initialization of immutable value 'indexGridSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1182 |             if i != dimNumbers.indexVectorDim { indexGridShape.append(s) }
1183 |         }
1184 |         let indexGridSize = max(indexGridShape.reduce(1, *), 1)
     |             `- warning: initialization of immutable value 'indexGridSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1185 |
1186 |         // Non-collapsed, non-batched operand dims → these are offset dims in order
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1199:13: warning: initialization of immutable value 'offsetTotalSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1197 |             offsetSizes.append(sliceSizes[d])
1198 |         }
1199 |         let offsetTotalSize = max(offsetSizes.reduce(1, *), 1)
     |             `- warning: initialization of immutable value 'offsetTotalSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1200 |
1201 |         // Number of index components per grid point
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1202:13: warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1200 |
1201 |         // Number of index components per grid point
1202 |         let numIndexComponents = dimNumbers.startIndexMap.count
     |             `- warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1203 |
1204 |         // Indices stride for index_vector_dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1311:13: warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1309 |         let batchSize = operandShape[batchDim]
1310 |         let startIndexMap = dimNumbers.startIndexMap
1311 |         let sliceSizes = dimNumbers.sliceSizes
     |             `- warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1312 |         let numStartIndices = startIndexMap.count
1313 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1436:13: warning: immutable value 'operandInnerStride' was never used; consider removing it [#no-usage]
1434 |
1435 |         // Calculate operand inner stride (elements per row in operand)
1436 |         let operandInnerStride: Int
     |             `- warning: immutable value 'operandInnerStride' was never used; consider removing it [#no-usage]
1437 |         if operandShape.count >= 2 && !dimNumbers.scatterDimsToOperandDims.isEmpty
1438 |             && dimNumbers.scatterDimsToOperandDims[0] == 0 {
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1694:13: warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1692 |         let rank = operandShape.count
1693 |         let totalElements = operandShape.reduce(1, *)
1694 |         let updateElements = updateShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1695 |
1696 |         // Calculate strides
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2313:13: warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2311 |     ) -> (String, String, TuningConfig?) {
2312 |         // Compute reduction parameters
2313 |         let totalInputElements = inputShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2314 |         let reduceDimSorted = reduceDims.sorted()
2315 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2327:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2325 |             if !reduceDimSorted.contains(i) { outputShape.append(s) }
2326 |         }
2327 |         let outputCount = max(outputShape.reduce(1, *), 1)
     |             `- warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2328 |
2329 |         // innerSize = product of dims after last reduce dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2331:13: warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2329 |         // innerSize = product of dims after last reduce dim
2330 |         let lastReduceDim = reduceDimSorted.last ?? 0
2331 |         let innerSize = lastReduceDim + 1 < inputShape.count
     |             `- warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2332 |             ? inputShape.suffix(from: lastReduceDim + 1).reduce(1, *)
2333 |             : 1
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2716:13: warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2714 |
2715 |         let totalOutputElements = outputShape.reduce(1, *)
2716 |         let batchSize = totalOutputElements / (fftType == .rfft ? (N / 2 + 1) : N)
     |             `- warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2717 |         let isInverse = (fftType == .ifft || fftType == .irfft)
2718 |         let sign = isInverse ? "1.0" : "-1.0"
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3137:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3135 |         }
3136 |
3137 |         let outputCount = outputShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3138 |
3139 |         return """
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CustomCallHandlers.swift:694:13: warning: initialization of immutable value 'approximate' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 692 |
 693 |         let x = inputs[0]
 694 |         let approximate = BackendConfigParser.getBool(config, key: "approximate", default: false)
     |             `- warning: initialization of immutable value 'approximate' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 695 |
 696 |         // GELU: 0.5 * x * (1 + tanh(sqrt(2/pi) * (x + 0.044715 * x^3)))
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CustomCallHandlers.swift:749:13: warning: variable 'startIndices1' was never mutated; consider changing to 'let' constant
 747 |         // Split x into first half and second half along last dimension
 748 |         // x1 = x[..., :halfDim], x2 = x[..., halfDim:]
 749 |         var startIndices1 = [Int](repeating: 0, count: rank)
     |             `- warning: variable 'startIndices1' was never mutated; consider changing to 'let' constant
 750 |         var endIndices1 = xShape.map { $0.intValue }
 751 |         endIndices1[rank - 1] = halfDim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CustomCallHandlers.swift:789:17: warning: variable 'cosStart' was never mutated; consider changing to 'let' constant
 787 |             // freqs contains both cos and sin interleaved or concatenated
 788 |             // Assume first half is cos, second half is sin
 789 |             var cosStart = [Int](repeating: 0, count: freqsRank)
     |                 `- warning: variable 'cosStart' was never mutated; consider changing to 'let' constant
 790 |             var cosEnd = freqsShape.map { $0.intValue }
 791 |             cosEnd[freqsRank - 1] = halfDim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:2874:13: warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
2872 |
2873 |         // Transpose input to target layout
2874 |         let targetInputOrder: [Int]
     |             `- warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
2875 |         switch targetDataLayout {
2876 |         case .NHWC:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:2905:13: warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
2903 |
2904 |         // Transpose weights if needed
2905 |         let targetKernelOrder: [Int]
     |             `- warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
2906 |         switch targetWeightsLayout {
2907 |         case .HWIO:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:2953:13: warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
2951 |         ]
2952 |
2953 |         let mpsOutputOrder: [Int]
     |             `- warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
2954 |         switch sourceDataLayout {
2955 |         case .NHWC:
[411/432] Compiling MetalHLOCore MetalHLOCompiler.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:441:13: warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 439 |     ) -> (String, String, TuningConfig?) {
 440 |         let outputShape = outputShapes.first ?? []
 441 |         let totalElements = outputShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 442 |         let entryPoint = "kernel_\(opKind.rawValue)"
 443 |         let metalType = metalTypeName(for: elementType)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1184:13: warning: initialization of immutable value 'indexGridSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1182 |             if i != dimNumbers.indexVectorDim { indexGridShape.append(s) }
1183 |         }
1184 |         let indexGridSize = max(indexGridShape.reduce(1, *), 1)
     |             `- warning: initialization of immutable value 'indexGridSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1185 |
1186 |         // Non-collapsed, non-batched operand dims → these are offset dims in order
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1199:13: warning: initialization of immutable value 'offsetTotalSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1197 |             offsetSizes.append(sliceSizes[d])
1198 |         }
1199 |         let offsetTotalSize = max(offsetSizes.reduce(1, *), 1)
     |             `- warning: initialization of immutable value 'offsetTotalSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1200 |
1201 |         // Number of index components per grid point
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1202:13: warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1200 |
1201 |         // Number of index components per grid point
1202 |         let numIndexComponents = dimNumbers.startIndexMap.count
     |             `- warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1203 |
1204 |         // Indices stride for index_vector_dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1311:13: warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1309 |         let batchSize = operandShape[batchDim]
1310 |         let startIndexMap = dimNumbers.startIndexMap
1311 |         let sliceSizes = dimNumbers.sliceSizes
     |             `- warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1312 |         let numStartIndices = startIndexMap.count
1313 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1436:13: warning: immutable value 'operandInnerStride' was never used; consider removing it [#no-usage]
1434 |
1435 |         // Calculate operand inner stride (elements per row in operand)
1436 |         let operandInnerStride: Int
     |             `- warning: immutable value 'operandInnerStride' was never used; consider removing it [#no-usage]
1437 |         if operandShape.count >= 2 && !dimNumbers.scatterDimsToOperandDims.isEmpty
1438 |             && dimNumbers.scatterDimsToOperandDims[0] == 0 {
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1694:13: warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1692 |         let rank = operandShape.count
1693 |         let totalElements = operandShape.reduce(1, *)
1694 |         let updateElements = updateShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1695 |
1696 |         // Calculate strides
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2313:13: warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2311 |     ) -> (String, String, TuningConfig?) {
2312 |         // Compute reduction parameters
2313 |         let totalInputElements = inputShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2314 |         let reduceDimSorted = reduceDims.sorted()
2315 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2327:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2325 |             if !reduceDimSorted.contains(i) { outputShape.append(s) }
2326 |         }
2327 |         let outputCount = max(outputShape.reduce(1, *), 1)
     |             `- warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2328 |
2329 |         // innerSize = product of dims after last reduce dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2331:13: warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2329 |         // innerSize = product of dims after last reduce dim
2330 |         let lastReduceDim = reduceDimSorted.last ?? 0
2331 |         let innerSize = lastReduceDim + 1 < inputShape.count
     |             `- warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2332 |             ? inputShape.suffix(from: lastReduceDim + 1).reduce(1, *)
2333 |             : 1
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2716:13: warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2714 |
2715 |         let totalOutputElements = outputShape.reduce(1, *)
2716 |         let batchSize = totalOutputElements / (fftType == .rfft ? (N / 2 + 1) : N)
     |             `- warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2717 |         let isInverse = (fftType == .ifft || fftType == .irfft)
2718 |         let sign = isInverse ? "1.0" : "-1.0"
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3137:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3135 |         }
3136 |
3137 |         let outputCount = outputShape.reduce(1, *)
     |             `- warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3138 |
3139 |         return """
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CustomCallHandlers.swift:694:13: warning: initialization of immutable value 'approximate' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 692 |
 693 |         let x = inputs[0]
 694 |         let approximate = BackendConfigParser.getBool(config, key: "approximate", default: false)
     |             `- warning: initialization of immutable value 'approximate' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 695 |
 696 |         // GELU: 0.5 * x * (1 + tanh(sqrt(2/pi) * (x + 0.044715 * x^3)))
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CustomCallHandlers.swift:749:13: warning: variable 'startIndices1' was never mutated; consider changing to 'let' constant
 747 |         // Split x into first half and second half along last dimension
 748 |         // x1 = x[..., :halfDim], x2 = x[..., halfDim:]
 749 |         var startIndices1 = [Int](repeating: 0, count: rank)
     |             `- warning: variable 'startIndices1' was never mutated; consider changing to 'let' constant
 750 |         var endIndices1 = xShape.map { $0.intValue }
 751 |         endIndices1[rank - 1] = halfDim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CustomCallHandlers.swift:789:17: warning: variable 'cosStart' was never mutated; consider changing to 'let' constant
 787 |             // freqs contains both cos and sin interleaved or concatenated
 788 |             // Assume first half is cos, second half is sin
 789 |             var cosStart = [Int](repeating: 0, count: freqsRank)
     |                 `- warning: variable 'cosStart' was never mutated; consider changing to 'let' constant
 790 |             var cosEnd = freqsShape.map { $0.intValue }
 791 |             cosEnd[freqsRank - 1] = halfDim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:2874:13: warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
2872 |
2873 |         // Transpose input to target layout
2874 |         let targetInputOrder: [Int]
     |             `- warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
2875 |         switch targetDataLayout {
2876 |         case .NHWC:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:2905:13: warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
2903 |
2904 |         // Transpose weights if needed
2905 |         let targetKernelOrder: [Int]
     |             `- warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
2906 |         switch targetWeightsLayout {
2907 |         case .HWIO:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:2953:13: warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
2951 |         ]
2952 |
2953 |         let mpsOutputOrder: [Int]
     |             `- warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
2954 |         switch sourceDataLayout {
2955 |         case .NHWC:
[412/432] Compiling MetalHLOCore KernelSpecializer.swift
[413/432] Compiling MetalHLOCore MetalEmitter.swift
[414/432] Compiling MetalHLOCore MetalIR.swift
[415/432] Compiling MetalHLOCore PatternCodegen.swift
[416/432] Compiling MetalHLOCore ReductionKernelGenerator.swift
[417/432] Compiling MetalHLOCore SpecializedAttention.swift
[418/432] Compiling MetalHLOCore SpecializedMatMul.swift
[419/432] Compiling MetalHLOCore TileCalculator.swift
[420/441] Compiling MetalHLO TensorType.swift
[421/441] Compiling MetalHLO MetalHLO.swift
[422/441] Compiling MetalHLO Errors.swift
[423/441] Emitting module MetalHLO
[424/441] Compiling MetalHLO Buffer.swift
[425/441] Compiling MetalHLO Client.swift
[426/441] Compiling MetalHLO CompilationConfig.swift
[427/441] Compiling MetalHLO ElementType.swift
[428/441] Compiling MetalHLO Executable.swift
[429/463] Compiling MetalHLOBenchmarks PowerEfficiencyBenchmarks.swift
[430/464] Compiling MetalHLOBenchmarks TestDataGenerator.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOBenchmarks/TestDataGenerator.swift:144:16: warning: no calls to throwing functions occur within 'try' expression
142 |
143 |         let data = uniformFloat32(count: count)
144 |         return try client.createBuffer(data, shape: shape)
    |                `- warning: no calls to throwing functions occur within 'try' expression
145 |     }
146 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOBenchmarks/TestDataGenerator.swift:170:16: warning: no calls to throwing functions occur within 'try' expression
168 |
169 |         let data = uniformFloat32(count: count, min: min, max: max)
170 |         return try client.createBuffer(data, shape: shape)
    |                `- warning: no calls to throwing functions occur within 'try' expression
171 |     }
172 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOBenchmarks/TestDataGenerator.swift:182:16: warning: no calls to throwing functions occur within 'try' expression
180 |         let count = shape.reduce(1, *)
181 |         let data = normalFloat32(count: count, mean: mean, stdDev: stdDev)
182 |         return try client.createBuffer(data, shape: shape)
    |                `- warning: no calls to throwing functions occur within 'try' expression
183 |     }
184 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOBenchmarks/TestDataGenerator.swift:205:20: warning: no calls to throwing functions occur within 'try' expression
203 |         switch elementType {
204 |         case .float32:
205 |             return try client.createBuffer(zerosFloat32(count: count), shape: shape)
    |                    `- warning: no calls to throwing functions occur within 'try' expression
206 |         case .float16:
207 |             let data = [Float16](repeating: 0, count: count)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOBenchmarks/TestDataGenerator.swift:214:20: warning: no calls to throwing functions occur within 'try' expression
212 |         default:
213 |             // Fallback to float32
214 |             return try client.createBuffer(zerosFloat32(count: count), shape: shape)
    |                    `- warning: no calls to throwing functions occur within 'try' expression
215 |         }
216 |     }
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOBenchmarks/TestDataGenerator.swift:227:16: warning: no calls to throwing functions occur within 'try' expression
225 |             data[i * size + i] = 1.0
226 |         }
227 |         return try client.createBuffer(data, shape: [size, size])
    |                `- warning: no calls to throwing functions occur within 'try' expression
228 |     }
229 | }
[431/464] Emitting module PJRTMetalHLO
[432/464] Compiling PJRTMetalHLO OpaquePointerHelpers.swift
[433/465] Compiling MetalHLOBenchmarks ModelBenchmarks.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOBenchmarks/ModelBenchmarks.swift:479:33: warning: no calls to throwing functions occur within 'try' expression
 477 |                 let input = try gen.createUniformFloat32Buffer(client: client, shape: [1, 56, 56, 64])
 478 |                 let conv1_w = try gen.createNormalFloat32Buffer(client: client, shape: [3, 3, 64, 64], mean: 0, stdDev: 0.05)
 479 |                 let bn1_scale = try client.createBuffer([Float](repeating: 1.0, count: 64), shape: [64])
     |                                 `- warning: no calls to throwing functions occur within 'try' expression
 480 |                 let bn1_offset = try gen.createZerosBuffer(client: client, shape: [64], elementType: .float32)
 481 |                 let bn1_mean = try gen.createZerosBuffer(client: client, shape: [64], elementType: .float32)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOBenchmarks/ModelBenchmarks.swift:482:31: warning: no calls to throwing functions occur within 'try' expression
 480 |                 let bn1_offset = try gen.createZerosBuffer(client: client, shape: [64], elementType: .float32)
 481 |                 let bn1_mean = try gen.createZerosBuffer(client: client, shape: [64], elementType: .float32)
 482 |                 let bn1_var = try client.createBuffer([Float](repeating: 1.0, count: 64), shape: [64])
     |                               `- warning: no calls to throwing functions occur within 'try' expression
 483 |                 let conv2_w = try gen.createNormalFloat32Buffer(client: client, shape: [3, 3, 64, 64], mean: 0, stdDev: 0.05)
 484 |                 let bn2_scale = try client.createBuffer([Float](repeating: 1.0, count: 64), shape: [64])
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOBenchmarks/ModelBenchmarks.swift:484:33: warning: no calls to throwing functions occur within 'try' expression
 482 |                 let bn1_var = try client.createBuffer([Float](repeating: 1.0, count: 64), shape: [64])
 483 |                 let conv2_w = try gen.createNormalFloat32Buffer(client: client, shape: [3, 3, 64, 64], mean: 0, stdDev: 0.05)
 484 |                 let bn2_scale = try client.createBuffer([Float](repeating: 1.0, count: 64), shape: [64])
     |                                 `- warning: no calls to throwing functions occur within 'try' expression
 485 |                 let bn2_offset = try gen.createZerosBuffer(client: client, shape: [64], elementType: .float32)
 486 |                 let bn2_mean = try gen.createZerosBuffer(client: client, shape: [64], elementType: .float32)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOBenchmarks/ModelBenchmarks.swift:487:31: warning: no calls to throwing functions occur within 'try' expression
 485 |                 let bn2_offset = try gen.createZerosBuffer(client: client, shape: [64], elementType: .float32)
 486 |                 let bn2_mean = try gen.createZerosBuffer(client: client, shape: [64], elementType: .float32)
 487 |                 let bn2_var = try client.createBuffer([Float](repeating: 1.0, count: 64), shape: [64])
     |                               `- warning: no calls to throwing functions occur within 'try' expression
 488 |                 return [input, conv1_w, bn1_scale, bn1_offset, bn1_mean, bn1_var, conv2_w, bn2_scale, bn2_offset, bn2_mean, bn2_var]
 489 |             }
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOBenchmarks/ModelBenchmarks.swift:530:33: warning: no calls to throwing functions occur within 'try' expression
 528 |                 let input = try gen.createUniformFloat32Buffer(client: client, shape: [8, 56, 56, 64])
 529 |                 let conv1_w = try gen.createNormalFloat32Buffer(client: client, shape: [3, 3, 64, 64], mean: 0, stdDev: 0.05)
 530 |                 let bn1_scale = try client.createBuffer([Float](repeating: 1.0, count: 64), shape: [64])
     |                                 `- warning: no calls to throwing functions occur within 'try' expression
 531 |                 let bn1_offset = try gen.createZerosBuffer(client: client, shape: [64], elementType: .float32)
 532 |                 let bn1_mean = try gen.createZerosBuffer(client: client, shape: [64], elementType: .float32)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOBenchmarks/ModelBenchmarks.swift:533:31: warning: no calls to throwing functions occur within 'try' expression
 531 |                 let bn1_offset = try gen.createZerosBuffer(client: client, shape: [64], elementType: .float32)
 532 |                 let bn1_mean = try gen.createZerosBuffer(client: client, shape: [64], elementType: .float32)
 533 |                 let bn1_var = try client.createBuffer([Float](repeating: 1.0, count: 64), shape: [64])
     |                               `- warning: no calls to throwing functions occur within 'try' expression
 534 |                 let conv2_w = try gen.createNormalFloat32Buffer(client: client, shape: [3, 3, 64, 64], mean: 0, stdDev: 0.05)
 535 |                 let bn2_scale = try client.createBuffer([Float](repeating: 1.0, count: 64), shape: [64])
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOBenchmarks/ModelBenchmarks.swift:535:33: warning: no calls to throwing functions occur within 'try' expression
 533 |                 let bn1_var = try client.createBuffer([Float](repeating: 1.0, count: 64), shape: [64])
 534 |                 let conv2_w = try gen.createNormalFloat32Buffer(client: client, shape: [3, 3, 64, 64], mean: 0, stdDev: 0.05)
 535 |                 let bn2_scale = try client.createBuffer([Float](repeating: 1.0, count: 64), shape: [64])
     |                                 `- warning: no calls to throwing functions occur within 'try' expression
 536 |                 let bn2_offset = try gen.createZerosBuffer(client: client, shape: [64], elementType: .float32)
 537 |                 let bn2_mean = try gen.createZerosBuffer(client: client, shape: [64], elementType: .float32)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOBenchmarks/ModelBenchmarks.swift:538:31: warning: no calls to throwing functions occur within 'try' expression
 536 |                 let bn2_offset = try gen.createZerosBuffer(client: client, shape: [64], elementType: .float32)
 537 |                 let bn2_mean = try gen.createZerosBuffer(client: client, shape: [64], elementType: .float32)
 538 |                 let bn2_var = try client.createBuffer([Float](repeating: 1.0, count: 64), shape: [64])
     |                               `- warning: no calls to throwing functions occur within 'try' expression
 539 |                 return [input, conv1_w, bn1_scale, bn1_offset, bn1_mean, bn1_var, conv2_w, bn2_scale, bn2_offset, bn2_mean, bn2_var]
 540 |             }
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOBenchmarks/ModelBenchmarks.swift:1020:29: warning: no calls to throwing functions occur within 'try' expression
1018 |                 let gen = TestDataGenerator(seed: 42)
1019 |                 let x = try gen.createUniformFloat32Buffer(client: client, shape: [1, 128, 768])
1020 |                 let ln1_g = try client.createBuffer([Float](repeating: 1.0, count: 768), shape: [768])
     |                             `- warning: no calls to throwing functions occur within 'try' expression
1021 |                 let ln1_b = try gen.createZerosBuffer(client: client, shape: [768], elementType: .float32)
1022 |                 let wq = try gen.createNormalFloat32Buffer(client: client, shape: [768, 768], mean: 0, stdDev: 0.02)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOBenchmarks/ModelBenchmarks.swift:1026:29: warning: no calls to throwing functions occur within 'try' expression
1024 |                 let wv = try gen.createNormalFloat32Buffer(client: client, shape: [768, 768], mean: 0, stdDev: 0.02)
1025 |                 let wo = try gen.createNormalFloat32Buffer(client: client, shape: [768, 768], mean: 0, stdDev: 0.02)
1026 |                 let ln2_g = try client.createBuffer([Float](repeating: 1.0, count: 768), shape: [768])
     |                             `- warning: no calls to throwing functions occur within 'try' expression
1027 |                 let ln2_b = try gen.createZerosBuffer(client: client, shape: [768], elementType: .float32)
1028 |                 let ff_w1 = try gen.createNormalFloat32Buffer(client: client, shape: [768, 3072], mean: 0, stdDev: 0.02)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOBenchmarks/ModelBenchmarks.swift:1159:38: warning: no calls to throwing functions occur within 'try' expression
1157 |                     tokenIds.append(Int32(gen.uniformFloat32(count: 1)[0] * 29999))
1158 |                 }
1159 |                 let tokenIdsBuffer = try client.createBuffer(tokenIds, shape: [8, 128])
     |                                      `- warning: no calls to throwing functions occur within 'try' expression
1160 |                 return [embeddings, tokenIdsBuffer]
1161 |             },
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOBenchmarks/ModelBenchmarks.swift:1201:28: warning: no calls to throwing functions occur within 'try' expression
1199 |                 let images = try gen.createUniformFloat32Buffer(client: client, shape: [32, 224, 224, 3], min: 0, max: 255)
1200 |                 // ImageNet mean and std
1201 |                 let mean = try client.createBuffer([Float(123.675), Float(116.28), Float(103.53)], shape: [3])
     |                            `- warning: no calls to throwing functions occur within 'try' expression
1202 |                 let std = try client.createBuffer([Float(58.395), Float(57.12), Float(57.375)], shape: [3])
1203 |                 return [images, mean, std]
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOBenchmarks/ModelBenchmarks.swift:1202:27: warning: no calls to throwing functions occur within 'try' expression
1200 |                 // ImageNet mean and std
1201 |                 let mean = try client.createBuffer([Float(123.675), Float(116.28), Float(103.53)], shape: [3])
1202 |                 let std = try client.createBuffer([Float(58.395), Float(57.12), Float(57.375)], shape: [3])
     |                           `- warning: no calls to throwing functions occur within 'try' expression
1203 |                 return [images, mean, std]
1204 |             }
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOBenchmarks/ModelBenchmarks.swift:1261:36: warning: no calls to throwing functions occur within 'try' expression
1259 |                     labels.append(Int32(gen.uniformFloat32(count: 1)[0] * 999))
1260 |                 }
1261 |                 let labelsBuffer = try client.createBuffer(labels, shape: [32])
     |                                    `- warning: no calls to throwing functions occur within 'try' expression
1262 |                 return [logits, labelsBuffer]
1263 |             }
[434/465] Compiling MetalHLOBenchmarks GPUMetrics.swift
[435/465] Compiling MetalHLOBenchmarks FusionAnalysisBenchmarks.swift
[436/465] Compiling MetalHLOBenchmarks CompilerBenchmarks.swift
[437/465] Compiling MetalHLOBenchmarks BenchmarkResult.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOBenchmarks/BenchmarkResult.swift:262:24: warning: 'init(cString:)' is deprecated: Use String(decoding: array, as: UTF8.self) instead, after truncating the null termination. [#DeprecatedDeclaration]
260 |             var buffer = [CChar](repeating: 0, count: size)
261 |             sysctlbyname("machdep.cpu.brand_string", &buffer, &size, nil, 0)
262 |             chipName = String(cString: buffer)
    |                        `- warning: 'init(cString:)' is deprecated: Use String(decoding: array, as: UTF8.self) instead, after truncating the null termination. [#DeprecatedDeclaration]
263 |         }
264 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOBenchmarks/BenchmarkResult.swift:272:28: warning: 'init(cString:)' is deprecated: Use String(decoding: array, as: UTF8.self) instead, after truncating the null termination. [#DeprecatedDeclaration]
270 |                 var buffer = [CChar](repeating: 0, count: size)
271 |                 sysctlbyname("hw.model", &buffer, &size, nil, 0)
272 |                 chipName = String(cString: buffer)
    |                            `- warning: 'init(cString:)' is deprecated: Use String(decoding: array, as: UTF8.self) instead, after truncating the null termination. [#DeprecatedDeclaration]
273 |             }
274 |         }
[#DeprecatedDeclaration]: <https://docs.swift.org/compiler/documentation/diagnostics/deprecated-declaration>
[438/465] Compiling MetalHLOBenchmarks BenchmarkRunner.swift
[439/465] Compiling MetalHLOBenchmarks OperationBenchmarks.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOBenchmarks/OperationBenchmarks.swift:493:25: warning: no calls to throwing functions occur within 'try' expression
 491 |                 let gen = TestDataGenerator(seed: 42)
 492 |                 let a = try gen.createUniformFloat32Buffer(client: client, shape: [1024, 1024])
 493 |                 let b = try client.createBuffer([1.5], shape: [1])
     |                         `- warning: no calls to throwing functions occur within 'try' expression
 494 |                 return [a, b]
 495 |             }
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOBenchmarks/OperationBenchmarks.swift:870:25: warning: no calls to throwing functions occur within 'try' expression
 868 |             """,
 869 |             inputGenerator: { client in
 870 |                 return [try client.createBuffer([Int32(0)], shape: [1])]
     |                         `- warning: no calls to throwing functions occur within 'try' expression
 871 |             }
 872 |         ))
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOBenchmarks/OperationBenchmarks.swift:1082:30: warning: no calls to throwing functions occur within 'try' expression
1080 |                 let gen = TestDataGenerator(seed: 42)
1081 |                 let input = try gen.createUniformFloat32Buffer(client: client, shape: [1024, 1024])
1082 |                 let start0 = try client.createBuffer([Int32(128)], shape: [1])
     |                              `- warning: no calls to throwing functions occur within 'try' expression
1083 |                 let start1 = try client.createBuffer([Int32(128)], shape: [1])
1084 |                 return [input, start0, start1]
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOBenchmarks/OperationBenchmarks.swift:1083:30: warning: no calls to throwing functions occur within 'try' expression
1081 |                 let input = try gen.createUniformFloat32Buffer(client: client, shape: [1024, 1024])
1082 |                 let start0 = try client.createBuffer([Int32(128)], shape: [1])
1083 |                 let start1 = try client.createBuffer([Int32(128)], shape: [1])
     |                              `- warning: no calls to throwing functions occur within 'try' expression
1084 |                 return [input, start0, start1]
1085 |             }
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOBenchmarks/OperationBenchmarks.swift:1107:30: warning: no calls to throwing functions occur within 'try' expression
1105 |                 let input = try gen.createUniformFloat32Buffer(client: client, shape: [1024, 1024])
1106 |                 let update = try gen.createUniformFloat32Buffer(client: client, shape: [256, 256])
1107 |                 let start0 = try client.createBuffer([Int32(128)], shape: [1])
     |                              `- warning: no calls to throwing functions occur within 'try' expression
1108 |                 let start1 = try client.createBuffer([Int32(128)], shape: [1])
1109 |                 return [input, update, start0, start1]
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOBenchmarks/OperationBenchmarks.swift:1108:30: warning: no calls to throwing functions occur within 'try' expression
1106 |                 let update = try gen.createUniformFloat32Buffer(client: client, shape: [256, 256])
1107 |                 let start0 = try client.createBuffer([Int32(128)], shape: [1])
1108 |                 let start1 = try client.createBuffer([Int32(128)], shape: [1])
     |                              `- warning: no calls to throwing functions occur within 'try' expression
1109 |                 return [input, update, start0, start1]
1110 |             }
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOBenchmarks/OperationBenchmarks.swift:1141:37: warning: no calls to throwing functions occur within 'try' expression
1139 |                     indices.append(Int32(gen.uniformFloat32(count: 1)[0] * 9999))
1140 |                 }
1141 |                 let indicesBuffer = try client.createBuffer(indices, shape: [1024])
     |                                     `- warning: no calls to throwing functions occur within 'try' expression
1142 |                 return [table, indicesBuffer]
1143 |             },
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOBenchmarks/OperationBenchmarks.swift:1188:37: warning: no calls to throwing functions occur within 'try' expression
1186 |                     indices.append(Int32(gen.uniformFloat32(count: 1)[0] * 9999))
1187 |                 }
1188 |                 let indicesBuffer = try client.createBuffer(indices, shape: [1024, 1])
     |                                     `- warning: no calls to throwing functions occur within 'try' expression
1189 |                 let updates = try gen.createUniformFloat32Buffer(client: client, shape: [1024, 256])
1190 |                 return [table, indicesBuffer, updates]
[440/465] Compiling MetalHLOBenchmarks MemoryBenchmarks.swift
[441/465] Emitting module MetalHLOBenchmarks
[442/465] Compiling CMetalHLO CInterface.swift
[443/465] Emitting module CMetalHLO
[443/465] Write Objects.LinkFileList
[445/471] Compiling PJRTMetalHLO PJRTTopology.swift
[445/471] Linking libCMetalHLO.dylib
[447/471] Compiling PJRTMetalHLO PJRTMemory.swift
[448/471] Compiling PJRTMetalHLO PJRTEvent.swift
[449/471] Compiling PJRTMetalHLO PJRTError.swift
[450/471] Compiling PJRTMetalHLO PJRTClient.swift
[451/471] Compiling PJRTMetalHLO PJRTDevice.swift
/Users/admin/builder/spi-builder-workspace/Sources/PJRTMetalHLO/PJRTDevice.swift:271:9: warning: initialization of immutable value 'totalBytes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
269 |
270 |     // Report recommended max working set size as total memory
271 |     let totalBytes = Int64(mtl.recommendedMaxWorkingSetSize)
    |         `- warning: initialization of immutable value 'totalBytes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
272 |     args.pointee.bytes_in_use = 0 // Not easily tracked per-device in Metal
273 |     return nil
[452/471] Compiling PJRTMetalHLO PJRTBuffer.swift
[453/471] Compiling PJRTMetalHLO PJRTApi.swift
[454/471] Compiling PJRTMetalHLO PJRTExecutable.swift
[454/471] Write Objects.LinkFileList
[456/471] Compiling BenchmarkRunner main.swift
[457/471] Emitting module BenchmarkRunner
[457/471] Write Objects.LinkFileList
[459/471] Emitting module DepthAttentionBenchmark
[460/471] Compiling DepthAttentionBenchmark main.swift
/Users/admin/builder/spi-builder-workspace/Sources/DepthAttentionBenchmark/main.swift:341:17: warning: initialization of immutable value 'params' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
339 |         for i in 0..<numCalls {
340 |             let depth = i + 2
341 |             let params = DepthAttentionParams(batchSize: batchSize, depthDim: depth, hiddenDim: hiddenDim, scale: scale)
    |                 `- warning: initialization of immutable value 'params' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
342 |             let numSG = DepthAttentionKernel.optimalSimdgroups(hiddenDim: hiddenDim)
343 |             var gpuParams = GPUDepthAttentionParamsPublic(
/Users/admin/builder/spi-builder-workspace/Sources/DepthAttentionBenchmark/main.swift:410:9: warning: initialization of immutable value 'layersPerBlock' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
408 |     let numLayers = 12
409 |     let numBlocks = 8
410 |     let layersPerBlock = numLayers / numBlocks
    |         `- warning: initialization of immutable value 'layersPerBlock' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
411 |     let hiddenDim = 768
412 |     let scale: Float = 1.0 / sqrt(Float(hiddenDim))
/Users/admin/builder/spi-builder-workspace/Sources/DepthAttentionBenchmark/main.swift:420:13: warning: initialization of immutable value 'matmulElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
418 |     for batchSize in [1, 4, 8, 16, 32] {
419 |         let totalQ = batchSize * hiddenDim
420 |         let matmulElements = batchSize * hiddenDim * hiddenDim
    |             `- warning: initialization of immutable value 'matmulElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
421 |
422 |         // Allocate weight matrix and hidden state buffers
/Users/admin/builder/spi-builder-workspace/Sources/DepthAttentionBenchmark/main.swift:425:13: warning: initialization of immutable value 'weightBuf' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
423 |         var weightData = [Float](repeating: 0, count: hiddenDim * hiddenDim)
424 |         for i in 0..<weightData.count { weightData[i] = Float.random(in: -0.01...0.01) }
425 |         let weightBuf = device.makeBuffer(bytes: weightData, length: hiddenDim * hiddenDim * 4, options: .storageModeShared)!
    |             `- warning: initialization of immutable value 'weightBuf' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
426 |
427 |         var hData = [Float](repeating: 0, count: totalQ)
/Users/admin/builder/spi-builder-workspace/Sources/DepthAttentionBenchmark/main.swift:429:13: warning: initialization of immutable value 'hBuf' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
427 |         var hData = [Float](repeating: 0, count: totalQ)
428 |         for i in 0..<totalQ { hData[i] = Float.random(in: -0.5...0.5) }
429 |         let hBuf = device.makeBuffer(bytes: hData, length: totalQ * 4, options: .storageModeShared)!
    |             `- warning: initialization of immutable value 'hBuf' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
430 |         let outBuf = device.makeBuffer(length: totalQ * 4, options: .storageModeShared)!
431 |
/Users/admin/builder/spi-builder-workspace/Sources/DepthAttentionBenchmark/main.swift:430:13: warning: initialization of immutable value 'outBuf' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
428 |         for i in 0..<totalQ { hData[i] = Float.random(in: -0.5...0.5) }
429 |         let hBuf = device.makeBuffer(bytes: hData, length: totalQ * 4, options: .storageModeShared)!
430 |         let outBuf = device.makeBuffer(length: totalQ * 4, options: .storageModeShared)!
    |             `- warning: initialization of immutable value 'outBuf' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
431 |
432 |         // --- Standard path: 12 matmuls (simulate layer compute), no depth attention ---
[460/471] Write Objects.LinkFileList
[462/471] Compiling MLXBenchmarks MLXBenchmarks.swift
[463/471] Emitting module MLXBenchmarks
[463/473] Linking libPJRTMetalHLO.dylib
[464/473] Linking benchmark-runner
[465/473] Applying benchmark-runner
[466/473] Linking DepthAttentionBenchmark
[467/473] Applying DepthAttentionBenchmark
[469/473] Compiling MLXComparison main.swift
[470/473] Emitting module MLXComparison
[470/473] Write Objects.LinkFileList
[471/473] Linking mlx-comparison
[472/473] Applying mlx-comparison
Build complete! (44.68s)
Build complete.
{
  "dependencies" : [
    {
      "identity" : "mlx-swift",
      "requirement" : {
        "range" : [
          {
            "lower_bound" : "0.21.0",
            "upper_bound" : "1.0.0"
          }
        ]
      },
      "type" : "sourceControl",
      "url" : "https://github.com/ml-explore/mlx-swift"
    }
  ],
  "manifest_display_name" : "MetalHLO",
  "name" : "MetalHLO",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "14.0"
    }
  ],
  "products" : [
    {
      "name" : "MetalHLO",
      "targets" : [
        "MetalHLO"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    },
    {
      "name" : "CMetalHLO",
      "targets" : [
        "CMetalHLO"
      ],
      "type" : {
        "library" : [
          "dynamic"
        ]
      }
    },
    {
      "name" : "PJRTMetalHLO",
      "targets" : [
        "PJRTMetalHLO"
      ],
      "type" : {
        "library" : [
          "dynamic"
        ]
      }
    },
    {
      "name" : "ANERuntime",
      "targets" : [
        "ANERuntime"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    },
    {
      "name" : "MetalHLOBenchmarks",
      "targets" : [
        "MetalHLOBenchmarks"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    },
    {
      "name" : "MLXBenchmarks",
      "targets" : [
        "MLXBenchmarks"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    },
    {
      "name" : "benchmark-runner",
      "targets" : [
        "BenchmarkRunner"
      ],
      "type" : {
        "executable" : null
      }
    },
    {
      "name" : "mlx-comparison",
      "targets" : [
        "MLXComparison"
      ],
      "type" : {
        "executable" : null
      }
    },
    {
      "name" : "HeterogeneousFusionBenchmark",
      "targets" : [
        "HeterogeneousFusionBenchmark"
      ],
      "type" : {
        "executable" : null
      }
    },
    {
      "name" : "GPT2EndToEnd",
      "targets" : [
        "GPT2EndToEnd"
      ],
      "type" : {
        "executable" : null
      }
    },
    {
      "name" : "DepthAttentionBenchmark",
      "targets" : [
        "DepthAttentionBenchmark"
      ],
      "type" : {
        "executable" : null
      }
    },
    {
      "name" : "CalibrateTest",
      "targets" : [
        "CalibrateTest"
      ],
      "type" : {
        "executable" : null
      }
    }
  ],
  "swift_languages_versions" : [
    "6"
  ],
  "targets" : [
    {
      "c99name" : "PJRTMetalHLOTests",
      "module_type" : "SwiftTarget",
      "name" : "PJRTMetalHLOTests",
      "path" : "Tests/PJRTMetalHLOTests",
      "sources" : [
        "PJRTPluginTests.swift"
      ],
      "target_dependencies" : [
        "PJRTMetalHLO",
        "MetalHLO"
      ],
      "type" : "test"
    },
    {
      "c99name" : "PJRTMetalHLO",
      "module_type" : "SwiftTarget",
      "name" : "PJRTMetalHLO",
      "path" : "Sources/PJRTMetalHLO",
      "product_memberships" : [
        "PJRTMetalHLO"
      ],
      "sources" : [
        "OpaquePointerHelpers.swift",
        "PJRTApi.swift",
        "PJRTBuffer.swift",
        "PJRTClient.swift",
        "PJRTDevice.swift",
        "PJRTError.swift",
        "PJRTEvent.swift",
        "PJRTExecutable.swift",
        "PJRTMemory.swift",
        "PJRTTopology.swift"
      ],
      "target_dependencies" : [
        "MetalHLO",
        "MetalHLOCore",
        "CPJRTApi",
        "ANERuntime"
      ],
      "type" : "library"
    },
    {
      "c99name" : "MetalHLOTests",
      "module_type" : "SwiftTarget",
      "name" : "MetalHLOTests",
      "path" : "Tests/MetalHLOTests",
      "sources" : [
        "ActivationOpsTests.swift",
        "CAPITests.swift",
        "ClientTests.swift",
        "Conformance/ConformanceAnalyzer.swift",
        "Conformance/ConformanceTestCLI.swift",
        "Conformance/ConformanceTestRunner.swift",
        "Conformance/StableHLO/IndexingConformanceTests.swift",
        "Conformance/StableHLO/IndexingOperationsDiagnostic.swift",
        "Conformance/StableHLO/InterpretTestParser.swift",
        "Conformance/StableHLO/InterpretTestRunner.swift",
        "Conformance/StableHLO/OfficialConformanceTests.swift",
        "Conformance/StableHLO/OfficialTestManager.swift",
        "Conformance/StableHLO/OptimizationBugDiagnostic.swift",
        "Conformance/StableHLO/OptimizationCorrectnessTests.swift",
        "Conformance/StableHLOConformanceTests.swift",
        "Conformance/StableHLOTestManager.swift",
        "Conformance/StableHLOTestParser.swift",
        "ConstantHandlingTests.swift",
        "ControlFlowTests.swift",
        "IndexingOpsTests.swift",
        "IntegrationTests.swift",
        "NewOpsTests.swift",
        "OperationTests.swift",
        "ProducerConsumerFusionBugTest.swift",
        "QuickWinsOpsTests.swift",
        "RNGTypesTests.swift",
        "TrainingOpsTests.swift"
      ],
      "target_dependencies" : [
        "MetalHLO",
        "CMetalHLO"
      ],
      "type" : "test"
    },
    {
      "c99name" : "MetalHLOCoreTests",
      "module_type" : "SwiftTarget",
      "name" : "MetalHLOCoreTests",
      "path" : "Tests/MetalHLOCoreTests",
      "sources" : [
        "ANE/MILEmitterTests.swift",
        "ANE/MILWeightPackerTests.swift",
        "AnalyzerTests.swift",
        "CanonicalizersTests.swift",
        "CodegenTests.swift",
        "CrossEntropyTest.swift",
        "CrossLayerFusionTests.swift",
        "CustomCallTests.swift",
        "DepthAttentionTests.swift",
        "GatherBatchingTests.swift",
        "GatherMLIRFormatTest.swift",
        "HLOOptimizerTests.swift",
        "HeterogeneousIntegrationTests.swift",
        "IntegratedExecutorTests.swift",
        "KernelCacheTests.swift",
        "KernelDispatchRegressionTests.swift",
        "LLMOptimizationsTests.swift",
        "LexerTests.swift",
        "MILFusionTests.swift",
        "MemoryPlanningTests.swift",
        "MetalKernelTests.swift",
        "NeuralEngineTargetingTests.swift",
        "ParserTests.swift",
        "PartitionerTests.swift",
        "PassManagerTests.swift",
        "PatternCodegenTests.swift",
        "PermutationUtilsTests.swift",
        "ProfileGuidedOptimizationTests.swift",
        "QuantizationAwareTests.swift",
        "ReduceTest.swift",
        "RematerializationTests.swift",
        "ScatterTest.swift",
        "SharedIOSurfaceTests.swift",
        "TuningTests.swift",
        "ZeroAllocExecutionTests.swift"
      ],
      "target_dependencies" : [
        "MetalHLOCore",
        "MetalHLO"
      ],
      "type" : "test"
    },
    {
      "c99name" : "MetalHLOCore",
      "module_type" : "SwiftTarget",
      "name" : "MetalHLOCore",
      "path" : "Sources/MetalHLOCore",
      "product_memberships" : [
        "MetalHLO",
        "CMetalHLO",
        "PJRTMetalHLO",
        "MetalHLOBenchmarks",
        "MLXBenchmarks",
        "benchmark-runner",
        "mlx-comparison",
        "DepthAttentionBenchmark"
      ],
      "sources" : [
        "ANE/CoreMLOpBuilder.swift",
        "ANE/MILEmitter.swift",
        "ANE/MILFusionRewriter.swift",
        "ANE/MILOpTranslator.swift",
        "ANE/MILTextBuilder.swift",
        "ANE/MILTypeMapper.swift",
        "ANE/MILWeightPacker.swift",
        "Cache/KernelCache.swift",
        "Codegen/KernelSpecializer.swift",
        "Codegen/MetalEmitter.swift",
        "Codegen/MetalIR.swift",
        "Codegen/PatternCodegen.swift",
        "Codegen/ReductionKernelGenerator.swift",
        "Codegen/SpecializedAttention.swift",
        "Codegen/SpecializedMatMul.swift",
        "Codegen/TileCalculator.swift",
        "Compiler/Analyzer.swift",
        "Compiler/CodeGenerator.swift",
        "Compiler/CustomCallHandlers.swift",
        "Compiler/EmbeddedAttentionSplitter.swift",
        "Compiler/IntegrationTypes.swift",
        "Compiler/KernelTypes.swift",
        "Compiler/MPSGraphCompiler.swift",
        "Compiler/MetalHLOCompiler.swift",
        "Compiler/OpEmitter.swift",
        "Compiler/PassManager.swift",
        "Compiler/TF32Transform.swift",
        "IR/Attributes.swift",
        "IR/HLOFunction.swift",
        "IR/HLOModule.swift",
        "IR/HLOOpKind.swift",
        "IR/HLOOperation.swift",
        "IR/TensorType.swift",
        "LLM/LLMOptimizations.swift",
        "Memory/StaticMemoryPlanner.swift",
        "Metal/Kernels/DepthAttentionKernel.swift",
        "Metal/Kernels/FlashAttentionKernel.swift",
        "Metal/Kernels/GELUKernel.swift",
        "Metal/Kernels/KernelRegistry.swift",
        "Metal/Kernels/LayerNormKernel.swift",
        "Metal/Kernels/MetalKernel.swift",
        "Metal/Kernels/SoftmaxKernel.swift",
        "Metal/Kernels/UnaryKernels.swift",
        "Optimizer/AlgebraicSimplifier.swift",
        "Optimizer/BufferAssignment.swift",
        "Optimizer/Canonicalizers.swift",
        "Optimizer/CostModel.swift",
        "Optimizer/CrossLayerFusion.swift",
        "Optimizer/FusionPatterns.swift",
        "Optimizer/HLOOptimizer.swift",
        "Optimizer/HLOPattern.swift",
        "Optimizer/HorizontalFusion.swift",
        "Optimizer/LayoutAssignment.swift",
        "Optimizer/ProducerConsumerFusion.swift",
        "Optimizer/ProfileGuidedOptimization.swift",
        "Optimizer/QuantizationAware.swift",
        "Optimizer/Rematerialization.swift",
        "Optimizer/SiblingFusion.swift",
        "Parser/Lexer.swift",
        "Parser/ParseError.swift",
        "Parser/Parser.swift",
        "Parser/Token.swift",
        "Runtime/BufferStorage.swift",
        "Runtime/CompilationCache.swift",
        "Runtime/IntegratedExecutor.swift",
        "Runtime/LargeTensorPool.swift",
        "Runtime/LargeTensorStorage.swift",
        "Runtime/LayerAccumulationBuffer.swift",
        "Runtime/MetalExecutor.swift",
        "Runtime/NeuralEngineTargeting.swift",
        "Runtime/SharedIOSurfaceBuffer.swift",
        "Runtime/StridedTensorView.swift",
        "Runtime/SubFunctionExtractor.swift",
        "Runtime/TensorTransferManager.swift",
        "Runtime/ZeroAllocExecutor.swift",
        "Tuning/AutoTuner.swift",
        "Tuning/TuningDatabase.swift",
        "Utils/PermutationUtils.swift"
      ],
      "target_dependencies" : [
        "ANERuntime"
      ],
      "type" : "library"
    },
    {
      "c99name" : "MetalHLOBenchmarks",
      "module_type" : "SwiftTarget",
      "name" : "MetalHLOBenchmarks",
      "path" : "Sources/MetalHLOBenchmarks",
      "product_memberships" : [
        "MetalHLOBenchmarks",
        "MLXBenchmarks",
        "benchmark-runner",
        "mlx-comparison",
        "DepthAttentionBenchmark"
      ],
      "sources" : [
        "BenchmarkResult.swift",
        "BenchmarkRunner.swift",
        "CompilerBenchmarks.swift",
        "FusionAnalysisBenchmarks.swift",
        "GPUMetrics.swift",
        "MemoryBenchmarks.swift",
        "ModelBenchmarks.swift",
        "OperationBenchmarks.swift",
        "PowerEfficiencyBenchmarks.swift",
        "TestDataGenerator.swift"
      ],
      "target_dependencies" : [
        "MetalHLO"
      ],
      "type" : "library"
    },
    {
      "c99name" : "MetalHLO",
      "module_type" : "SwiftTarget",
      "name" : "MetalHLO",
      "path" : "Sources/MetalHLO",
      "product_memberships" : [
        "MetalHLO",
        "CMetalHLO",
        "PJRTMetalHLO",
        "MetalHLOBenchmarks",
        "MLXBenchmarks",
        "benchmark-runner",
        "mlx-comparison",
        "DepthAttentionBenchmark"
      ],
      "sources" : [
        "Buffer.swift",
        "Client.swift",
        "CompilationConfig.swift",
        "ElementType.swift",
        "Errors.swift",
        "Executable.swift",
        "MetalHLO.swift",
        "TensorType.swift"
      ],
      "target_dependencies" : [
        "MetalHLOCore"
      ],
      "type" : "library"
    },
    {
      "c99name" : "MLXComparison",
      "module_type" : "SwiftTarget",
      "name" : "MLXComparison",
      "path" : "Sources/MLXComparison",
      "product_memberships" : [
        "mlx-comparison"
      ],
      "sources" : [
        "main.swift"
      ],
      "target_dependencies" : [
        "MLXBenchmarks",
        "MetalHLOBenchmarks"
      ],
      "type" : "executable"
    },
    {
      "c99name" : "MLXBenchmarks",
      "module_type" : "SwiftTarget",
      "name" : "MLXBenchmarks",
      "path" : "Sources/MLXBenchmarks",
      "product_dependencies" : [
        "MLX",
        "MLXRandom"
      ],
      "product_memberships" : [
        "MLXBenchmarks",
        "mlx-comparison"
      ],
      "sources" : [
        "MLXBenchmarks.swift"
      ],
      "target_dependencies" : [
        "MetalHLOBenchmarks"
      ],
      "type" : "library"
    },
    {
      "c99name" : "HeterogeneousFusionBenchmark",
      "module_type" : "SwiftTarget",
      "name" : "HeterogeneousFusionBenchmark",
      "path" : "Sources/HeterogeneousFusionBenchmark",
      "product_memberships" : [
        "HeterogeneousFusionBenchmark"
      ],
      "sources" : [
        "main.swift"
      ],
      "target_dependencies" : [
        "HeterogeneousFusion"
      ],
      "type" : "executable"
    },
    {
      "c99name" : "HeterogeneousFusion",
      "module_type" : "SwiftTarget",
      "name" : "HeterogeneousFusion",
      "path" : "Sources/HeterogeneousFusion",
      "product_memberships" : [
        "HeterogeneousFusionBenchmark",
        "GPT2EndToEnd",
        "CalibrateTest"
      ],
      "sources" : [
        "AttentionExecutor.swift",
        "BenchmarkHarness.swift",
        "ColumnSplitHelper.swift",
        "ComputeUnit.swift",
        "ContentionModel.swift",
        "ConvolutionCPU.swift",
        "ConvolutionGPU.swift",
        "ConvolutionMPS.swift",
        "ElementwiseCPU.swift",
        "ElementwiseGPU.swift",
        "EligibilityAnnotationPass.swift",
        "EmbeddingCPU.swift",
        "EmbeddingGPU.swift",
        "FusedExecutor.swift",
        "FusedMatmul.swift",
        "HardwareCalibration.swift",
        "HardwareMonitor.swift",
        "HardwareProfile.swift",
        "HeteroGraph.swift",
        "HeterogeneousError.swift",
        "HeterogeneousPartitioningPass.swift",
        "LayerNormCPU.swift",
        "LayerNormGPU.swift",
        "MatmulANE.swift",
        "MatmulCPU.swift",
        "MatmulGPU.swift",
        "OpFusionPass.swift",
        "OptimalSplitter.swift",
        "PartitionDescriptor.swift",
        "ProfileDatabase.swift",
        "ProfitabilityGuard.swift",
        "SequentialScheduler.swift",
        "SoftmaxCPU.swift",
        "SoftmaxGPU.swift",
        "ThroughputCurve.swift"
      ],
      "type" : "library"
    },
    {
      "c99name" : "GPT2EndToEnd",
      "module_type" : "SwiftTarget",
      "name" : "GPT2EndToEnd",
      "path" : "Sources/GPT2EndToEnd",
      "product_memberships" : [
        "GPT2EndToEnd"
      ],
      "sources" : [
        "main.swift"
      ],
      "target_dependencies" : [
        "HeterogeneousFusion"
      ],
      "type" : "executable"
    },
    {
      "c99name" : "DepthAttentionBenchmark",
      "module_type" : "SwiftTarget",
      "name" : "DepthAttentionBenchmark",
      "path" : "Sources/DepthAttentionBenchmark",
      "product_memberships" : [
        "DepthAttentionBenchmark"
      ],
      "sources" : [
        "main.swift"
      ],
      "target_dependencies" : [
        "MetalHLOCore",
        "MetalHLOBenchmarks"
      ],
      "type" : "executable"
    },
    {
      "c99name" : "CalibrateTest",
      "module_type" : "SwiftTarget",
      "name" : "CalibrateTest",
      "path" : "Sources/CalibrateTest",
      "product_memberships" : [
        "CalibrateTest"
      ],
      "sources" : [
        "main.swift"
      ],
      "target_dependencies" : [
        "HeterogeneousFusion"
      ],
      "type" : "executable"
    },
    {
      "c99name" : "CPJRTApi",
      "module_type" : "ClangTarget",
      "name" : "CPJRTApi",
      "path" : "Sources/CPJRTApi",
      "product_memberships" : [
        "PJRTMetalHLO"
      ],
      "sources" : [
        "shim.c"
      ],
      "type" : "library"
    },
    {
      "c99name" : "CMetalHLO",
      "module_type" : "SwiftTarget",
      "name" : "CMetalHLO",
      "path" : "Sources/CMetalHLO",
      "product_memberships" : [
        "CMetalHLO"
      ],
      "sources" : [
        "CInterface.swift"
      ],
      "target_dependencies" : [
        "MetalHLO",
        "ANERuntime"
      ],
      "type" : "library"
    },
    {
      "c99name" : "BenchmarkRunner",
      "module_type" : "SwiftTarget",
      "name" : "BenchmarkRunner",
      "path" : "Sources/BenchmarkRunner",
      "product_memberships" : [
        "benchmark-runner"
      ],
      "sources" : [
        "main.swift"
      ],
      "target_dependencies" : [
        "MetalHLOBenchmarks"
      ],
      "type" : "executable"
    },
    {
      "c99name" : "ANERuntimeTests",
      "module_type" : "SwiftTarget",
      "name" : "ANERuntimeTests",
      "path" : "Tests/ANERuntimeTests",
      "sources" : [
        "ANEAvailabilityTests.swift",
        "ANEBufferTests.swift",
        "ANECompileCounterTests.swift",
        "ANEDeviceTests.swift",
        "ANEMILIntegrationTests.swift",
        "ANEWatchdogTests.swift",
        "CoreMLBridgeTests.swift"
      ],
      "target_dependencies" : [
        "ANERuntime",
        "MetalHLOCore"
      ],
      "type" : "test"
    },
    {
      "c99name" : "ANERuntime",
      "module_type" : "SwiftTarget",
      "name" : "ANERuntime",
      "path" : "Sources/ANERuntime",
      "product_memberships" : [
        "MetalHLO",
        "CMetalHLO",
        "PJRTMetalHLO",
        "ANERuntime",
        "MetalHLOBenchmarks",
        "MLXBenchmarks",
        "benchmark-runner",
        "mlx-comparison",
        "DepthAttentionBenchmark"
      ],
      "sources" : [
        "ANEAvailability.swift",
        "ANEBuffer.swift",
        "ANEDevice.swift",
        "ANEError.swift",
        "ANEProgram.swift",
        "ANEWatchdog.swift",
        "CompileCounter.swift",
        "CoreMLBridge.swift",
        "CoreMLModelBuilder.swift",
        "CoreMLOp.swift",
        "CoreMLProgram.swift",
        "MILWeightTemplate.swift",
        "Protobuf/CoreMLProto.swift",
        "Protobuf/ProtobufWriter.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "6.0"
}
Done.