NVlabs / timeloop

Timeloop performs modeling, mapping and code-generation for tensor algebra workloads on various accelerator architectures.
https://timeloop.csail.mit.edu/
BSD 3-Clause "New" or "Revised" License
340 stars 104 forks source link

Two-command install process (mac/linux) #179

Open gdinh opened 1 year ago

gdinh commented 1 year ago

I've managed to package up Timeloop in a way that should make it quick to install (including dependencies) on both linux and mac (should work for WSL too, but I haven't had the time to test it). Wondering if it would make sense to put it in the documentation.

The package uses nix package manager, which can be installed with the following command (skip if you already have it installed):

sh <(curl -L https://nixos.org/nix/install) --daemon

Follow the onscreen instructions. Once finished, you may need to relaunch the shell (type 'zsh' or the appropriate shell) for changes to propagate.

Now you can launch a nix shell (sort of like a virtualenv - the package will only be present when the shell is enabled) with timeloop enabled:

nix-shell -I nixpkgs=channel:nixpkgs-unstable -p timeloop

You should have access to timeloop-mapper and the rest of the executables. This will install accelergy as well by default.

To install on your system itself, rather than in a virtualenv-like shell, check out this page.

angshuman-parashar commented 1 year ago

This is super-cool! I can see the timeloop package in the nix unstable channel, thanks for doing that. I'll try it out and let you know how it works.