View in English

  • Apple Developer
    • 시작하기

    시작하기 탐색

    • 개요
    • 알아보기
    • Apple Developer Program

    알림 받기

    • 최신 뉴스
    • Hello Developer
    • 플랫폼

    플랫폼 탐색

    • Apple 플랫폼
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store

    피처링

    • 디자인
    • 배포
    • 게임
    • 액세서리
    • 웹
    • 홈
    • CarPlay
    • 기술

    기술 탐색

    • 개요
    • Xcode
    • Swift
    • SwiftUI

    피처링

    • 손쉬운 사용
    • 앱 인텐트
    • Apple Intelligence
    • 게임
    • 머신 러닝 및 AI
    • 보안
    • Xcode Cloud
    • 커뮤니티

    커뮤니티 탐색

    • 개요
    • Apple과의 만남 이벤트
    • 커뮤니티 주도 이벤트
    • 개발자 포럼
    • 오픈 소스

    피처링

    • WWDC
    • Swift Student Challenge
    • 개발자 이야기
    • App Store 어워드
    • Apple 디자인 어워드
    • 문서

    문서 탐색

    • 문서 라이브러리
    • 기술 개요
    • 샘플 코드
    • 휴먼 인터페이스 가이드라인
    • 비디오

    릴리즈 노트

    • 피처링 업데이트
    • iOS
    • iPadOS
    • macOS
    • watchOS
    • visionOS
    • tvOS
    • Xcode
    • 다운로드

    다운로드 탐색

    • 모든 다운로드
    • 운영 체제
    • 애플리케이션
    • 디자인 리소스

    피처링

    • Xcode
    • TestFlight
    • 서체
    • SF Symbols
    • Icon Composer
    • 지원

    지원 탐색

    • 개요
    • 도움말
    • 개발자 포럼
    • 피드백 지원
    • 문의하기

    피처링

    • 계정 도움말
    • 앱 심사 지침
    • App Store Connect 도움말
    • 새로 추가될 요구 사항
    • 계약 및 지침
    • 시스템 상태
  • 빠른 링크

    • 이벤트
    • 뉴스
    • 포럼
    • 샘플 코드
    • 비디오
 

비디오

메뉴 열기 메뉴 닫기
  • 컬렉션
  • 전체 비디오
  • 소개

더 많은 비디오

  • 소개
  • 요약
  • 코드
  • MLX로 Swift에서 수치 컴퓨팅 살펴보기

    MLX Swift를 사용하여 Swift에 네이티브 방식으로 NumPy 스타일 컴퓨팅을 적용해 보세요. 이미지 처리, 텐서 연산, 신경망 학습을 단일 타입 세이프 환경에서 처리하여 머신 러닝 워크플로에서 언어 간 마찰을 제거하는 방법을 알아보세요. 개발자가 이미 알고 있는 컴파일러, 도구, 디버깅 경험을 즐기면서 GPU 가속을 활용할 수 있도록 해 주는 API를 살펴보세요.

    챕터

    • 0:00 - Introduction
    • 0:57 - MLX Swift and the Apple ecosystem
    • 3:04 - MLX Swift
    • 4:28 - Mandelbrot
    • 6:34 - Heat distribution
    • 8:12 - Faster convergence with SOR
    • 10:17 - Curve fitting
    • 12:17 - The full MLX toolkit and ecosystem
    • 13:47 - Next steps

    리소스

    • MLX Swift LM on GitHub
    • MLX Swift Examples
    • MLX Examples
    • MLX Swift
    • MLX LM - Python API
    • MLX Explore - Python API
    • MLX Framework
    • MLX
      • HD 비디오
      • SD 비디오

    관련 비디오

    WWDC26

    • MLX를 사용하여 Mac에서 로컬 에이전틱 AI 실행하기
    • MLX를 사용한 분산 추론 및 학습 살펴보기

    WWDC25

    • Apple Silicon용 MLX 사용하기
    • MLX를 사용하여 Apple Silicon에서 대규모 언어 모델 탐색하기
  • 비디오 검색…
    • 3:04 - Power iteration with MLX Swift arrays

      import MLX
      let n = 100
      let steps = 10
      let B = MLXRandom.normal([n, n])
      var v = MLXRandom.normal([n])
      
      // get symmetric matrix A = Bᵀ + B
      let A = B.T + B
      
      // Power iteration → top eigenvector of A.
      //   v ← A v / ‖A v‖
      for _ in 0 ..< steps {
          let Av = matmul(A, v)
          v = Av / norm(Av)
          eval(v)
      }
      
      // recover the eigenvalue.
      //   λ = vᵀ A v
      let lambda = matmul(matmul(v.T, A), v)
      
      print(lambda)
    • 5:09 - Mandelbrot set in plain Swift (scalar)

      // Plain Swift, scalar-at-a-time
      var counts = Array2D<Int>(width: w, height: h)
      
      for y in 0 ..< h {
          for x in 0 ..< w {
              let c = Complex(xMin + Float(x) * xStep, yMin + Float(y) * yStep)
              var z = Complex<Float>.zero
              var limit = maxIterations
              for i in 0 ..< maxIterations {
                  z = z * z + c
                  if z.lengthSquared > radiusSquared {
                      limit = i
                      break
                  }
              }
              counts[x, y] = limit
          }
      }
    • 5:27 - Mandelbrot set in MLX Swift (array)

      // Compute the Mandelbrot set on a grid of complex numbers
      import MLX
      
      let x = linspace(-2.0, 0.5, count: w)
      let y = linspace(-1.25, 1.25, count: h).reshaped(h, 1)
      let c = x + y.asImaginary()
      
      var z = MLXArray.zeros(like: c)
      var counts = MLXArray.zeros(c.shape, dtype: .int16)
      
      for _ in 0 ..< maxIterations {
          z = z * z + c                       // iterate z ← z² + c
          counts = counts + (abs(z) .< 2)     // count bounded iterations
      }
    • 7:27 - Jacobi iteration with conv2d

      // Jacobi iteration: average the four neighbors
      
      // Convolution weights
      let kernel = MLXArray(converting: [
          0,    0.25, 0,
          0.25, 0,    0.25,
          0,    0.25, 0,
      ]).reshaped(1, 3, 3, 1)
      
      // Initial value
      var temperature = heatSources
      
      // Run this in a loop until convergence
      let next = conv2d(temperature, kernel, padding: 1)
      temperature = which(heatMask, heatSources, next)
    • 9:17 - Successive Over-Relaxation (SOR)

      // Successive Over-Relaxation: blend the previous and next state
      let ω: Float = 2.0 / (1.0 + sin(Float.pi / Float(max(M, N))))
      
      let redMask   = checkerboard(rows: M, cols: N, phase: 0)
      let blackMask = checkerboard(rows: M, cols: N, phase: 1)
      
      // Update red cells using black neighbors
      let sorRed  = ω * conv2d(temperature, kernel, padding: 1) + (1 - ω) * temperature
      temperature = which(redMask, sorRed, temperature)
      temperature = which(heatMask, heatSources, temperature)
      
      // Update black cells using (now-updated) red neighbors
      let sorBlack = ω * conv2d(temperature, kernel, padding: 1) + (1 - ω) * temperature
      temperature  = which(blackMask, sorBlack, temperature)
      temperature  = which(heatMask, heatSources, temperature)
    • 11:13 - Curve fitting with automatic differentiation

      // Define a loss, then optimize it with autodiff
      // x, y: data points as MLXArrays
      func f(_ θ: MLXArray) -> MLXArray {
          θ[0] + θ[1] * x + θ[2] * x ** 2
      }
      
      func loss(_ θ: MLXArray) -> MLXArray {
          mean((f(θ) - y) ** 2)
      }
      
      var θ = zeros([numParams])
      let gradLoss = grad(loss)
      
      for _ in 0 ..< steps {
          let g = gradLoss(θ)         // ∇L(θ)
          θ = θ - learningRate * g    // parameter update
          eval(θ)                     // force evaluation
      }
    • 0:00 - Introduction
    • What numerical computing is and its applications — from simulations in chemistry, biology, and physics to signal processing, rendering, fractals, and machine learning training via gradient descent.

    • 0:57 - MLX Swift and the Apple ecosystem
    • Where MLX Swift fits among Apple's existing numerical computing frameworks (Accelerate, BNNS, Metal Performance Shaders, Swift Numerics) — and why to choose MLX Swift when your primary goal is writing mathematical code that looks like the math, with automatic GPU execution and automatic differentiation.

    • 3:04 - MLX Swift
    • Core MLX Swift concepts — n-dimensional arrays as the central abstraction (similar to NumPy), lazy evaluation that builds a compute graph before executing, and a walkthrough of the power iteration algorithm showing how operations like matmul, norm, and transpose map directly to mathematical notation.

    • 4:28 - Mandelbrot
    • Computing the Mandelbrot fractal as a showcase for array computing — comparing a scalar-at-a-time plain Swift implementation against an MLX Swift version that applies z = z² + c across the entire grid of complex numbers at once, running on the GPU with up to 10x speedup in fewer lines of code.

    • 6:34 - Heat distribution
    • Finding steady-state temperature in a room using Jacobi iteration — modeling heat as a 2D grid, implementing the four-neighbor stencil as a single conv2d call, and applying boundary conditions with an elementwise ternary. A convolution as physics.

    • 8:12 - Faster convergence with SOR
    • How Successive Over-Relaxation (SOR) reaches steady state in N iterations versus N² for Jacobi — using an omega parameter to overshoot updates, a red/black checkerboard pattern to simulate in-place updates, and a side-by-side comparison showing SOR completing 100x faster with the same minimal code.

    • 10:17 - Curve fitting
    • How automatic differentiation flips forward computation — given data points and a parametric function (a quadratic), using MLX's grad to derive gradients automatically and running a gradient descent loop to fit the curve without writing a single derivative by hand.

    • 12:17 - The full MLX toolkit and ecosystem
    • Overview of MLX's complete numerical computing toolkit — linear algebra, FFTs, n-dimensional convolutions, reductions, scans, indexing, random number generation, optimizers (SGD, Adam, RMSprop) — and the Swift ecosystem of packages including mlx-swift, mlx-swift-lm, and mlx-swift-examples.

    • 13:47 - Next steps
    • How to get started with mlx-swift and mlx-swift-examples (LLM integration, stable diffusion, model training, and session examples), MLX's multi-language support (Swift, Python, C++, C).

Developer Footer

  • 비디오
  • WWDC26
  • MLX로 Swift에서 수치 컴퓨팅 살펴보기
  • 메뉴 열기 메뉴 닫기
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    메뉴 열기 메뉴 닫기
    • Swift
    • SwiftUI
    • Swift Playground
    • TestFlight
    • Xcode
    • Xcode Cloud
    • SF Symbols
    메뉴 열기 메뉴 닫기
    • 손쉬운 사용
    • 액세서리
    • Apple Intelligence
    • 앱 확장 프로그램
    • App Store
    • 오디오 및 비디오(영문)
    • 증강 현실
    • 디자인
    • 배포
    • 교육
    • 서체(영문)
    • 게임
    • 건강 및 피트니스
    • 앱 내 구입
    • 현지화
    • 지도 및 위치
    • 머신 러닝 및 AI
    • 오픈 소스(영문)
    • 보안
    • Safari 및 웹(영문)
    메뉴 열기 메뉴 닫기
    • 문서(영문)
    • 튜토리얼
    • 다운로드
    • 포럼(영문)
    • 비디오
    메뉴 열기 메뉴 닫기
    • 지원 문서
    • 문의하기
    • 버그 보고
    • 시스템 상태(영문)
    메뉴 열기 메뉴 닫기
    • Apple Developer
    • App Store Connect
    • 인증서, 식별자 및 프로파일(영문)
    • 피드백 지원
    메뉴 열기 메뉴 닫기
    • Apple Developer Program
    • Apple Developer Enterprise Program
    • App Store Small Business Program
    • MFi Program(영문)
    • Mini Apps Partner Program
    • News Partner Program(영문)
    • Video Partner Program(영문)
    • Security Bounty Program(영문)
    • Security Research Device Program(영문)
    메뉴 열기 메뉴 닫기
    • Apple과의 만남
    • Apple Developer Center
    • App Store 어워드(영문)
    • Apple 디자인 어워드
    • Apple Developer Academy(영문)
    • WWDC
    최신 뉴스 읽기.
    Apple Developer 앱 받기.
    Copyright © 2026 Apple Inc. 모든 권리 보유.
    약관 개인정보 처리방침 계약 및 지침