BSD Ports

misc/py-pytorch 2.14.1 FreeBSD

PyTorch: Tensors and dynamic neural networks in Python

System
FreeBSD
Repository
FreeBSD ports
Maintainer
[email protected]
Last update
Commit
04cfc674ee
License
BSD3CLAUSE
Categories
misc
Package size
60778.6 KiB, 411688.3 KiB installed

Description

PyTorch is an open-source machine learning library for Python, based on the Torch library, used for applications such as natural language processing. It is primarily developed by Facebook's AI Research lab.

PyTorch provides two high-level features: * Tensor computation (like NumPy) with strong GPU acceleration * Deep neural networks built on a tape-based autograd system

It is a popular choice for deep learning research and production due to its flexibility and ease of use.

Install

Binary package:

pkg install py312-pytorch

From the ports tree:

cd /usr/ports/misc/py-pytorch/ && make install clean

To depend on this port in another port's Makefile:

RUN_DEPENDS=	py312-pytorch>0:misc/py-pytorch

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

Repositoryaarch64amd64armv6armv7i386
FreeBSD:14:latest2.14.12.14.1---
FreeBSD:14:quarterly2.14.0_22.14.0_2n/a--
FreeBSD:15:latest2.14.12.14.1n/a--
FreeBSD:15:quarterly2.14.0_22.14.0_2n/an/an/a
FreeBSD:16:latest2.14.12.14.1n/an/an/a
FreeBSD:16:quarterlyn/an/an/an/an/a

Dependencies

As this port's Makefile names them.

Build 19

Library 5

Runtime 11

Test 3

The full lists below include those, and their dependencies in turn.

Build dependencies 138

The first 100 are listed.

Run dependencies 202

The first 100 are listed.

Required by 81

Configuration

Options name: misc_pytorch

OptionDefaultDescription
VULKANonVulkan GPU support
USES
compiler:c++17-lang localbase:ldflags mpi:openmpi python shebangfix
Service scripts
none

Message after installing

You installed PyTorch: an AI toolkit.

## Need env var on amd64 Zen5/Zen6 CPU architectures

Due to the bug in the OpenBLAS CPU arch detection PyTorch will
crash on Zen5/Zen6 CPU architectures.

Reference: https://github.com/OpenMathLib/OpenBLAS/issues/6029

Use the following environment variable to work around this problem:
OPENBLAS_CORETYPE=SKYLAKEX (some other values might work too)

The same problem exists in all software that uses OpenBLAS, not just PyTorch.

## Need env var on aarch64 due to high TLS requirements

When running PyTorch on aarch64 you will need to have this environment
variable set:
LD_STATIC_TLS_EXTRA=4096

It pre-allocates more TLS space when the Python process starts so that
the PyTorch shared libraries will have sufficient TLS space when they are
loaded dynamically.

Files

distinfo 2
FileSizeSHA256
pytorch/pytorch-v2.14.1.tar.gz7.97872843e+08d0ebad9ca4219959b29b7ad9ab6469fe49a3d668f8b5a62dd115f02f3a914447
pytorch/pytorch-cpuinfo-bc3c01e_GH0.tar.gz3.547453e+0609459e830a588fee730feb19d8a32fedf2d36d48db7bd9b18c3159c7e74ea0ce
Master sites 1
  • https://github.com/pytorch/pytorch/releases/download/v2.14.1/

Commit history 8

DateCommitCreditsLog message
04cfc674ee Piotr Kubaj misc/py-pytorch: fix build on powerpc64
ld: error: undefined reference: pthread_create >>> referenced by ../../../../lib/libc10.so (disallowed by --no-allow-shlib-undefined)
2e09da7c20 Yuri Victorovich misc/py-pytorch: update 2.14.0 → 2.14.1
4a336a3994 Yuri Victorovich misc/py-pytorch: Update pkg-message
716c2def90 Yuri Victorovich misc/py-pytorch: fix unknown symbol on aarch64; add pkg-message
Add cpuinfo patch to support aarch64 for this.
a62b2a87bb Yuri Victorovich misc/py-pytorch: unbreak on amd64
Add FreeBSD patches for FreeBSD. Many patches were upstreamed.

The latest 5 of 8 in the history this site was built from.