py37-pytorch (python/py-pytorch) Updated: 1 year, 2 months ago Add to my watchlist

Tensors and dynamic neural networks in Python with strong GPU acceleration

PyTorch is a Python package that provides two high-level features: Tensor computation (like NumPy) with strong GPU acceleration; Deep neural networks built on a tape-based autograd system. You can reuse your favorite Python packages such as NumPy, SciPy and Cython to extend PyTorch when needed.

Version: 2.0.0 License: BSD
Maintainers No Maintainer
Categories python
Platforms darwin
  • clang10 (Build using the MacPorts clang 10 compiler)
  • clang11 (Build using the MacPorts clang 11 compiler)
  • clang12 (Build using the MacPorts clang 12 compiler)
  • clang13 (Build using the MacPorts clang 13 compiler)
  • clang14 (Build using the MacPorts clang 14 compiler)
  • clang15 (Build using the MacPorts clang 15 compiler)
  • clang16 (Build using the MacPorts clang 16 compiler)
  • clang50 (Build using the MacPorts clang 5.0 compiler)
  • clang60 (Build using the MacPorts clang 6.0 compiler)
  • clang70 (Build using the MacPorts clang 7.0 compiler)
  • clang80 (Build using the MacPorts clang 8.0 compiler)
  • clang90 (Build using the MacPorts clang 9.0 compiler)
  • clangdevel (Build using the MacPorts clang devel compiler)
  • g95 (Build using the g95 Fortran compiler)
  • gcc10 (Build using the MacPorts gcc 10 compiler)
  • gcc11 (Build using the MacPorts gcc 11 compiler)
  • gcc12 (Build using the MacPorts gcc 12 compiler)
  • gccdevel (Build using the MacPorts gcc devel compiler)
  • gfortran (Build using the MacPorts gcc 12 Fortran compiler)
  • mkl (Enable Intel Math Kernel Library support)
  • mpich (Build using the MPICH compiler)
  • mps (Enable Apple Metal Performance Shaders (MPS) support)
  • openmpi (Build using the OpenMPI compiler)

Subport(s) (4)

"py37-pytorch" depends on

lib (22)
run (1)
build (7)
fetch (1)
test (1)

Ports that depend on "py37-pytorch"

Port notes

The port py37-pytorch is built with Apple Metal Performance Shaders (MPS) support for GPU hardware acceleration. To enable Apple GPU devices, use device "mps". Matrix multiplication example:

import torch

mpsDevice = torch.device("mps" if torch.backends.mps.is_available() else "cpu")
x = torch.randn((10_000, 1_000), device=mpsDevice)
cov = (x.T @ x)/x.shape[0]

Port Health:

Loading Port Health

Installations (30 days)


Requested Installations (30 days)


Livecheck error

Error: Port py37-pytorch not found

last updated: 13 hours ago