https://github.com/benjaminhottell/nix-rocm-pytorch
Compiles pytorch with rocm on nixos
https://github.com/benjaminhottell/nix-rocm-pytorch
nix nixos pytorch rocm
Last synced: 27 days ago
JSON representation
Compiles pytorch with rocm on nixos
- Host: GitHub
- URL: https://github.com/benjaminhottell/nix-rocm-pytorch
- Owner: benjaminhottell
- Created: 2025-07-21T00:29:13.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-08-24T23:27:55.000Z (about 1 month ago)
- Last Synced: 2025-08-25T02:08:55.459Z (about 1 month ago)
- Topics: nix, nixos, pytorch, rocm
- Language: Nix
- Homepage:
- Size: 11.7 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nix-rocm-pytorch
This repository stores how I got [pytorch](https://github.com/pytorch/pytorch) to compile on [NixOS](https://nixos.org/), running on an AMD GPU using [ROCm](https://www.amd.com/en/products/software/rocm.html).
## Setup
In the file `derivations/pytorch-rocm-2_7_1.nix`, change `rocm-archs` to the architectures available on your system.
```nix
# Architectures to compile for
# Try:
# nix-shell -p rocmPackages.rocminfo
# rocm_agent_enumerator
# Semicolon separated!
rocm-archs = "gfx1101;gfx1036";
```## Usage
Running `nix-shell` in the root directory of this repository will build pytorch and all of its dependencies.
This process will probably take a while.
Afterward, run `test.py` to verify that it is working.