Skip to content

Commit

Permalink
Update to C++17 for torch>=2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Luthaf committed Oct 6, 2023
1 parent e723afd commit 29d8a7b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/torch-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ jobs:
cargo-test-flags: --release

- os: ubuntu-20.04
torch-version: 2.0.*
torch-version: 2.1.*
python-version: "3.11"
cargo-test-flags: --release
do-valgrind: true

- os: macos-11
torch-version: 2.0.*
torch-version: 2.1.*
python-version: "3.11"
cargo-test-flags: --release

- os: windows-2019
torch-version: 2.0.*
torch-version: 2.1.*
python-version: "3.11"
cargo-test-flags: --release

Expand Down
2 changes: 1 addition & 1 deletion python/rascaline-torch/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ requires = [
"wheel >=0.38",
"cmake",
"torch >= 1.11",
"metatensor-torch @ https://github.com/lab-cosmo/metatensor/archive/ae10944.zip#subdirectory=python/metatensor-torch",
"metatensor-torch @git+https://github.com/lab-cosmo/metatensor@ae10944#subdirectory=python/metatensor-torch",
]

# use a custom build backend to add a dependency on the right version of rascaline
Expand Down
2 changes: 1 addition & 1 deletion rascaline-c-api/tests/catch/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
add_library(catch STATIC catch.cpp)
target_include_directories(catch PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_compile_features(catch PUBLIC cxx_std_11)
target_compile_features(catch PUBLIC cxx_std_17)
2 changes: 1 addition & 1 deletion rascaline-torch/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ add_library(rascaline_torch SHARED
)

target_link_libraries(rascaline_torch PUBLIC torch metatensor_torch rascaline)
target_compile_features(rascaline_torch PUBLIC cxx_std_14)
target_compile_features(rascaline_torch PUBLIC cxx_std_17)
target_include_directories(rascaline_torch PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
Expand Down
2 changes: 1 addition & 1 deletion rascaline-torch/tests/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ pub fn setup_pytorch(build_dir: PathBuf) -> PathBuf {
.expect("failed to run python");
assert!(status.success(), "failed to run `python -m pip install --upgrade pip`");

let torch_version = std::env::var("RASCALINE_TORCH_TEST_VERSION").unwrap_or("2.0.*".into());
let torch_version = std::env::var("RASCALINE_TORCH_TEST_VERSION").unwrap_or("2.1.*".into());
let status = Command::new(&python)
.arg("-m")
.arg("pip")
Expand Down

0 comments on commit 29d8a7b

Please sign in to comment.