This repository contains the source code used for the embedded ML model case studies presented in the thesis "GPU-Accelerated Infinite-Dimensional Optimization" by Evelyn Gondosiswanto. Note that running these on GPU require an NVIDIA GPU with CUDA support.
Clone the repository and navigate to its root directory:
git clone https://github.com/infiniteopt/ML-Models-OCP-GPU
cd ML-Models-OCP-GPUPython is required to run the case studies using the PyTorch models. Once Python is installed, create and activate a virtual environment, then install the required packages:
python -m venv pytorch-env
source pytorch-env/bin/activate
python -m pip install -r requirements.txtYou'll need to install Julia (available at https://julialang.org/downloads/). Then before starting the REPL, configure PythonCall to use the Python environment you just created:
export JULIA_PYTHONCALL_EXE="$(pwd)/pytorch-env/bin/python"Then start Julia using the repository's project environment:
julia --project=.From the Julia REPL, instantiate the dependencies specified by Project.toml and Manifest.toml:
julia> ]
(ML-Models-OCP-GPU) pkg> instantiateNote that the manifest includes the path to a local HSL_jll file, which allows access to the HSL solver ma97 required for reproducing these results. Ensure that you download HSL_jll from the HSL website and that the manifest points to it before running the benchmarks:
julia> ]
# Add or dev your HSL_jll file
]resolveFrom here, both your Julia and Python environments are set up and you can run the benchmarks accordingly.