# \#m1

**URL:** https://discuss.pytorch.kr/tag/m1/9.md

[최신](https://discuss.pytorch.kr/latest.md) · [카테고리](https://discuss.pytorch.kr/categories.md) · [태그](https://discuss.pytorch.kr/tags.md)

---

## [M1 에서 torch.backends.mps.is\_available = false 현상.](https://discuss.pytorch.kr/t/m1-torch-backends-mps-is-available-false/5055)

<div class="topic-metadata">

**Author:** [@sms](https://discuss.pytorch.kr/u/sms)\
**댓글:** 5\
**마지막 업데이트:** [8월 19, 2024, 10:19오전 UTC](https://discuss.pytorch.kr/t/m1-torch-backends-mps-is-available-false/5055 "2024-08-19T10:19:57Z")

</div>

M1 맥스튜디오 사용중이고, ComfyUI를 설치하였으나 오류가 발생합니다. ComfyUI (GitHub - comfyanonymous/ComfyUI: The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.) 중간에 Apple Silicon 설치과정 1번에 링크를 누르면 애플페이지로 이동합니다. (Accelerated PyTorch training on Mac - Metal - Apple Developer) 이 페이지의 모든 내용을 아래처럼 순서대로 따랐습니다. 마지막 확인 단계에서 torch.backends.mps.is\_built() =\> True torch.backends.mps.is\_available() =\> False "MPS device not found." 가 출력됩니다. 결국은 torch에서 Build는 true지만 MPS는 사용 불가라고 하는 것 같은데요. 더 어떻게 조사해봐야 할지 모르겠습니다. Requirements Mac computers with Apple silicon or AMD GPUs =\> M1 mac studio macOS 12.3 or later =\> 12.5.1 Python 3.7 or later =\> 3.11.9, 최신 3.12 버전으로도 해봤으나 마찬가지. Xcode command-line tools: xcode-select --install =\> 최신으로 설치함 Set up - Apple silicon conda create -n comfy python=3.11.9 (최신 3.12 버전으로도 해봤으나 마찬가지.) Install Miniconda3-latest-MacOSX-arm64 Verify print(platform.platform()) macOS-12.5.1-arm64-arm-64bit print(torch.version) …

---

## [M1에서 MPS 설정이 안 됩니다.](https://discuss.pytorch.kr/t/m1-mps/4775)

<div class="topic-metadata">

**Author:** [@sujeong](https://discuss.pytorch.kr/u/sujeong)\
**댓글:** 4\
**마지막 업데이트:** [7월 30, 2024, 1:40오전 UTC](https://discuss.pytorch.kr/t/m1-mps/4775 "2024-07-30T01:40:26Z")

</div>

M1 pro 사용 중입니다. VSCode에서 conda 가상환경으로 SciBERT로 파인튜닝을 진행하려고 하는데요, device = torch.device("mps") data=data sentences = \[\] labels = \[\] sentence = \[\] label = \[\] for idx, row in data.iterrows(): if pd.isna(row\['Token'\]): if sentence: sentences.append(sentence) labels.append(label) sentence = \[\] label = \[\] else: sentence.append(row\['Token'\]) label.append(row\['Label'\]) if sentence: sentences.append(sentence) labels.append(label) df\_label = list(data\['Label'\].unique()) label2id = {label: i for i, label in enumerate(df\_label)} id2label = {i: label for i, label in enumerate(df\_label)} train\_sentences, test\_sentences, train\_labels, test\_labels = train\_test\_split(sentences, labels, test\_size=0.2, random\_state=42) def tokenize\_and\_align\_labels(sentences, labels, tokenizer, label2id, max\_length=512): tokenized\_inputs = tokenizer(sentences, padding='max\_length', truncation=True, max\_length=max\_length,…

---

## [Apple M1/M2이 탑재된 장치에서 GPU 가속을 사용하려면 어떻게 해야 하나요?](https://discuss.pytorch.kr/t/apple-m1-m2-gpu/286)

<div class="topic-metadata">

**Author:** [@9bow](https://discuss.pytorch.kr/u/9bow)\
**댓글:** 4\
**마지막 업데이트:** [3월 13, 2023, 1:34오전 UTC](https://discuss.pytorch.kr/t/apple-m1-m2-gpu/286 "2023-03-13T01:34:43Z")

</div>

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

---

## [애플 실리콘 맥을 위한 파이토치 설치 가이드](https://discuss.pytorch.kr/t/topic/307)

<div class="topic-metadata">

**Author:** [@SoHaeng\_Lee](https://discuss.pytorch.kr/u/SoHaeng_Lee)\
**댓글:** 1\
**마지막 업데이트:** [5월 27, 2022, 3:52오전 UTC](https://discuss.pytorch.kr/t/topic/307 "2022-05-27T03:52:39Z")

</div>

https://www.youtube.com/watch?v=Zx2MHdRgAIc&t=330s 따라 하시면 쉽게 설치가 가능합니다.

---

## [M1 맥북에서 MPS 사용이 되지 않습니다.](https://discuss.pytorch.kr/t/m1-mps/289)

<div class="topic-metadata">

**Author:** [@wazs555](https://discuss.pytorch.kr/u/wazs555)\
**댓글:** 8\
**마지막 업데이트:** [5월 21, 2022, 12:35오후 UTC](https://discuss.pytorch.kr/t/m1-mps/289 "2022-05-21T12:35:01Z")

</div>

안녕하세요 알기 쉽게 정리해주심에 감사드립니다. 환경들이 모두 갖춰져 있는데, mps 인식을 하지 못하는 것 같아 질문을 여쭈고 싶습니다. 차이나는 점은 dev20220519, dev20220520 차이인 듯 한데, 이외에도 신경써야할 부분이 있을까요? 감사합니다.

---

## [M1에서 MPS 장치를 불러올 수 없습니다.](https://discuss.pytorch.kr/t/m1-mps/290)

<div class="topic-metadata">

**Author:** [@SoHaeng\_Lee](https://discuss.pytorch.kr/u/SoHaeng_Lee)\
**댓글:** 6\
**마지막 업데이트:** [5월 21, 2022, 9:57오전 UTC](https://discuss.pytorch.kr/t/m1-mps/290 "2022-05-21T09:57:10Z")

</div>

재설치 후 코드테스트를 해봤는데 위의 코드에서 mps\_device = torch.device("mps") 부분에서 문제가 생깁니다. 맨위에 import torch는 추가 했습니다. 다른 설정이 필요할까요?
