Build Information
Successful build of MetalHLO, reference main (7fabaa), with Swift 6.3 for macOS (SPM) on 14 Oct 2026 06:30:38 UTC.
Swift 6 data race errors: 0
Build Command
env DEVELOPER_DIR=/Applications/Xcode-26.5.0.app xcrun swift build --arch arm64Build Log
531 |
532 | guard info == 0 else {
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/MetalExecutor.swift:614:9: warning: 'sgeqrf_' was deprecated in macOS 13.3: The CLAPACK interface is deprecated. Please compile with -DACCELERATE_NEW_LAPACK to access the new lapack headers. [#DeprecatedDeclaration]
612 | var wkopt = Float(0)
613 | var lwork = __CLPK_integer(-1)
614 | sgeqrf_(&lm, &ln, &a, &lda, &tau, &wkopt, &lwork, &info)
| `- warning: 'sgeqrf_' was deprecated in macOS 13.3: The CLAPACK interface is deprecated. Please compile with -DACCELERATE_NEW_LAPACK to access the new lapack headers. [#DeprecatedDeclaration]
615 | lwork = __CLPK_integer(wkopt)
616 | var work = [Float](repeating: 0, count: Int(max(1, lwork)))
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/MetalExecutor.swift:617:9: warning: 'sgeqrf_' was deprecated in macOS 13.3: The CLAPACK interface is deprecated. Please compile with -DACCELERATE_NEW_LAPACK to access the new lapack headers. [#DeprecatedDeclaration]
615 | lwork = __CLPK_integer(wkopt)
616 | var work = [Float](repeating: 0, count: Int(max(1, lwork)))
617 | sgeqrf_(&lm, &ln, &a, &lda, &tau, &work, &lwork, &info)
| `- warning: 'sgeqrf_' was deprecated in macOS 13.3: The CLAPACK interface is deprecated. Please compile with -DACCELERATE_NEW_LAPACK to access the new lapack headers. [#DeprecatedDeclaration]
618 | guard info == 0 else {
619 | throw ExecutorError.generalError("LAPACK sgeqrf failed with info=\(info)")
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/MetalExecutor.swift:636:9: warning: 'sorgqr_' was deprecated in macOS 13.3: The CLAPACK interface is deprecated. Please compile with -DACCELERATE_NEW_LAPACK to access the new lapack headers. [#DeprecatedDeclaration]
634 | wkopt = 0
635 | lwork = __CLPK_integer(-1)
636 | sorgqr_(&lm, &lqcols, &lk, &a, &lda, &tau, &wkopt, &lwork, &info)
| `- warning: 'sorgqr_' was deprecated in macOS 13.3: The CLAPACK interface is deprecated. Please compile with -DACCELERATE_NEW_LAPACK to access the new lapack headers. [#DeprecatedDeclaration]
637 | lwork = __CLPK_integer(wkopt)
638 | work = [Float](repeating: 0, count: Int(max(1, lwork)))
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/MetalExecutor.swift:639:9: warning: 'sorgqr_' was deprecated in macOS 13.3: The CLAPACK interface is deprecated. Please compile with -DACCELERATE_NEW_LAPACK to access the new lapack headers. [#DeprecatedDeclaration]
637 | lwork = __CLPK_integer(wkopt)
638 | work = [Float](repeating: 0, count: Int(max(1, lwork)))
639 | sorgqr_(&lm, &lqcols, &lk, &a, &lda, &tau, &work, &lwork, &info)
| `- warning: 'sorgqr_' was deprecated in macOS 13.3: The CLAPACK interface is deprecated. Please compile with -DACCELERATE_NEW_LAPACK to access the new lapack headers. [#DeprecatedDeclaration]
640 | guard info == 0 else {
641 | throw ExecutorError.generalError("LAPACK sorgqr failed with info=\(info)")
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/MetalExecutor.swift:723:9: warning: 'ssyevd_' was deprecated in macOS 13.3: The CLAPACK interface is deprecated. Please compile with -DACCELERATE_NEW_LAPACK to access the new lapack headers. [#DeprecatedDeclaration]
721 | var lwork = __CLPK_integer(-1)
722 | var liwork = __CLPK_integer(-1)
723 | ssyevd_(&jobz, &uplo, &ln, &a, &lda, &w, &wkopt, &lwork, &iwkopt, &liwork, &info)
| `- warning: 'ssyevd_' was deprecated in macOS 13.3: The CLAPACK interface is deprecated. Please compile with -DACCELERATE_NEW_LAPACK to access the new lapack headers. [#DeprecatedDeclaration]
724 | lwork = __CLPK_integer(wkopt)
725 | liwork = iwkopt
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/MetalExecutor.swift:728:9: warning: 'ssyevd_' was deprecated in macOS 13.3: The CLAPACK interface is deprecated. Please compile with -DACCELERATE_NEW_LAPACK to access the new lapack headers. [#DeprecatedDeclaration]
726 | var work = [Float](repeating: 0, count: Int(max(1, lwork)))
727 | var iwork = [__CLPK_integer](repeating: 0, count: Int(max(1, liwork)))
728 | ssyevd_(&jobz, &uplo, &ln, &a, &lda, &w, &work, &lwork, &iwork, &liwork, &info)
| `- warning: 'ssyevd_' was deprecated in macOS 13.3: The CLAPACK interface is deprecated. Please compile with -DACCELERATE_NEW_LAPACK to access the new lapack headers. [#DeprecatedDeclaration]
729 |
730 | guard info == 0 else {
/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) }
[#DeprecatedDeclaration]: <https://docs.swift.org/compiler/documentation/diagnostics/deprecated-declaration>
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/IntegratedExecutor.swift:925:17: warning: capture of 'completion' with non-Sendable type '(Result<ExecutionResult, any Error>) -> Void' in a '@Sendable' closure [#SendableClosureCaptures]
923 |
924 | if let error = buffer.error {
925 | 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'
926 | return
927 | }
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/IntegratedExecutor.swift:940:36: warning: reference to captured var 'kernelTimings' in concurrently-executing code [#SendableClosureCaptures]
938 | outputs: outputs,
939 | executionTimeMs: executionTimeMs,
940 | kernelTimings: kernelTimings
| `- warning: reference to captured var 'kernelTimings' in concurrently-executing code [#SendableClosureCaptures]
941 | )
942 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/IntegratedExecutor.swift:1209:22: warning: capture of 'base' with non-Sendable type 'UnsafeMutablePointer<(any MTLBuffer)?>' in a '@Sendable' closure [#SendableClosureCaptures]
1207 | // pointer initialization is safe under concurrency.
1208 | DispatchQueue.concurrentPerform(iterations: entries.count) { i in
1209 | (base + i).initialize(to: materialize(i, pooled: false))
| `- warning: capture of 'base' with non-Sendable type 'UnsafeMutablePointer<(any MTLBuffer)?>' in a '@Sendable' closure [#SendableClosureCaptures]
1210 | }
1211 | } else {
Swift.UnsafeMutablePointer:1:23: note: generic struct 'UnsafeMutablePointer' does not conform to the 'Sendable' protocol
1 | @frozen public struct UnsafeMutablePointer<Pointee> : Copyable where Pointee : ~Copyable {
| `- note: generic struct 'UnsafeMutablePointer' does not conform to the 'Sendable' protocol
2 | public let _rawValue: Builtin.RawPointer
3 | public init(_ _rawValue: Builtin.RawPointer)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/IntegratedExecutor.swift:1209:47: warning: capture of 'materialize(_:pooled:)' with non-Sendable type '(Int, Bool) -> (any MTLBuffer)?' in a '@Sendable' closure [#SendableClosureCaptures]
1207 | // pointer initialization is safe under concurrency.
1208 | DispatchQueue.concurrentPerform(iterations: entries.count) { i in
1209 | (base + i).initialize(to: materialize(i, pooled: false))
| |- warning: capture of 'materialize(_:pooled:)' with non-Sendable type '(Int, Bool) -> (any MTLBuffer)?' in a '@Sendable' closure [#SendableClosureCaptures]
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
1210 | }
1211 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/IntegratedExecutor.swift:1179:14: warning: concurrently-executed local function 'materialize(_:pooled:)' must be marked as '@Sendable'
1177 | // writes it through a disjoint pointer slot — never mutates a shared
1178 | // Swift array from multiple threads.
1179 | func materialize(_ i: Int, pooled: Bool) -> MTLBuffer? {
| `- warning: concurrently-executed local function 'materialize(_:pooled:)' must be marked as '@Sendable'
1180 | switch plans[i] {
1181 | case .none:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/IntegratedExecutor.swift:1511:17: warning: capture of 'completion' with non-Sendable type '(Result<ExecutionResult, any Error>) -> Void' in a '@Sendable' closure [#SendableClosureCaptures]
1509 | commandBuffer.addCompletedHandler { buffer in
1510 | if let error = buffer.error {
1511 | 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'
1512 | return
1513 | }
/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/MetalExecutor.swift:527:9: warning: 'sgesdd_' was deprecated in macOS 13.3: The CLAPACK interface is deprecated. Please compile with -DACCELERATE_NEW_LAPACK to access the new lapack headers. [#DeprecatedDeclaration]
525 | var wkopt = Float(0)
526 | var lwork = __CLPK_integer(-1)
527 | sgesdd_(&jobz, &lm, &ln, &a, &lda, &s, &u, &ldu, &vt, &ldvt, &wkopt, &lwork, &iwork, &info)
| `- warning: 'sgesdd_' was deprecated in macOS 13.3: The CLAPACK interface is deprecated. Please compile with -DACCELERATE_NEW_LAPACK to access the new lapack headers. [#DeprecatedDeclaration]
528 | lwork = __CLPK_integer(wkopt)
529 | var work = [Float](repeating: 0, count: Int(max(1, lwork)))
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/MetalExecutor.swift:530:9: warning: 'sgesdd_' was deprecated in macOS 13.3: The CLAPACK interface is deprecated. Please compile with -DACCELERATE_NEW_LAPACK to access the new lapack headers. [#DeprecatedDeclaration]
528 | lwork = __CLPK_integer(wkopt)
529 | var work = [Float](repeating: 0, count: Int(max(1, lwork)))
530 | sgesdd_(&jobz, &lm, &ln, &a, &lda, &s, &u, &ldu, &vt, &ldvt, &work, &lwork, &iwork, &info)
| `- warning: 'sgesdd_' was deprecated in macOS 13.3: The CLAPACK interface is deprecated. Please compile with -DACCELERATE_NEW_LAPACK to access the new lapack headers. [#DeprecatedDeclaration]
531 |
532 | guard info == 0 else {
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/MetalExecutor.swift:614:9: warning: 'sgeqrf_' was deprecated in macOS 13.3: The CLAPACK interface is deprecated. Please compile with -DACCELERATE_NEW_LAPACK to access the new lapack headers. [#DeprecatedDeclaration]
612 | var wkopt = Float(0)
613 | var lwork = __CLPK_integer(-1)
614 | sgeqrf_(&lm, &ln, &a, &lda, &tau, &wkopt, &lwork, &info)
| `- warning: 'sgeqrf_' was deprecated in macOS 13.3: The CLAPACK interface is deprecated. Please compile with -DACCELERATE_NEW_LAPACK to access the new lapack headers. [#DeprecatedDeclaration]
615 | lwork = __CLPK_integer(wkopt)
616 | var work = [Float](repeating: 0, count: Int(max(1, lwork)))
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/MetalExecutor.swift:617:9: warning: 'sgeqrf_' was deprecated in macOS 13.3: The CLAPACK interface is deprecated. Please compile with -DACCELERATE_NEW_LAPACK to access the new lapack headers. [#DeprecatedDeclaration]
615 | lwork = __CLPK_integer(wkopt)
616 | var work = [Float](repeating: 0, count: Int(max(1, lwork)))
617 | sgeqrf_(&lm, &ln, &a, &lda, &tau, &work, &lwork, &info)
| `- warning: 'sgeqrf_' was deprecated in macOS 13.3: The CLAPACK interface is deprecated. Please compile with -DACCELERATE_NEW_LAPACK to access the new lapack headers. [#DeprecatedDeclaration]
618 | guard info == 0 else {
619 | throw ExecutorError.generalError("LAPACK sgeqrf failed with info=\(info)")
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/MetalExecutor.swift:636:9: warning: 'sorgqr_' was deprecated in macOS 13.3: The CLAPACK interface is deprecated. Please compile with -DACCELERATE_NEW_LAPACK to access the new lapack headers. [#DeprecatedDeclaration]
634 | wkopt = 0
635 | lwork = __CLPK_integer(-1)
636 | sorgqr_(&lm, &lqcols, &lk, &a, &lda, &tau, &wkopt, &lwork, &info)
| `- warning: 'sorgqr_' was deprecated in macOS 13.3: The CLAPACK interface is deprecated. Please compile with -DACCELERATE_NEW_LAPACK to access the new lapack headers. [#DeprecatedDeclaration]
637 | lwork = __CLPK_integer(wkopt)
638 | work = [Float](repeating: 0, count: Int(max(1, lwork)))
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/MetalExecutor.swift:639:9: warning: 'sorgqr_' was deprecated in macOS 13.3: The CLAPACK interface is deprecated. Please compile with -DACCELERATE_NEW_LAPACK to access the new lapack headers. [#DeprecatedDeclaration]
637 | lwork = __CLPK_integer(wkopt)
638 | work = [Float](repeating: 0, count: Int(max(1, lwork)))
639 | sorgqr_(&lm, &lqcols, &lk, &a, &lda, &tau, &work, &lwork, &info)
| `- warning: 'sorgqr_' was deprecated in macOS 13.3: The CLAPACK interface is deprecated. Please compile with -DACCELERATE_NEW_LAPACK to access the new lapack headers. [#DeprecatedDeclaration]
640 | guard info == 0 else {
641 | throw ExecutorError.generalError("LAPACK sorgqr failed with info=\(info)")
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/MetalExecutor.swift:723:9: warning: 'ssyevd_' was deprecated in macOS 13.3: The CLAPACK interface is deprecated. Please compile with -DACCELERATE_NEW_LAPACK to access the new lapack headers. [#DeprecatedDeclaration]
721 | var lwork = __CLPK_integer(-1)
722 | var liwork = __CLPK_integer(-1)
723 | ssyevd_(&jobz, &uplo, &ln, &a, &lda, &w, &wkopt, &lwork, &iwkopt, &liwork, &info)
| `- warning: 'ssyevd_' was deprecated in macOS 13.3: The CLAPACK interface is deprecated. Please compile with -DACCELERATE_NEW_LAPACK to access the new lapack headers. [#DeprecatedDeclaration]
724 | lwork = __CLPK_integer(wkopt)
725 | liwork = iwkopt
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Runtime/MetalExecutor.swift:728:9: warning: 'ssyevd_' was deprecated in macOS 13.3: The CLAPACK interface is deprecated. Please compile with -DACCELERATE_NEW_LAPACK to access the new lapack headers. [#DeprecatedDeclaration]
726 | var work = [Float](repeating: 0, count: Int(max(1, lwork)))
727 | var iwork = [__CLPK_integer](repeating: 0, count: Int(max(1, liwork)))
728 | ssyevd_(&jobz, &uplo, &ln, &a, &lda, &w, &work, &lwork, &iwork, &liwork, &info)
| `- warning: 'ssyevd_' was deprecated in macOS 13.3: The CLAPACK interface is deprecated. Please compile with -DACCELERATE_NEW_LAPACK to access the new lapack headers. [#DeprecatedDeclaration]
729 |
730 | guard info == 0 else {
/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) }
[#DeprecatedDeclaration]: <https://docs.swift.org/compiler/documentation/diagnostics/deprecated-declaration>
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[424/454] Compiling MetalHLOCore MetalEmitter.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:505:13: warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
503 | ) -> (String, String, TuningConfig?) {
504 | let outputShape = outputShapes.first ?? []
505 | let totalElements = outputShape.reduce(1, *)
| `- warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
506 | let entryPoint = "kernel_\(opKind.rawValue)"
507 | let metalType = metalTypeName(for: elementType)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1438:13: warning: initialization of immutable value 'indexGridSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1436 | if i != dimNumbers.indexVectorDim { indexGridShape.append(s) }
1437 | }
1438 | 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]
1439 |
1440 | // Non-collapsed, non-batched operand dims → these are offset dims in order
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1453:13: warning: initialization of immutable value 'offsetTotalSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1451 | offsetSizes.append(sliceSizes[d])
1452 | }
1453 | 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]
1454 |
1455 | // Number of index components per grid point
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1456:13: warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1454 |
1455 | // Number of index components per grid point
1456 | let numIndexComponents = dimNumbers.startIndexMap.count
| `- warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1457 |
1458 | // Indices stride for index_vector_dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1590:13: warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1588 | let batchSize = operandShape[batchDim]
1589 | let startIndexMap = dimNumbers.startIndexMap
1590 | let sliceSizes = dimNumbers.sliceSizes
| `- warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1591 | let numStartIndices = startIndexMap.count
1592 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2145:13: warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2143 | let rank = operandShape.count
2144 | let totalElements = operandShape.reduce(1, *)
2145 | let updateElements = updateShape.reduce(1, *)
| `- warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2146 |
2147 | // Calculate strides
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2772:13: warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2770 | ) -> (String, String, TuningConfig?) {
2771 | // Compute reduction parameters
2772 | let totalInputElements = inputShape.reduce(1, *)
| `- warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2773 | let reduceDimSorted = reduceDims.sorted()
2774 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2786:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2784 | if !reduceDimSorted.contains(i) { outputShape.append(s) }
2785 | }
2786 | 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]
2787 |
2788 | // innerSize = product of dims after last reduce dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2790:13: warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2788 | // innerSize = product of dims after last reduce dim
2789 | let lastReduceDim = reduceDimSorted.last ?? 0
2790 | 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]
2791 | ? inputShape.suffix(from: lastReduceDim + 1).reduce(1, *)
2792 | : 1
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3038:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3036 | outputShape.append(s)
3037 | }
3038 | 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]
3039 |
3040 | // innerSize = product of dims after the last reduced dim, so the scan
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3043:13: warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3041 | // strides over the reduce axis correctly for non-trailing reductions.
3042 | let lastReduceDim = reduceDimSorted.last ?? 0
3043 | 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]
3044 | ? inputShape.suffix(from: lastReduceDim + 1).reduce(1, *)
3045 | : 1
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3435:13: warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3433 |
3434 | let totalOutputElements = outputShape.reduce(1, *)
3435 | 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]
3436 | let isInverse = (fftType == .ifft || fftType == .irfft)
3437 | let sign = isInverse ? "1.0" : "-1.0"
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:4329:13: warning: initialization of immutable value 'sm' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4327 | private func generateMatMul2dNAXSource() -> (String, String, TuningConfig?) {
4328 | let c = CodeGenerator.naxGemmConfig()
4329 | let sm = c.bm / c.wm
| `- warning: initialization of immutable value 'sm' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4330 | let sn = c.bn / c.wn
4331 | let nsg = c.wm * c.wn
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:4330:13: warning: initialization of immutable value 'sn' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4328 | let c = CodeGenerator.naxGemmConfig()
4329 | let sm = c.bm / c.wm
4330 | let sn = c.bn / c.wn
| `- warning: initialization of immutable value 'sn' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4331 | let nsg = c.wm * c.wn
4332 | // MLX uses swizzle_log=2 for 's'/Pro devices: reshapes the launch grid
[425/454] Compiling MetalHLOCore MetalIR.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:505:13: warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
503 | ) -> (String, String, TuningConfig?) {
504 | let outputShape = outputShapes.first ?? []
505 | let totalElements = outputShape.reduce(1, *)
| `- warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
506 | let entryPoint = "kernel_\(opKind.rawValue)"
507 | let metalType = metalTypeName(for: elementType)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1438:13: warning: initialization of immutable value 'indexGridSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1436 | if i != dimNumbers.indexVectorDim { indexGridShape.append(s) }
1437 | }
1438 | 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]
1439 |
1440 | // Non-collapsed, non-batched operand dims → these are offset dims in order
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1453:13: warning: initialization of immutable value 'offsetTotalSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1451 | offsetSizes.append(sliceSizes[d])
1452 | }
1453 | 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]
1454 |
1455 | // Number of index components per grid point
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1456:13: warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1454 |
1455 | // Number of index components per grid point
1456 | let numIndexComponents = dimNumbers.startIndexMap.count
| `- warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1457 |
1458 | // Indices stride for index_vector_dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1590:13: warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1588 | let batchSize = operandShape[batchDim]
1589 | let startIndexMap = dimNumbers.startIndexMap
1590 | let sliceSizes = dimNumbers.sliceSizes
| `- warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1591 | let numStartIndices = startIndexMap.count
1592 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2145:13: warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2143 | let rank = operandShape.count
2144 | let totalElements = operandShape.reduce(1, *)
2145 | let updateElements = updateShape.reduce(1, *)
| `- warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2146 |
2147 | // Calculate strides
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2772:13: warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2770 | ) -> (String, String, TuningConfig?) {
2771 | // Compute reduction parameters
2772 | let totalInputElements = inputShape.reduce(1, *)
| `- warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2773 | let reduceDimSorted = reduceDims.sorted()
2774 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2786:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2784 | if !reduceDimSorted.contains(i) { outputShape.append(s) }
2785 | }
2786 | 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]
2787 |
2788 | // innerSize = product of dims after last reduce dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2790:13: warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2788 | // innerSize = product of dims after last reduce dim
2789 | let lastReduceDim = reduceDimSorted.last ?? 0
2790 | 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]
2791 | ? inputShape.suffix(from: lastReduceDim + 1).reduce(1, *)
2792 | : 1
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3038:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3036 | outputShape.append(s)
3037 | }
3038 | 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]
3039 |
3040 | // innerSize = product of dims after the last reduced dim, so the scan
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3043:13: warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3041 | // strides over the reduce axis correctly for non-trailing reductions.
3042 | let lastReduceDim = reduceDimSorted.last ?? 0
3043 | 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]
3044 | ? inputShape.suffix(from: lastReduceDim + 1).reduce(1, *)
3045 | : 1
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3435:13: warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3433 |
3434 | let totalOutputElements = outputShape.reduce(1, *)
3435 | 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]
3436 | let isInverse = (fftType == .ifft || fftType == .irfft)
3437 | let sign = isInverse ? "1.0" : "-1.0"
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:4329:13: warning: initialization of immutable value 'sm' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4327 | private func generateMatMul2dNAXSource() -> (String, String, TuningConfig?) {
4328 | let c = CodeGenerator.naxGemmConfig()
4329 | let sm = c.bm / c.wm
| `- warning: initialization of immutable value 'sm' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4330 | let sn = c.bn / c.wn
4331 | let nsg = c.wm * c.wn
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:4330:13: warning: initialization of immutable value 'sn' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4328 | let c = CodeGenerator.naxGemmConfig()
4329 | let sm = c.bm / c.wm
4330 | let sn = c.bn / c.wn
| `- warning: initialization of immutable value 'sn' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4331 | let nsg = c.wm * c.wn
4332 | // MLX uses swizzle_log=2 for 's'/Pro devices: reshapes the launch grid
[426/454] Compiling MetalHLOCore PatternCodegen.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:505:13: warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
503 | ) -> (String, String, TuningConfig?) {
504 | let outputShape = outputShapes.first ?? []
505 | let totalElements = outputShape.reduce(1, *)
| `- warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
506 | let entryPoint = "kernel_\(opKind.rawValue)"
507 | let metalType = metalTypeName(for: elementType)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1438:13: warning: initialization of immutable value 'indexGridSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1436 | if i != dimNumbers.indexVectorDim { indexGridShape.append(s) }
1437 | }
1438 | 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]
1439 |
1440 | // Non-collapsed, non-batched operand dims → these are offset dims in order
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1453:13: warning: initialization of immutable value 'offsetTotalSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1451 | offsetSizes.append(sliceSizes[d])
1452 | }
1453 | 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]
1454 |
1455 | // Number of index components per grid point
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1456:13: warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1454 |
1455 | // Number of index components per grid point
1456 | let numIndexComponents = dimNumbers.startIndexMap.count
| `- warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1457 |
1458 | // Indices stride for index_vector_dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1590:13: warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1588 | let batchSize = operandShape[batchDim]
1589 | let startIndexMap = dimNumbers.startIndexMap
1590 | let sliceSizes = dimNumbers.sliceSizes
| `- warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1591 | let numStartIndices = startIndexMap.count
1592 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2145:13: warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2143 | let rank = operandShape.count
2144 | let totalElements = operandShape.reduce(1, *)
2145 | let updateElements = updateShape.reduce(1, *)
| `- warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2146 |
2147 | // Calculate strides
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2772:13: warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2770 | ) -> (String, String, TuningConfig?) {
2771 | // Compute reduction parameters
2772 | let totalInputElements = inputShape.reduce(1, *)
| `- warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2773 | let reduceDimSorted = reduceDims.sorted()
2774 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2786:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2784 | if !reduceDimSorted.contains(i) { outputShape.append(s) }
2785 | }
2786 | 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]
2787 |
2788 | // innerSize = product of dims after last reduce dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2790:13: warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2788 | // innerSize = product of dims after last reduce dim
2789 | let lastReduceDim = reduceDimSorted.last ?? 0
2790 | 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]
2791 | ? inputShape.suffix(from: lastReduceDim + 1).reduce(1, *)
2792 | : 1
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3038:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3036 | outputShape.append(s)
3037 | }
3038 | 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]
3039 |
3040 | // innerSize = product of dims after the last reduced dim, so the scan
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3043:13: warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3041 | // strides over the reduce axis correctly for non-trailing reductions.
3042 | let lastReduceDim = reduceDimSorted.last ?? 0
3043 | 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]
3044 | ? inputShape.suffix(from: lastReduceDim + 1).reduce(1, *)
3045 | : 1
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3435:13: warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3433 |
3434 | let totalOutputElements = outputShape.reduce(1, *)
3435 | 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]
3436 | let isInverse = (fftType == .ifft || fftType == .irfft)
3437 | let sign = isInverse ? "1.0" : "-1.0"
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:4329:13: warning: initialization of immutable value 'sm' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4327 | private func generateMatMul2dNAXSource() -> (String, String, TuningConfig?) {
4328 | let c = CodeGenerator.naxGemmConfig()
4329 | let sm = c.bm / c.wm
| `- warning: initialization of immutable value 'sm' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4330 | let sn = c.bn / c.wn
4331 | let nsg = c.wm * c.wn
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:4330:13: warning: initialization of immutable value 'sn' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4328 | let c = CodeGenerator.naxGemmConfig()
4329 | let sm = c.bm / c.wm
4330 | let sn = c.bn / c.wn
| `- warning: initialization of immutable value 'sn' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4331 | let nsg = c.wm * c.wn
4332 | // MLX uses swizzle_log=2 for 's'/Pro devices: reshapes the launch grid
[427/454] Compiling MetalHLOCore ReductionKernelGenerator.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:505:13: warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
503 | ) -> (String, String, TuningConfig?) {
504 | let outputShape = outputShapes.first ?? []
505 | let totalElements = outputShape.reduce(1, *)
| `- warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
506 | let entryPoint = "kernel_\(opKind.rawValue)"
507 | let metalType = metalTypeName(for: elementType)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1438:13: warning: initialization of immutable value 'indexGridSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1436 | if i != dimNumbers.indexVectorDim { indexGridShape.append(s) }
1437 | }
1438 | 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]
1439 |
1440 | // Non-collapsed, non-batched operand dims → these are offset dims in order
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1453:13: warning: initialization of immutable value 'offsetTotalSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1451 | offsetSizes.append(sliceSizes[d])
1452 | }
1453 | 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]
1454 |
1455 | // Number of index components per grid point
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1456:13: warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1454 |
1455 | // Number of index components per grid point
1456 | let numIndexComponents = dimNumbers.startIndexMap.count
| `- warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1457 |
1458 | // Indices stride for index_vector_dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1590:13: warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1588 | let batchSize = operandShape[batchDim]
1589 | let startIndexMap = dimNumbers.startIndexMap
1590 | let sliceSizes = dimNumbers.sliceSizes
| `- warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1591 | let numStartIndices = startIndexMap.count
1592 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2145:13: warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2143 | let rank = operandShape.count
2144 | let totalElements = operandShape.reduce(1, *)
2145 | let updateElements = updateShape.reduce(1, *)
| `- warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2146 |
2147 | // Calculate strides
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2772:13: warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2770 | ) -> (String, String, TuningConfig?) {
2771 | // Compute reduction parameters
2772 | let totalInputElements = inputShape.reduce(1, *)
| `- warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2773 | let reduceDimSorted = reduceDims.sorted()
2774 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2786:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2784 | if !reduceDimSorted.contains(i) { outputShape.append(s) }
2785 | }
2786 | 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]
2787 |
2788 | // innerSize = product of dims after last reduce dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2790:13: warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2788 | // innerSize = product of dims after last reduce dim
2789 | let lastReduceDim = reduceDimSorted.last ?? 0
2790 | 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]
2791 | ? inputShape.suffix(from: lastReduceDim + 1).reduce(1, *)
2792 | : 1
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3038:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3036 | outputShape.append(s)
3037 | }
3038 | 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]
3039 |
3040 | // innerSize = product of dims after the last reduced dim, so the scan
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3043:13: warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3041 | // strides over the reduce axis correctly for non-trailing reductions.
3042 | let lastReduceDim = reduceDimSorted.last ?? 0
3043 | 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]
3044 | ? inputShape.suffix(from: lastReduceDim + 1).reduce(1, *)
3045 | : 1
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3435:13: warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3433 |
3434 | let totalOutputElements = outputShape.reduce(1, *)
3435 | 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]
3436 | let isInverse = (fftType == .ifft || fftType == .irfft)
3437 | let sign = isInverse ? "1.0" : "-1.0"
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:4329:13: warning: initialization of immutable value 'sm' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4327 | private func generateMatMul2dNAXSource() -> (String, String, TuningConfig?) {
4328 | let c = CodeGenerator.naxGemmConfig()
4329 | let sm = c.bm / c.wm
| `- warning: initialization of immutable value 'sm' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4330 | let sn = c.bn / c.wn
4331 | let nsg = c.wm * c.wn
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:4330:13: warning: initialization of immutable value 'sn' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4328 | let c = CodeGenerator.naxGemmConfig()
4329 | let sm = c.bm / c.wm
4330 | let sn = c.bn / c.wn
| `- warning: initialization of immutable value 'sn' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4331 | let nsg = c.wm * c.wn
4332 | // MLX uses swizzle_log=2 for 's'/Pro devices: reshapes the launch grid
[428/454] Compiling MetalHLOCore SpecializedAttention.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:505:13: warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
503 | ) -> (String, String, TuningConfig?) {
504 | let outputShape = outputShapes.first ?? []
505 | let totalElements = outputShape.reduce(1, *)
| `- warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
506 | let entryPoint = "kernel_\(opKind.rawValue)"
507 | let metalType = metalTypeName(for: elementType)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1438:13: warning: initialization of immutable value 'indexGridSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1436 | if i != dimNumbers.indexVectorDim { indexGridShape.append(s) }
1437 | }
1438 | 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]
1439 |
1440 | // Non-collapsed, non-batched operand dims → these are offset dims in order
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1453:13: warning: initialization of immutable value 'offsetTotalSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1451 | offsetSizes.append(sliceSizes[d])
1452 | }
1453 | 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]
1454 |
1455 | // Number of index components per grid point
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1456:13: warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1454 |
1455 | // Number of index components per grid point
1456 | let numIndexComponents = dimNumbers.startIndexMap.count
| `- warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1457 |
1458 | // Indices stride for index_vector_dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1590:13: warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1588 | let batchSize = operandShape[batchDim]
1589 | let startIndexMap = dimNumbers.startIndexMap
1590 | let sliceSizes = dimNumbers.sliceSizes
| `- warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1591 | let numStartIndices = startIndexMap.count
1592 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2145:13: warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2143 | let rank = operandShape.count
2144 | let totalElements = operandShape.reduce(1, *)
2145 | let updateElements = updateShape.reduce(1, *)
| `- warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2146 |
2147 | // Calculate strides
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2772:13: warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2770 | ) -> (String, String, TuningConfig?) {
2771 | // Compute reduction parameters
2772 | let totalInputElements = inputShape.reduce(1, *)
| `- warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2773 | let reduceDimSorted = reduceDims.sorted()
2774 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2786:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2784 | if !reduceDimSorted.contains(i) { outputShape.append(s) }
2785 | }
2786 | 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]
2787 |
2788 | // innerSize = product of dims after last reduce dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2790:13: warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2788 | // innerSize = product of dims after last reduce dim
2789 | let lastReduceDim = reduceDimSorted.last ?? 0
2790 | 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]
2791 | ? inputShape.suffix(from: lastReduceDim + 1).reduce(1, *)
2792 | : 1
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3038:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3036 | outputShape.append(s)
3037 | }
3038 | 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]
3039 |
3040 | // innerSize = product of dims after the last reduced dim, so the scan
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3043:13: warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3041 | // strides over the reduce axis correctly for non-trailing reductions.
3042 | let lastReduceDim = reduceDimSorted.last ?? 0
3043 | 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]
3044 | ? inputShape.suffix(from: lastReduceDim + 1).reduce(1, *)
3045 | : 1
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3435:13: warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3433 |
3434 | let totalOutputElements = outputShape.reduce(1, *)
3435 | 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]
3436 | let isInverse = (fftType == .ifft || fftType == .irfft)
3437 | let sign = isInverse ? "1.0" : "-1.0"
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:4329:13: warning: initialization of immutable value 'sm' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4327 | private func generateMatMul2dNAXSource() -> (String, String, TuningConfig?) {
4328 | let c = CodeGenerator.naxGemmConfig()
4329 | let sm = c.bm / c.wm
| `- warning: initialization of immutable value 'sm' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4330 | let sn = c.bn / c.wn
4331 | let nsg = c.wm * c.wn
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:4330:13: warning: initialization of immutable value 'sn' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4328 | let c = CodeGenerator.naxGemmConfig()
4329 | let sm = c.bm / c.wm
4330 | let sn = c.bn / c.wn
| `- warning: initialization of immutable value 'sn' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4331 | let nsg = c.wm * c.wn
4332 | // MLX uses swizzle_log=2 for 's'/Pro devices: reshapes the launch grid
[429/454] Compiling MetalHLOCore SpecializedMatMul.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:505:13: warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
503 | ) -> (String, String, TuningConfig?) {
504 | let outputShape = outputShapes.first ?? []
505 | let totalElements = outputShape.reduce(1, *)
| `- warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
506 | let entryPoint = "kernel_\(opKind.rawValue)"
507 | let metalType = metalTypeName(for: elementType)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1438:13: warning: initialization of immutable value 'indexGridSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1436 | if i != dimNumbers.indexVectorDim { indexGridShape.append(s) }
1437 | }
1438 | 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]
1439 |
1440 | // Non-collapsed, non-batched operand dims → these are offset dims in order
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1453:13: warning: initialization of immutable value 'offsetTotalSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1451 | offsetSizes.append(sliceSizes[d])
1452 | }
1453 | 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]
1454 |
1455 | // Number of index components per grid point
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1456:13: warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1454 |
1455 | // Number of index components per grid point
1456 | let numIndexComponents = dimNumbers.startIndexMap.count
| `- warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1457 |
1458 | // Indices stride for index_vector_dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1590:13: warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1588 | let batchSize = operandShape[batchDim]
1589 | let startIndexMap = dimNumbers.startIndexMap
1590 | let sliceSizes = dimNumbers.sliceSizes
| `- warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1591 | let numStartIndices = startIndexMap.count
1592 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2145:13: warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2143 | let rank = operandShape.count
2144 | let totalElements = operandShape.reduce(1, *)
2145 | let updateElements = updateShape.reduce(1, *)
| `- warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2146 |
2147 | // Calculate strides
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2772:13: warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2770 | ) -> (String, String, TuningConfig?) {
2771 | // Compute reduction parameters
2772 | let totalInputElements = inputShape.reduce(1, *)
| `- warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2773 | let reduceDimSorted = reduceDims.sorted()
2774 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2786:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2784 | if !reduceDimSorted.contains(i) { outputShape.append(s) }
2785 | }
2786 | 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]
2787 |
2788 | // innerSize = product of dims after last reduce dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2790:13: warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2788 | // innerSize = product of dims after last reduce dim
2789 | let lastReduceDim = reduceDimSorted.last ?? 0
2790 | 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]
2791 | ? inputShape.suffix(from: lastReduceDim + 1).reduce(1, *)
2792 | : 1
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3038:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3036 | outputShape.append(s)
3037 | }
3038 | 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]
3039 |
3040 | // innerSize = product of dims after the last reduced dim, so the scan
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3043:13: warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3041 | // strides over the reduce axis correctly for non-trailing reductions.
3042 | let lastReduceDim = reduceDimSorted.last ?? 0
3043 | 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]
3044 | ? inputShape.suffix(from: lastReduceDim + 1).reduce(1, *)
3045 | : 1
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3435:13: warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3433 |
3434 | let totalOutputElements = outputShape.reduce(1, *)
3435 | 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]
3436 | let isInverse = (fftType == .ifft || fftType == .irfft)
3437 | let sign = isInverse ? "1.0" : "-1.0"
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:4329:13: warning: initialization of immutable value 'sm' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4327 | private func generateMatMul2dNAXSource() -> (String, String, TuningConfig?) {
4328 | let c = CodeGenerator.naxGemmConfig()
4329 | let sm = c.bm / c.wm
| `- warning: initialization of immutable value 'sm' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4330 | let sn = c.bn / c.wn
4331 | let nsg = c.wm * c.wn
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:4330:13: warning: initialization of immutable value 'sn' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4328 | let c = CodeGenerator.naxGemmConfig()
4329 | let sm = c.bm / c.wm
4330 | let sn = c.bn / c.wn
| `- warning: initialization of immutable value 'sn' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4331 | let nsg = c.wm * c.wn
4332 | // MLX uses swizzle_log=2 for 's'/Pro devices: reshapes the launch grid
[430/454] Compiling MetalHLOCore TileCalculator.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:505:13: warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
503 | ) -> (String, String, TuningConfig?) {
504 | let outputShape = outputShapes.first ?? []
505 | let totalElements = outputShape.reduce(1, *)
| `- warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
506 | let entryPoint = "kernel_\(opKind.rawValue)"
507 | let metalType = metalTypeName(for: elementType)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1438:13: warning: initialization of immutable value 'indexGridSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1436 | if i != dimNumbers.indexVectorDim { indexGridShape.append(s) }
1437 | }
1438 | 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]
1439 |
1440 | // Non-collapsed, non-batched operand dims → these are offset dims in order
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1453:13: warning: initialization of immutable value 'offsetTotalSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1451 | offsetSizes.append(sliceSizes[d])
1452 | }
1453 | 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]
1454 |
1455 | // Number of index components per grid point
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1456:13: warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1454 |
1455 | // Number of index components per grid point
1456 | let numIndexComponents = dimNumbers.startIndexMap.count
| `- warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1457 |
1458 | // Indices stride for index_vector_dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1590:13: warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1588 | let batchSize = operandShape[batchDim]
1589 | let startIndexMap = dimNumbers.startIndexMap
1590 | let sliceSizes = dimNumbers.sliceSizes
| `- warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1591 | let numStartIndices = startIndexMap.count
1592 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2145:13: warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2143 | let rank = operandShape.count
2144 | let totalElements = operandShape.reduce(1, *)
2145 | let updateElements = updateShape.reduce(1, *)
| `- warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2146 |
2147 | // Calculate strides
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2772:13: warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2770 | ) -> (String, String, TuningConfig?) {
2771 | // Compute reduction parameters
2772 | let totalInputElements = inputShape.reduce(1, *)
| `- warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2773 | let reduceDimSorted = reduceDims.sorted()
2774 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2786:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2784 | if !reduceDimSorted.contains(i) { outputShape.append(s) }
2785 | }
2786 | 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]
2787 |
2788 | // innerSize = product of dims after last reduce dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2790:13: warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2788 | // innerSize = product of dims after last reduce dim
2789 | let lastReduceDim = reduceDimSorted.last ?? 0
2790 | 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]
2791 | ? inputShape.suffix(from: lastReduceDim + 1).reduce(1, *)
2792 | : 1
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3038:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3036 | outputShape.append(s)
3037 | }
3038 | 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]
3039 |
3040 | // innerSize = product of dims after the last reduced dim, so the scan
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3043:13: warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3041 | // strides over the reduce axis correctly for non-trailing reductions.
3042 | let lastReduceDim = reduceDimSorted.last ?? 0
3043 | 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]
3044 | ? inputShape.suffix(from: lastReduceDim + 1).reduce(1, *)
3045 | : 1
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3435:13: warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3433 |
3434 | let totalOutputElements = outputShape.reduce(1, *)
3435 | 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]
3436 | let isInverse = (fftType == .ifft || fftType == .irfft)
3437 | let sign = isInverse ? "1.0" : "-1.0"
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:4329:13: warning: initialization of immutable value 'sm' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4327 | private func generateMatMul2dNAXSource() -> (String, String, TuningConfig?) {
4328 | let c = CodeGenerator.naxGemmConfig()
4329 | let sm = c.bm / c.wm
| `- warning: initialization of immutable value 'sm' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4330 | let sn = c.bn / c.wn
4331 | let nsg = c.wm * c.wn
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:4330:13: warning: initialization of immutable value 'sn' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4328 | let c = CodeGenerator.naxGemmConfig()
4329 | let sm = c.bm / c.wm
4330 | let sn = c.bn / c.wn
| `- warning: initialization of immutable value 'sn' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4331 | let nsg = c.wm * c.wn
4332 | // MLX uses swizzle_log=2 for 's'/Pro devices: reshapes the launch grid
[431/454] Compiling MetalHLOCore Analyzer.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:505:13: warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
503 | ) -> (String, String, TuningConfig?) {
504 | let outputShape = outputShapes.first ?? []
505 | let totalElements = outputShape.reduce(1, *)
| `- warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
506 | let entryPoint = "kernel_\(opKind.rawValue)"
507 | let metalType = metalTypeName(for: elementType)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1438:13: warning: initialization of immutable value 'indexGridSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1436 | if i != dimNumbers.indexVectorDim { indexGridShape.append(s) }
1437 | }
1438 | 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]
1439 |
1440 | // Non-collapsed, non-batched operand dims → these are offset dims in order
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1453:13: warning: initialization of immutable value 'offsetTotalSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1451 | offsetSizes.append(sliceSizes[d])
1452 | }
1453 | 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]
1454 |
1455 | // Number of index components per grid point
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1456:13: warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1454 |
1455 | // Number of index components per grid point
1456 | let numIndexComponents = dimNumbers.startIndexMap.count
| `- warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1457 |
1458 | // Indices stride for index_vector_dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1590:13: warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1588 | let batchSize = operandShape[batchDim]
1589 | let startIndexMap = dimNumbers.startIndexMap
1590 | let sliceSizes = dimNumbers.sliceSizes
| `- warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1591 | let numStartIndices = startIndexMap.count
1592 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2145:13: warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2143 | let rank = operandShape.count
2144 | let totalElements = operandShape.reduce(1, *)
2145 | let updateElements = updateShape.reduce(1, *)
| `- warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2146 |
2147 | // Calculate strides
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2772:13: warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2770 | ) -> (String, String, TuningConfig?) {
2771 | // Compute reduction parameters
2772 | let totalInputElements = inputShape.reduce(1, *)
| `- warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2773 | let reduceDimSorted = reduceDims.sorted()
2774 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2786:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2784 | if !reduceDimSorted.contains(i) { outputShape.append(s) }
2785 | }
2786 | 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]
2787 |
2788 | // innerSize = product of dims after last reduce dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2790:13: warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2788 | // innerSize = product of dims after last reduce dim
2789 | let lastReduceDim = reduceDimSorted.last ?? 0
2790 | 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]
2791 | ? inputShape.suffix(from: lastReduceDim + 1).reduce(1, *)
2792 | : 1
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3038:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3036 | outputShape.append(s)
3037 | }
3038 | 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]
3039 |
3040 | // innerSize = product of dims after the last reduced dim, so the scan
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3043:13: warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3041 | // strides over the reduce axis correctly for non-trailing reductions.
3042 | let lastReduceDim = reduceDimSorted.last ?? 0
3043 | 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]
3044 | ? inputShape.suffix(from: lastReduceDim + 1).reduce(1, *)
3045 | : 1
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3435:13: warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3433 |
3434 | let totalOutputElements = outputShape.reduce(1, *)
3435 | 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]
3436 | let isInverse = (fftType == .ifft || fftType == .irfft)
3437 | let sign = isInverse ? "1.0" : "-1.0"
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:4329:13: warning: initialization of immutable value 'sm' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4327 | private func generateMatMul2dNAXSource() -> (String, String, TuningConfig?) {
4328 | let c = CodeGenerator.naxGemmConfig()
4329 | let sm = c.bm / c.wm
| `- warning: initialization of immutable value 'sm' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4330 | let sn = c.bn / c.wn
4331 | let nsg = c.wm * c.wn
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:4330:13: warning: initialization of immutable value 'sn' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4328 | let c = CodeGenerator.naxGemmConfig()
4329 | let sm = c.bm / c.wm
4330 | let sn = c.bn / c.wn
| `- warning: initialization of immutable value 'sn' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4331 | let nsg = c.wm * c.wn
4332 | // MLX uses swizzle_log=2 for 's'/Pro devices: reshapes the launch grid
[432/454] Compiling MetalHLOCore CodeGenerator.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:505:13: warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
503 | ) -> (String, String, TuningConfig?) {
504 | let outputShape = outputShapes.first ?? []
505 | let totalElements = outputShape.reduce(1, *)
| `- warning: initialization of immutable value 'totalElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
506 | let entryPoint = "kernel_\(opKind.rawValue)"
507 | let metalType = metalTypeName(for: elementType)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1438:13: warning: initialization of immutable value 'indexGridSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1436 | if i != dimNumbers.indexVectorDim { indexGridShape.append(s) }
1437 | }
1438 | 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]
1439 |
1440 | // Non-collapsed, non-batched operand dims → these are offset dims in order
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1453:13: warning: initialization of immutable value 'offsetTotalSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1451 | offsetSizes.append(sliceSizes[d])
1452 | }
1453 | 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]
1454 |
1455 | // Number of index components per grid point
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1456:13: warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1454 |
1455 | // Number of index components per grid point
1456 | let numIndexComponents = dimNumbers.startIndexMap.count
| `- warning: initialization of immutable value 'numIndexComponents' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1457 |
1458 | // Indices stride for index_vector_dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:1590:13: warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1588 | let batchSize = operandShape[batchDim]
1589 | let startIndexMap = dimNumbers.startIndexMap
1590 | let sliceSizes = dimNumbers.sliceSizes
| `- warning: initialization of immutable value 'sliceSizes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1591 | let numStartIndices = startIndexMap.count
1592 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2145:13: warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2143 | let rank = operandShape.count
2144 | let totalElements = operandShape.reduce(1, *)
2145 | let updateElements = updateShape.reduce(1, *)
| `- warning: initialization of immutable value 'updateElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2146 |
2147 | // Calculate strides
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2772:13: warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2770 | ) -> (String, String, TuningConfig?) {
2771 | // Compute reduction parameters
2772 | let totalInputElements = inputShape.reduce(1, *)
| `- warning: initialization of immutable value 'totalInputElements' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2773 | let reduceDimSorted = reduceDims.sorted()
2774 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2786:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2784 | if !reduceDimSorted.contains(i) { outputShape.append(s) }
2785 | }
2786 | 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]
2787 |
2788 | // innerSize = product of dims after last reduce dim
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:2790:13: warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
2788 | // innerSize = product of dims after last reduce dim
2789 | let lastReduceDim = reduceDimSorted.last ?? 0
2790 | 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]
2791 | ? inputShape.suffix(from: lastReduceDim + 1).reduce(1, *)
2792 | : 1
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3038:13: warning: initialization of immutable value 'outputCount' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3036 | outputShape.append(s)
3037 | }
3038 | 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]
3039 |
3040 | // innerSize = product of dims after the last reduced dim, so the scan
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3043:13: warning: initialization of immutable value 'innerSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3041 | // strides over the reduce axis correctly for non-trailing reductions.
3042 | let lastReduceDim = reduceDimSorted.last ?? 0
3043 | 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]
3044 | ? inputShape.suffix(from: lastReduceDim + 1).reduce(1, *)
3045 | : 1
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:3435:13: warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
3433 |
3434 | let totalOutputElements = outputShape.reduce(1, *)
3435 | 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]
3436 | let isInverse = (fftType == .ifft || fftType == .irfft)
3437 | let sign = isInverse ? "1.0" : "-1.0"
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:4329:13: warning: initialization of immutable value 'sm' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4327 | private func generateMatMul2dNAXSource() -> (String, String, TuningConfig?) {
4328 | let c = CodeGenerator.naxGemmConfig()
4329 | let sm = c.bm / c.wm
| `- warning: initialization of immutable value 'sm' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4330 | let sn = c.bn / c.wn
4331 | let nsg = c.wm * c.wn
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/CodeGenerator.swift:4330:13: warning: initialization of immutable value 'sn' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4328 | let c = CodeGenerator.naxGemmConfig()
4329 | let sm = c.bm / c.wm
4330 | let sn = c.bn / c.wn
| `- warning: initialization of immutable value 'sn' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4331 | let nsg = c.wm * c.wn
4332 | // MLX uses swizzle_log=2 for 's'/Pro devices: reshapes the launch grid
/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:3602:13: warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
3600 |
3601 | // Transpose input to target layout
3602 | let targetInputOrder: [Int]
| `- warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
3603 | switch targetDataLayout {
3604 | case .NHWC:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:3633:13: warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
3631 |
3632 | // Transpose weights if needed
3633 | let targetKernelOrder: [Int]
| `- warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
3634 | switch targetWeightsLayout {
3635 | case .HWIO:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:3681:13: warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
3679 | ]
3680 |
3681 | let mpsOutputOrder: [Int]
| `- warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
3682 | switch sourceDataLayout {
3683 | case .NHWC:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:4683:17: warning: initialization of immutable value 'mask' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4681 | if bitsToRound > 0 {
4682 | // RNE: absBits = (absBits + ((1<<(bitsToRound-1)) - 1) + keptLSB) & ~mask
4683 | let mask = u32((UInt32(1) << UInt32(bitsToRound)) - 1)
| `- warning: initialization of immutable value 'mask' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4684 | let shifted = graph.bitwiseRightShift(absBits, u32(UInt32(bitsToRound)), name: nil)
4685 | let keptLSB = graph.bitwiseAND(shifted, u32(1), name: nil)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/PassManager.swift:894:13: warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
892 |
893 | var newOperations = function.operations
894 | var opsToRemove = Set<Int>()
| `- warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
895 | var changed = false
896 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/PassManager.swift:1030:13: warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
1028 |
1029 | var newOperations = function.operations
1030 | var opsToRemove = Set<Int>()
| `- warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
1031 | var changed = false
1032 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/PassManager.swift:1468:17: warning: variable 'matmulIdx' was written to, but never read
1466 | // Find the matmul operation (first in pattern typically)
1467 | var matmulOp: HLOOperation?
1468 | var matmulIdx: Int?
| `- warning: variable 'matmulIdx' was written to, but never read
1469 | for idx in pattern.operationIndices {
1470 | let op = function.operations[idx]
/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:3602:13: warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
3600 |
3601 | // Transpose input to target layout
3602 | let targetInputOrder: [Int]
| `- warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
3603 | switch targetDataLayout {
3604 | case .NHWC:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:3633:13: warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
3631 |
3632 | // Transpose weights if needed
3633 | let targetKernelOrder: [Int]
| `- warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
3634 | switch targetWeightsLayout {
3635 | case .HWIO:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:3681:13: warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
3679 | ]
3680 |
3681 | let mpsOutputOrder: [Int]
| `- warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
3682 | switch sourceDataLayout {
3683 | case .NHWC:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:4683:17: warning: initialization of immutable value 'mask' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4681 | if bitsToRound > 0 {
4682 | // RNE: absBits = (absBits + ((1<<(bitsToRound-1)) - 1) + keptLSB) & ~mask
4683 | let mask = u32((UInt32(1) << UInt32(bitsToRound)) - 1)
| `- warning: initialization of immutable value 'mask' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4684 | let shifted = graph.bitwiseRightShift(absBits, u32(UInt32(bitsToRound)), name: nil)
4685 | let keptLSB = graph.bitwiseAND(shifted, u32(1), name: nil)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/PassManager.swift:894:13: warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
892 |
893 | var newOperations = function.operations
894 | var opsToRemove = Set<Int>()
| `- warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
895 | var changed = false
896 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/PassManager.swift:1030:13: warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
1028 |
1029 | var newOperations = function.operations
1030 | var opsToRemove = Set<Int>()
| `- warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
1031 | var changed = false
1032 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/PassManager.swift:1468:17: warning: variable 'matmulIdx' was written to, but never read
1466 | // Find the matmul operation (first in pattern typically)
1467 | var matmulOp: HLOOperation?
1468 | var matmulIdx: Int?
| `- warning: variable 'matmulIdx' was written to, but never read
1469 | for idx in pattern.operationIndices {
1470 | let op = function.operations[idx]
/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:3602:13: warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
3600 |
3601 | // Transpose input to target layout
3602 | let targetInputOrder: [Int]
| `- warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
3603 | switch targetDataLayout {
3604 | case .NHWC:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:3633:13: warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
3631 |
3632 | // Transpose weights if needed
3633 | let targetKernelOrder: [Int]
| `- warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
3634 | switch targetWeightsLayout {
3635 | case .HWIO:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:3681:13: warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
3679 | ]
3680 |
3681 | let mpsOutputOrder: [Int]
| `- warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
3682 | switch sourceDataLayout {
3683 | case .NHWC:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:4683:17: warning: initialization of immutable value 'mask' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4681 | if bitsToRound > 0 {
4682 | // RNE: absBits = (absBits + ((1<<(bitsToRound-1)) - 1) + keptLSB) & ~mask
4683 | let mask = u32((UInt32(1) << UInt32(bitsToRound)) - 1)
| `- warning: initialization of immutable value 'mask' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4684 | let shifted = graph.bitwiseRightShift(absBits, u32(UInt32(bitsToRound)), name: nil)
4685 | let keptLSB = graph.bitwiseAND(shifted, u32(1), name: nil)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/PassManager.swift:894:13: warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
892 |
893 | var newOperations = function.operations
894 | var opsToRemove = Set<Int>()
| `- warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
895 | var changed = false
896 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/PassManager.swift:1030:13: warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
1028 |
1029 | var newOperations = function.operations
1030 | var opsToRemove = Set<Int>()
| `- warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
1031 | var changed = false
1032 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/PassManager.swift:1468:17: warning: variable 'matmulIdx' was written to, but never read
1466 | // Find the matmul operation (first in pattern typically)
1467 | var matmulOp: HLOOperation?
1468 | var matmulIdx: Int?
| `- warning: variable 'matmulIdx' was written to, but never read
1469 | for idx in pattern.operationIndices {
1470 | let op = function.operations[idx]
/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:3602:13: warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
3600 |
3601 | // Transpose input to target layout
3602 | let targetInputOrder: [Int]
| `- warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
3603 | switch targetDataLayout {
3604 | case .NHWC:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:3633:13: warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
3631 |
3632 | // Transpose weights if needed
3633 | let targetKernelOrder: [Int]
| `- warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
3634 | switch targetWeightsLayout {
3635 | case .HWIO:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:3681:13: warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
3679 | ]
3680 |
3681 | let mpsOutputOrder: [Int]
| `- warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
3682 | switch sourceDataLayout {
3683 | case .NHWC:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:4683:17: warning: initialization of immutable value 'mask' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4681 | if bitsToRound > 0 {
4682 | // RNE: absBits = (absBits + ((1<<(bitsToRound-1)) - 1) + keptLSB) & ~mask
4683 | let mask = u32((UInt32(1) << UInt32(bitsToRound)) - 1)
| `- warning: initialization of immutable value 'mask' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4684 | let shifted = graph.bitwiseRightShift(absBits, u32(UInt32(bitsToRound)), name: nil)
4685 | let keptLSB = graph.bitwiseAND(shifted, u32(1), name: nil)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/PassManager.swift:894:13: warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
892 |
893 | var newOperations = function.operations
894 | var opsToRemove = Set<Int>()
| `- warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
895 | var changed = false
896 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/PassManager.swift:1030:13: warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
1028 |
1029 | var newOperations = function.operations
1030 | var opsToRemove = Set<Int>()
| `- warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
1031 | var changed = false
1032 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/PassManager.swift:1468:17: warning: variable 'matmulIdx' was written to, but never read
1466 | // Find the matmul operation (first in pattern typically)
1467 | var matmulOp: HLOOperation?
1468 | var matmulIdx: Int?
| `- warning: variable 'matmulIdx' was written to, but never read
1469 | for idx in pattern.operationIndices {
1470 | let op = function.operations[idx]
/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:3602:13: warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
3600 |
3601 | // Transpose input to target layout
3602 | let targetInputOrder: [Int]
| `- warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
3603 | switch targetDataLayout {
3604 | case .NHWC:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:3633:13: warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
3631 |
3632 | // Transpose weights if needed
3633 | let targetKernelOrder: [Int]
| `- warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
3634 | switch targetWeightsLayout {
3635 | case .HWIO:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:3681:13: warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
3679 | ]
3680 |
3681 | let mpsOutputOrder: [Int]
| `- warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
3682 | switch sourceDataLayout {
3683 | case .NHWC:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:4683:17: warning: initialization of immutable value 'mask' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4681 | if bitsToRound > 0 {
4682 | // RNE: absBits = (absBits + ((1<<(bitsToRound-1)) - 1) + keptLSB) & ~mask
4683 | let mask = u32((UInt32(1) << UInt32(bitsToRound)) - 1)
| `- warning: initialization of immutable value 'mask' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4684 | let shifted = graph.bitwiseRightShift(absBits, u32(UInt32(bitsToRound)), name: nil)
4685 | let keptLSB = graph.bitwiseAND(shifted, u32(1), name: nil)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/PassManager.swift:894:13: warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
892 |
893 | var newOperations = function.operations
894 | var opsToRemove = Set<Int>()
| `- warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
895 | var changed = false
896 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/PassManager.swift:1030:13: warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
1028 |
1029 | var newOperations = function.operations
1030 | var opsToRemove = Set<Int>()
| `- warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
1031 | var changed = false
1032 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/PassManager.swift:1468:17: warning: variable 'matmulIdx' was written to, but never read
1466 | // Find the matmul operation (first in pattern typically)
1467 | var matmulOp: HLOOperation?
1468 | var matmulIdx: Int?
| `- warning: variable 'matmulIdx' was written to, but never read
1469 | for idx in pattern.operationIndices {
1470 | let op = function.operations[idx]
/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:3602:13: warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
3600 |
3601 | // Transpose input to target layout
3602 | let targetInputOrder: [Int]
| `- warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
3603 | switch targetDataLayout {
3604 | case .NHWC:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:3633:13: warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
3631 |
3632 | // Transpose weights if needed
3633 | let targetKernelOrder: [Int]
| `- warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
3634 | switch targetWeightsLayout {
3635 | case .HWIO:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:3681:13: warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
3679 | ]
3680 |
3681 | let mpsOutputOrder: [Int]
| `- warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
3682 | switch sourceDataLayout {
3683 | case .NHWC:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:4683:17: warning: initialization of immutable value 'mask' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4681 | if bitsToRound > 0 {
4682 | // RNE: absBits = (absBits + ((1<<(bitsToRound-1)) - 1) + keptLSB) & ~mask
4683 | let mask = u32((UInt32(1) << UInt32(bitsToRound)) - 1)
| `- warning: initialization of immutable value 'mask' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4684 | let shifted = graph.bitwiseRightShift(absBits, u32(UInt32(bitsToRound)), name: nil)
4685 | let keptLSB = graph.bitwiseAND(shifted, u32(1), name: nil)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/PassManager.swift:894:13: warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
892 |
893 | var newOperations = function.operations
894 | var opsToRemove = Set<Int>()
| `- warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
895 | var changed = false
896 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/PassManager.swift:1030:13: warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
1028 |
1029 | var newOperations = function.operations
1030 | var opsToRemove = Set<Int>()
| `- warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
1031 | var changed = false
1032 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/PassManager.swift:1468:17: warning: variable 'matmulIdx' was written to, but never read
1466 | // Find the matmul operation (first in pattern typically)
1467 | var matmulOp: HLOOperation?
1468 | var matmulIdx: Int?
| `- warning: variable 'matmulIdx' was written to, but never read
1469 | for idx in pattern.operationIndices {
1470 | let op = function.operations[idx]
/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:3602:13: warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
3600 |
3601 | // Transpose input to target layout
3602 | let targetInputOrder: [Int]
| `- warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
3603 | switch targetDataLayout {
3604 | case .NHWC:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:3633:13: warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
3631 |
3632 | // Transpose weights if needed
3633 | let targetKernelOrder: [Int]
| `- warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
3634 | switch targetWeightsLayout {
3635 | case .HWIO:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:3681:13: warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
3679 | ]
3680 |
3681 | let mpsOutputOrder: [Int]
| `- warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
3682 | switch sourceDataLayout {
3683 | case .NHWC:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:4683:17: warning: initialization of immutable value 'mask' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4681 | if bitsToRound > 0 {
4682 | // RNE: absBits = (absBits + ((1<<(bitsToRound-1)) - 1) + keptLSB) & ~mask
4683 | let mask = u32((UInt32(1) << UInt32(bitsToRound)) - 1)
| `- warning: initialization of immutable value 'mask' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4684 | let shifted = graph.bitwiseRightShift(absBits, u32(UInt32(bitsToRound)), name: nil)
4685 | let keptLSB = graph.bitwiseAND(shifted, u32(1), name: nil)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/PassManager.swift:894:13: warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
892 |
893 | var newOperations = function.operations
894 | var opsToRemove = Set<Int>()
| `- warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
895 | var changed = false
896 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/PassManager.swift:1030:13: warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
1028 |
1029 | var newOperations = function.operations
1030 | var opsToRemove = Set<Int>()
| `- warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
1031 | var changed = false
1032 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/PassManager.swift:1468:17: warning: variable 'matmulIdx' was written to, but never read
1466 | // Find the matmul operation (first in pattern typically)
1467 | var matmulOp: HLOOperation?
1468 | var matmulIdx: Int?
| `- warning: variable 'matmulIdx' was written to, but never read
1469 | for idx in pattern.operationIndices {
1470 | let op = function.operations[idx]
/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:3602:13: warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
3600 |
3601 | // Transpose input to target layout
3602 | let targetInputOrder: [Int]
| `- warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
3603 | switch targetDataLayout {
3604 | case .NHWC:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:3633:13: warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
3631 |
3632 | // Transpose weights if needed
3633 | let targetKernelOrder: [Int]
| `- warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
3634 | switch targetWeightsLayout {
3635 | case .HWIO:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:3681:13: warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
3679 | ]
3680 |
3681 | let mpsOutputOrder: [Int]
| `- warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
3682 | switch sourceDataLayout {
3683 | case .NHWC:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:4683:17: warning: initialization of immutable value 'mask' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4681 | if bitsToRound > 0 {
4682 | // RNE: absBits = (absBits + ((1<<(bitsToRound-1)) - 1) + keptLSB) & ~mask
4683 | let mask = u32((UInt32(1) << UInt32(bitsToRound)) - 1)
| `- warning: initialization of immutable value 'mask' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4684 | let shifted = graph.bitwiseRightShift(absBits, u32(UInt32(bitsToRound)), name: nil)
4685 | let keptLSB = graph.bitwiseAND(shifted, u32(1), name: nil)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/PassManager.swift:894:13: warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
892 |
893 | var newOperations = function.operations
894 | var opsToRemove = Set<Int>()
| `- warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
895 | var changed = false
896 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/PassManager.swift:1030:13: warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
1028 |
1029 | var newOperations = function.operations
1030 | var opsToRemove = Set<Int>()
| `- warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
1031 | var changed = false
1032 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/PassManager.swift:1468:17: warning: variable 'matmulIdx' was written to, but never read
1466 | // Find the matmul operation (first in pattern typically)
1467 | var matmulOp: HLOOperation?
1468 | var matmulIdx: Int?
| `- warning: variable 'matmulIdx' was written to, but never read
1469 | for idx in pattern.operationIndices {
1470 | let op = function.operations[idx]
/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:3602:13: warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
3600 |
3601 | // Transpose input to target layout
3602 | let targetInputOrder: [Int]
| `- warning: immutable value 'targetInputOrder' was never used; consider removing it [#no-usage]
3603 | switch targetDataLayout {
3604 | case .NHWC:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:3633:13: warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
3631 |
3632 | // Transpose weights if needed
3633 | let targetKernelOrder: [Int]
| `- warning: immutable value 'targetKernelOrder' was never used; consider removing it [#no-usage]
3634 | switch targetWeightsLayout {
3635 | case .HWIO:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:3681:13: warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
3679 | ]
3680 |
3681 | let mpsOutputOrder: [Int]
| `- warning: immutable value 'mpsOutputOrder' was never used; consider removing it [#no-usage]
3682 | switch sourceDataLayout {
3683 | case .NHWC:
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/MPSGraphCompiler.swift:4683:17: warning: initialization of immutable value 'mask' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4681 | if bitsToRound > 0 {
4682 | // RNE: absBits = (absBits + ((1<<(bitsToRound-1)) - 1) + keptLSB) & ~mask
4683 | let mask = u32((UInt32(1) << UInt32(bitsToRound)) - 1)
| `- warning: initialization of immutable value 'mask' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
4684 | let shifted = graph.bitwiseRightShift(absBits, u32(UInt32(bitsToRound)), name: nil)
4685 | let keptLSB = graph.bitwiseAND(shifted, u32(1), name: nil)
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/PassManager.swift:894:13: warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
892 |
893 | var newOperations = function.operations
894 | var opsToRemove = Set<Int>()
| `- warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
895 | var changed = false
896 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/PassManager.swift:1030:13: warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
1028 |
1029 | var newOperations = function.operations
1030 | var opsToRemove = Set<Int>()
| `- warning: variable 'opsToRemove' was never mutated; consider changing to 'let' constant
1031 | var changed = false
1032 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLOCore/Compiler/PassManager.swift:1468:17: warning: variable 'matmulIdx' was written to, but never read
1466 | // Find the matmul operation (first in pattern typically)
1467 | var matmulOp: HLOOperation?
1468 | var matmulIdx: Int?
| `- warning: variable 'matmulIdx' was written to, but never read
1469 | for idx in pattern.operationIndices {
1470 | let op = function.operations[idx]
[442/463] Compiling MetalHLO MetalHLO.swift
[443/463] Compiling MetalHLO TensorType.swift
[444/463] Compiling MetalHLO Errors.swift
[445/463] Compiling MetalHLO ElementType.swift
[446/463] Compiling MetalHLO Client.swift
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLO/Client.swift:79:9: warning: no calls to throwing functions occur within 'try' expression
77 | /// - Returns: A compiled `Executable` ready for execution.
78 | public func compile(_ mlir: String) throws -> Executable {
79 | try withNarrowOutputs(try compileMPSGraph(mlir), source: mlir)
| `- warning: no calls to throwing functions occur within 'try' expression
80 | }
81 |
/Users/admin/builder/spi-builder-workspace/Sources/MetalHLO/Client.swift:174:9: warning: no calls to throwing functions occur within 'try' expression
172 | /// - Returns: A compiled `Executable` ready for execution.
173 | public func compile(_ mlir: String, config: CompilationConfig) throws -> Executable {
174 | try withNarrowOutputs(try compileConfigured(mlir, config: config), source: mlir)
| `- warning: no calls to throwing functions occur within 'try' expression
175 | }
176 |
[447/463] Compiling MetalHLO CompilationConfig.swift
[448/463] Compiling MetalHLO Buffer.swift
[449/463] Emitting module MetalHLO
[450/463] Compiling MetalHLO Executable.swift
[451/485] Compiling PJRTMetalHLO PJRTMemory.swift
[452/486] Compiling PJRTMetalHLO PJRTTopology.swift
[453/486] Compiling MetalHLOBenchmarks PowerEfficiencyBenchmarks.swift
[454/486] Compiling MetalHLOBenchmarks FusionAnalysisBenchmarks.swift
[455/486] Compiling MetalHLOBenchmarks MemoryBenchmarks.swift
[456/486] Compiling MetalHLOBenchmarks CompilerBenchmarks.swift
[457/486] Emitting module MetalHLOBenchmarks
[458/486] 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 | }
[459/486] Compiling MetalHLOBenchmarks BenchmarkRunner.swift
[460/486] Compiling MetalHLOBenchmarks GPUMetrics.swift
[461/486] 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>
[462/486] 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]
[463/487] Compiling CMetalHLO CInterface.swift
[464/487] Emitting module CMetalHLO
[464/487] Write Objects.LinkFileList
[466/487] 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 | }
[466/493] Linking libCMetalHLO.dylib
[468/493] Compiling PJRTMetalHLO PJRTError.swift
[469/493] Compiling PJRTMetalHLO PJRTEvent.swift
[470/493] Compiling PJRTMetalHLO PJRTDevice.swift
/Users/admin/builder/spi-builder-workspace/Sources/PJRTMetalHLO/PJRTDevice.swift:279:9: warning: initialization of immutable value 'totalBytes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
277 |
278 | // Report recommended max working set size as total memory
279 | let totalBytes = Int64(mtl.recommendedMaxWorkingSetSize)
| `- warning: initialization of immutable value 'totalBytes' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
280 | args.pointee.bytes_in_use = 0 // Not easily tracked per-device in Metal
281 | return nil
[471/493] Compiling PJRTMetalHLO PJRTClient.swift
[472/493] Compiling PJRTMetalHLO PJRTBuffer.swift
[473/493] Compiling PJRTMetalHLO PJRTApi.swift
[474/493] Emitting module PJRTMetalHLO
[475/493] Compiling PJRTMetalHLO OpaquePointerHelpers.swift
[476/493] Compiling PJRTMetalHLO PJRTExecutable.swift
[476/493] Write Objects.LinkFileList
[478/493] Compiling BenchmarkRunner main.swift
[479/493] Emitting module BenchmarkRunner
[479/493] Write Objects.LinkFileList
[481/493] Emitting module DepthAttentionBenchmark
[482/493] 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 ---
[482/493] Write Objects.LinkFileList
[484/493] Compiling MLXBenchmarks MLXBenchmarks.swift
[485/493] Emitting module MLXBenchmarks
[485/493] Linking libPJRTMetalHLO.dylib
[486/495] Linking benchmark-runner
[487/495] Applying benchmark-runner
[488/495] Linking DepthAttentionBenchmark
[489/495] Applying DepthAttentionBenchmark
[491/495] Compiling MLXComparison main.swift
[492/495] Emitting module MLXComparison
[492/495] Write Objects.LinkFileList
[493/495] Linking mlx-comparison
[494/495] Applying mlx-comparison
Build complete! (67.11s)
Fetching https://github.com/ml-explore/mlx-swift
[1/17148] Fetching mlx-swift
Fetched https://github.com/ml-explore/mlx-swift from cache (2.09s)
Computing version for https://github.com/ml-explore/mlx-swift
Computed https://github.com/ml-explore/mlx-swift at 0.32.3 (2.74s)
Fetching https://github.com/apple/swift-numerics
[1/6756] Fetching swift-numerics
Fetched https://github.com/apple/swift-numerics from cache (1.23s)
Computing version for https://github.com/apple/swift-numerics
Computed https://github.com/apple/swift-numerics at 1.1.1 (1.81s)
Creating working copy for https://github.com/apple/swift-numerics
Working copy of https://github.com/apple/swift-numerics resolved at 1.1.1
Creating working copy for https://github.com/ml-explore/mlx-swift
Working copy of https://github.com/ml-explore/mlx-swift resolved at 0.32.3
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",
"LinalgMPSTests.swift",
"NewOpsTests.swift",
"OperationTests.swift",
"ProducerConsumerFusionBugTest.swift",
"QuickWinsOpsTests.swift",
"RNGTypesTests.swift",
"TlalocCompatibilityTests.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",
"AllReduceTest.swift",
"AnalyzerTests.swift",
"ArgReduceTest.swift",
"Atan2Test.swift",
"AttentionRoutingTest.swift",
"CanonicalizersTests.swift",
"CaseSwitchTest.swift",
"CodegenTests.swift",
"CrossEntropyTest.swift",
"CrossLayerFusionTests.swift",
"CumsumTest.swift",
"CustomCallTests.swift",
"DepthAttentionTests.swift",
"ElementwiseChainTypeTest.swift",
"GatherBatchingTests.swift",
"GatherMLIRFormatTest.swift",
"HLOOptimizerTests.swift",
"HeterogeneousIntegrationTests.swift",
"HostCallbackTest.swift",
"IntegratedExecutorTests.swift",
"KernelCacheTests.swift",
"KernelDispatchRegressionTests.swift",
"LLMOptimizationsTests.swift",
"LapackRoutingTest.swift",
"LexerTests.swift",
"MILFusionTests.swift",
"ManualComputationTest.swift",
"MemoryPlanningTests.swift",
"MetalKernelTests.swift",
"NeuralEngineTargetingTests.swift",
"OptimizationBarrierTest.swift",
"ParserTests.swift",
"PartitionerTests.swift",
"PassManagerTests.swift",
"PatternCodegenTests.swift",
"PermutationUtilsTests.swift",
"ProfileGuidedOptimizationTests.swift",
"QuantizationAwareTests.swift",
"ReducePrecisionTest.swift",
"ReduceTest.swift",
"RematerializationTests.swift",
"ReshapeViewLivenessTest.swift",
"ScatterTest.swift",
"SearchSortedTest.swift",
"SharedIOSurfaceTests.swift",
"SortTest.swift",
"SpecialFunctionsTest.swift",
"ThreefryRngTest.swift",
"TopKTest.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/NAXGemmBundle.swift",
"Compiler/OpEmitter.swift",
"Compiler/PassManager.swift",
"Compiler/ReductionSplitTransform.swift",
"Compiler/TF32Transform.swift",
"IR/Attributes.swift",
"IR/HLOFunction.swift",
"IR/HLOModule.swift",
"IR/HLOOpKind.swift",
"IR/HLOOperation.swift",
"IR/NarrowFloat.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/FunctionInliner.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",
"Optimizer/WhileLoopUnroller.swift",
"Parser/ChloExpansion.swift",
"Parser/Lexer.swift",
"Parser/NarrowFloatLegalization.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.