Skip to content
Discussion options

You must be logged in to vote

Hi @pypdeveloper ,

torch.cuda is specifically targeted for NVIDIA devices with CUDA enabled.

For Apple Silicon devices, you'll want to use torch.mps (MPS = metal performance shaders).

See the documentation here: https://pytorch.org/docs/stable/notes/mps.html

Also for manual seed on MPS, you'll want to use torch.mps.manual_seed(42) (you can use any number, I just used 42 as an example), see the docs: https://pytorch.org/docs/stable/generated/torch.mps.manual_seed.html#torch.mps.manual_seed

To setup your device for Apple Silicon, you can use the example code:

import torch
import numpy as np
import pandas as pd
import sklearn
import matplotlib.pyplot as plt

print(f"PyTorch version: {torch._…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ayushdeolasee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants