Skip to content

Commit

Permalink
Merge pull request #898 from LaurentMazare/pytorch-2.4.1
Browse files Browse the repository at this point in the history
Update for PyTorch 2.4.1.
  • Loading branch information
LaurentMazare authored Oct 4, 2024
2 parents 1fd7075 + ecd7129 commit a2e44c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The code generation part for the C api on top of libtorch comes from

## Getting Started

This crate requires the C++ PyTorch library (libtorch) in version *v2.4.0* to be available on
This crate requires the C++ PyTorch library (libtorch) in version *v2.4.1* to be available on
your system. You can either:

- Use the system-wide libtorch installation (default).
Expand Down Expand Up @@ -85,7 +85,7 @@ seem to include `libtorch.a` by default so this would have to be compiled
manually, e.g. via the following:

```bash
git clone -b v2.4.0 --recurse-submodule https://github.com/pytorch/pytorch.git pytorch-static --depth 1
git clone -b v2.4.1 --recurse-submodule https://github.com/pytorch/pytorch.git pytorch-static --depth 1
cd pytorch-static
USE_CUDA=OFF BUILD_SHARED_LIBS=OFF python setup.py build
# export LIBTORCH to point at the build directory in pytorch-static.
Expand Down
4 changes: 2 additions & 2 deletions torch-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use anyhow::{Context, Result};
use std::path::{Path, PathBuf};
use std::{env, fs, io};

const TORCH_VERSION: &str = "2.4.0";
const TORCH_VERSION: &str = "2.4.1";
const PYTHON_PRINT_PYTORCH_DETAILS: &str = r"
import torch
from torch.utils import cpp_extension
Expand Down Expand Up @@ -158,7 +158,7 @@ fn version_check(version: &str) -> Result<()> {
return Ok(());
}
let version = version.trim();
// Typical version number is 2.4.0+cpu or 2.4.0+cu121
// Typical version number is 2.4.1+cpu or 2.4.1+cu121
let version = match version.split_once('+') {
None => version,
Some((version, _)) => version,
Expand Down

0 comments on commit a2e44c4

Please sign in to comment.