Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 1.46 KB

README.md

File metadata and controls

32 lines (22 loc) · 1.46 KB

❄️ Andrei's 2023 Advent of Code ❄️

Build Status

Learning Goals

  • Finish the first 12 days for Rust practice
  • Use tch in at least 5 problems
  • Dockerized CI with tch support for fun
  • Actually understand Rust-y implementations of cyclic data structures

Running the Code

The following instructions set up Torch support, albeit without GPU by default. They are geared towards Apple Silicon, though they should work OK on x86 as well.

  1. Set up Cargo

  2. Enable nightly Rust with rustup, since the project needs features currently only on nightly, like benchmarking support.

  3. Set up a Python Anaconda environment and activate it.

  4. Install PyTorch in this environment: conda install pytorch::pytorch torchvision torchaudio -c pytorch

    • Do not enable LIBTORCH_USE_PYTORCH.
  5. Now you can finally build and run problems:

cargo run --release --bin <XX_problem>

Special thanks to this repo for a simple example of running Torch and its Rust bindings!

See Also