# 이제 Apple M1에서도 PyTorch GPU 가속이 가능해집니다! 🎉

**URL:** https://discuss.pytorch.kr/t/apple-m1-pytorch-gpu/276
**Category:** 읽을거리&정보공유
**Tags:** pytorch, pytorch-on-apple-m1, mps
**Created:** [5월 18, 2022, 10:52오후 UTC](https://discuss.pytorch.kr/t/apple-m1-pytorch-gpu/276 "2022-05-18T22:52:38Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![9bow](https://discuss.pytorch.kr/user_avatar/discuss.pytorch.kr/9bow/32/16301_2.png) [@9bow](https://discuss.pytorch.kr/u/9bow)
#### Post date: [5월 18, 2022, 10:52오후 UTC](https://discuss.pytorch.kr/t/apple-m1-pytorch-gpu/276/1 "2022-05-18T22:52:38Z")

</div>

많은 분들께서 기다리고 기다리셨던,  
Apple M1 칩에서의 GPU 가속 기능이 드디어, **PyTorch 1.12부터 가능** 해진다고 합니다! 🎉

기존의 `cuda` 장치처럼 `mps`(Apple의 Metal Performance Shaders) 장치로 접근해서 사용할 수 있다고 합니다.  
(아래 코드는 [MPS Backend 문서](https://pytorch.org/docs/master/notes/mps.html)에서 가져왔습니다.)

```python
mps_device = torch.device("mps")

# Create a Tensor directly on the mps device
x = torch.ones(5, device=mps_device)
# Or
x = torch.ones(5, device="mps")

# Any operation happens on the GPU
y = x * 2

# Move your model to mps just like any other device
model = YourFavoriteNet()
model.to(mps_device)

# Now every call runs on the GPU
pred = model(x)

```

아래와 같이 M1 Ultra에서 학습과 평가 모두 CPU 대비 월등한 성능 향상을 보여주는 것을 보실 수 있습니다. 🙂

 ![image](https://discuss.pytorch.kr/uploads/default/original/1X/b36a3bb996c0dc654e6d39b08a8a57c7761035a3.jpeg)

자세한 공지는 아래에서 보실 수 있으며, [Preview 버전(Nightly Build)](https://pytorch.kr/get-started/locally/)에서는 바로 사용할 수 있다고 합니다.

> **[Introducing Accelerated PyTorch Training on Mac](https://pytorch.org/blog/introducing-accelerated-pytorch-training-on-mac/)**
>
> In collaboration with the Metal engineering team at Apple, we are excited to announce support for GPU-accelerated PyTorch training on Mac. Until now, PyTorch training on Mac only leveraged the CPU, but with the upcoming PyTorch v1.12 release,...

기존의 많은 사용자들의 요청과 아우성(...)은 아래 이슈에서 보실 수 있습니다 🙄  
[https://github.com/pytorch/pytorch/issues/47702](https://github.com/pytorch/pytorch/issues/47702)

---

<div class="post-metadata">

### Author: ![9bow](https://discuss.pytorch.kr/user_avatar/discuss.pytorch.kr/9bow/32/16301_2.png) [@9bow](https://discuss.pytorch.kr/u/9bow)
#### Post date: [5월 21, 2022, 3:10오전 UTC](https://discuss.pytorch.kr/t/apple-m1-pytorch-gpu/276/2 "2022-05-21T03:10:48Z")

</div>

2개의 게시물이 새 글로 분할되었습니다: [M1에서 MPS 장치를 사용할 수 없습니다.](https://discuss.pytorch.kr/t/m1-mps/290)

---

<div class="post-metadata">

### Author: ![9bow](https://discuss.pytorch.kr/user_avatar/discuss.pytorch.kr/9bow/32/16301_2.png) [@9bow](https://discuss.pytorch.kr/u/9bow)
#### Post date: [5월 20, 2022, 12:26오후 UTC](https://discuss.pytorch.kr/t/apple-m1-pytorch-gpu/276/4 "2022-05-20T12:26:52Z")

</div>

다른 분들께도 필요할 것 같아서, [자주 묻는 질문&답변 게시판](https://discuss.pytorch.kr/c/faq/6)에 정리해서 올렸습니다.

내용은 거의 같지만, 필요하신 분들이 계실 것 같아 아래 링크를 남깁니다. 😄

> [@Apple M1/M2이 탑재된 장치에서 GPU 가속을 사용하려면 어떻게 해야 하나요?](https://discuss.pytorch.kr/t/apple-m1-gpu/286):
>
> 공식 홈페이지와 [StackOverflow](https://stackoverflow.com/questions/tagged/pytorch) 등에서 자주 보이는 질문과 답변을 번역하고 있습니다. 몇 일 전 소식이 전해진, 많은 분들께서 오랜 시간 기다리셨고 또 궁금해하시는 Apple M1 칩이 탑재된 맥북 또는 맥미니, 맥스튜디오 등에서 GPU 가속 사용 방법을 정리해보려고 합니다. 질문 Apple M1이 탑재된 장치에서 GPU 가속을 사용하려면 어떻게 해야 하나요? (또는, M1 칩이 탑재된 맥북 / 맥미니 / 맥스튜디오에서 PyTorch GPU 가속 기능을 하고 싶습니다.)

---

<div class="post-metadata">

### Author: ![9bow](https://discuss.pytorch.kr/user_avatar/discuss.pytorch.kr/9bow/32/16301_2.png) [@9bow](https://discuss.pytorch.kr/u/9bow)
#### Post date: [8월 8, 2025, 4:16오전 UTC](https://discuss.pytorch.kr/t/apple-m1-pytorch-gpu/276/5 "2025-08-08T04:16:48Z")

</div>

> [@PyTorch 2.8이 출시되었습니다tada](https://discuss.pytorch.kr/t/pytorch-2-8/7435/1):
>
> PyTorch 2.8이 **macOS Ventura에서 GPU 가속(MPS 백엔드)을 지원하는 마지막 버전**입니다. PyTorch 2.9부터는 macOS Sonoma(2023년 9월 출시) 이상이 필요합니다.

상세한 내용은 PyTorch 2.8 출시 관련 게시물을 참고해주세요:

> [@PyTorch 2.8이 출시되었습니다tada](https://discuss.pytorch.kr/t/pytorch-2-8/7435):
>
> PyTorch 2.8 소개 PyTorch는 2.8 버전을 통해 더욱 진화된 기능과 성능 최적화를 선보였습니다. [이번 릴리즈](https://github.com/pytorch/pytorch/releases/tag/v2.8.0)에는 새로운 컴파일러 기능과 다양한 하드웨어 플랫폼에 대한 지원을 포함하고 있으며, 특히 대규모 모델의 학습 및 추론에 필요한 성능과 유연성을 확보하는 데 초점을 맞추고 있습니다. 컴파일러 기반 기능의 고도화뿐 아니라, 개발자 경험 개선, 오류 방지 메커니즘 강화 등도 이 버전의 핵심 개선사항으로 꼽힙니다. 이번 릴리즈는 PyTorch 2.7 이후 총 4,164개의 커밋과 585명의 기여자이 함께 하였으며, PyTorch 커뮤니티의 활발한 참여와 협업이 다시 한 번 강조되었습니다. 특히 torch.compile을 중심으로 하는 TorchInductor의 성능 및 안정성 개선, Wheel Variants를 통한 플랫폼 최적화된 배포, 다양한 양자화 형식 및 분산 학습 지원 확대는 PyTorch의 적용…
