Commit 503d8f4
Add CUDA environments for pixi (#86)
Summary:
This PR adds multiple environments (by modifying `pixi.toml`) for CPU and GPU environments. Depending on the environment, pymomentum is built with PyTorch with or without CUDA support.
The environment can be set by passing the `-e <env>` option when running pixi tasks. For example, `pixi run -e cpu build_pymomentum` builds without CUDA support while `pixi run -e gpu build_pymomentum` builds with CUDA support. If no `-e` option is passed, the default environment is used, which is `cpu`. To see all available environments, run `pixi info`.
Also, this update includes changes to CMake to find torch packages for any Python versions.
## Checklist:
- [x] Adheres to the [style guidelines](https://facebookincubator.github.io/momentum/docs/developer_guide/style_guide)
- [x] Codebase formatted by running `pixi run lint`
Pull Request resolved: #86
Test Plan:
CI for CPU has been set up. However, the GPU CI setup is not yet complete as I have not figured out how to do it. I am seeking help from the Pixi community.
The GPU environment has been tested locally instead.
Reviewed By: EscapeZero
Differential Revision: D63299584
Pulled By: jeongseok-meta
fbshipit-source-id: 18e583047d7e2d87f3fbb4af34fd835b76557c7c1 parent 59a893f commit 503d8f4
File tree
4 files changed
+8597
-2034
lines changed- .github/workflows
- pymomentum
4 files changed
+8597
-2034
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
41 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
42 | 57 | | |
43 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
44 | 72 | | |
45 | 73 | | |
46 | 74 | | |
| 75 | + | |
47 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
48 | 82 | | |
49 | 83 | | |
50 | | - | |
| 84 | + | |
0 commit comments