Skip to content

Commit

Permalink
Fix the issues identified during PR review (tracel-ai#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
antimora committed Feb 28, 2023
1 parent 644683a commit 236bf48
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions burn-tch/build.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
use std::env;

fn main() {
// Temporary workaround for https://github.com/burn-rs/burn/issues/180
// Remove this once tch-rs upgrades to Torch 2.0 at least

if cfg!(all(target_arch = "aarch64", target_os = "macos")) {
let message = "Run scripts/fix-tch-build-arm64.py to fix environment variables for torch";
let message = "Run scripts/fix-tch-build-arm64.py to fix the environment variables for torch.\n See https://github.com/burn-rs/burn/issues/180 ";
env::var("LIBTORCH").expect(message);
env::var("DYLD_LIBRARY_PATH").expect(message);
} else if cfg!(all(target_arch = "aarch64", target_os = "linux")) {
let message = "Libtorch for AARCH64 Linux must be manually installed and set up";
let message = "Libtorch for AARCH64 Linux must be manually installed and set up.\n See https://github.com/burn-rs/burn/issues/180 ";
env::var("LIBTORCH").expect(message);
env::var("DYLD_LIBRARY_PATH").expect(message);
}
Expand Down

0 comments on commit 236bf48

Please sign in to comment.