# M1 MAX: GPU available, but not used

**URL:** https://discourse.scverse.org/t/m1-max-gpu-available-but-not-used/1318
**Category:** scvi-tools
**Created:** [April 13, 2023, 12:49pm UTC](https://discourse.scverse.org/t/m1-max-gpu-available-but-not-used/1318 "2023-04-13T12:49:24Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Agma](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/agma/32/623_2.png) [@Agma](https://discourse.scverse.org/u/Agma)
#### Post date: [April 13, 2023, 12:49pm UTC](https://discourse.scverse.org/t/m1-max-gpu-available-but-not-used/1318/1 "2023-04-13T12:49:25Z")

</div>

Dear all,  
I am trying to train scvi model (macOS, M1 MAX, scvi-tools (0.20.3)). GPU is available, but not used.

and the command:

model.train(use\_gpu=True)

gives:  
MisconfigurationException: `MPSAccelerator` can not run on your system since the accelerator is not available. The following accelerator(s) is available and can be passed into `accelerator` argument of `Trainer`: [‘cpu’].

import torch  
import math  
print(torch.backends.mps.is\_available()) ----\> True  
print(torch.backends.mps.is\_built()). ----\> True

How to activate GPU and make use of it? Can anybody help me to solve this issue?

Thank you.

---

<div class="post-metadata">

### Author: ![martinkim0](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/martinkim0/32/881_2.png) [@martinkim0](https://discourse.scverse.org/u/martinkim0)
#### Post date: [April 13, 2023, 4:57pm UTC](https://discourse.scverse.org/t/m1-max-gpu-available-but-not-used/1318/2 "2023-04-13T16:57:40Z")

</div>

Hi, what kind of environment are you running this in? I would recommend using a conda version that is native for Mac M1 [Miniconda — conda documentation](https://docs.conda.io/en/latest/miniconda.html)

---

<div class="post-metadata">

### Author: ![adamgayoso](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/adamgayoso/32/100_2.png) [@adamgayoso](https://discourse.scverse.org/u/adamgayoso)
#### Post date: [April 13, 2023, 7:37pm UTC](https://discourse.scverse.org/t/m1-max-gpu-available-but-not-used/1318/3 "2023-04-13T19:37:31Z")

</div>

I should add that currently, even if MPS was working, most scvi-tools models will not work as there is no MPS implementation of the lgamma function.

The only one I’ve tested that works is peakVI.

---

<div class="post-metadata">

### Author: ![Agma](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/agma/32/623_2.png) [@Agma](https://discourse.scverse.org/u/Agma)
#### Post date: [April 13, 2023, 8:32pm UTC](https://discourse.scverse.org/t/m1-max-gpu-available-but-not-used/1318/4 "2023-04-13T20:32:52Z")

</div>

Thank you Adam for your answer!!  
Anyway, I am very grateful for the tool and that it is working on M1 MAX on cpu now.

---

<div class="post-metadata">

### Author: ![Agma](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/agma/32/623_2.png) [@Agma](https://discourse.scverse.org/u/Agma)
#### Post date: [April 13, 2023, 8:35pm UTC](https://discourse.scverse.org/t/m1-max-gpu-available-but-not-used/1318/5 "2023-04-13T20:35:44Z")

</div>

I am running it in miniforge3 (arm64).
