-
Notifications
You must be signed in to change notification settings - Fork 10
Introduce build workflow with pixi
.
#34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
737ce2f
Introduce build workflow with `pixi`.
hameerabbasi 564412c
Add task for PyTorch core build
hameerabbasi a27c64a
Add `parameterized`.
hameerabbasi 50578fd
Update `pixi.lock`.
hameerabbasi f0e2ad0
Add requirements for some `doctr` benchmarks.
hameerabbasi 29e25bb
Remove and ignore `pixi.lock`
hameerabbasi 526ebe0
add `pillow`
hameerabbasi 563f4e0
Add `torch-common.sh` as activation script in `pixi.toml`.
hameerabbasi 9634e20
Update `pixi.toml` to include all environments.
hameerabbasi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# SCM syntax highlighting & preventing 3-way merges | ||
pixi.lock merge=binary linguist-language=YAML linguist-generated=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/git/ | ||
/.zed/ | ||
|
||
|
||
# pixi environments | ||
.pixi | ||
*.egg-info | ||
pixi.lock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
[workspace] | ||
authors = ["Hameer Abbasi <[email protected]>"] | ||
channels = ["conda-forge"] | ||
name = "pytorch-dev" | ||
platforms = ["linux-64", "osx-arm64"] | ||
version = "0.1.0" | ||
|
||
[tasks] | ||
build-core = { cmd = "./pytorch-build.sh", cwd = "." } | ||
build-all = { cmd = "./torch-build.sh", cwd = "." } | ||
update = { cmd = "./torch-update.sh", cwd = "." } | ||
clone = { cmd = "./torch-clone.sh", cwd = "." } | ||
|
||
[activation.env] | ||
PYTORCH_BUILD_DIRECTORY = "${PIXI_PROJECT_ROOT}/git" | ||
PYTORCH_PIXI_BUILD = "1" | ||
|
||
[activation] | ||
scripts = ["./torch-common.sh"] | ||
|
||
[feature.freethreading.dependencies] | ||
python = "3.13.*" | ||
python-freethreading = "3.13.*" | ||
|
||
[dependencies] | ||
python = "3.9.*" | ||
|
||
[target.linux-64.dependencies] | ||
# These three don't have free-threading support | ||
lldb = "*" | ||
gdb = "*" | ||
halide-python = "*" | ||
|
||
[feature.core.dependencies] | ||
pip = "*" | ||
cpython = "*" | ||
cmake = ">=3.27" | ||
ninja = "*" | ||
numpy = "*" | ||
packaging = "*" | ||
pkg-config = "*" | ||
libuv = "*" | ||
pyyaml = "*" | ||
requests = "*" | ||
six = "*" | ||
typing-extensions = ">=4.10.0" | ||
ccache = "*" | ||
scikit-build = "*" | ||
setuptools = ">=70.1.0,<80.0a0" | ||
wheel = "*" | ||
fsspec = "*" | ||
types-dataclasses = "*" | ||
expecttest = "*" | ||
hypothesis = "*" | ||
lintrunner = "*" | ||
scipy = "*" | ||
psutil = "*" | ||
pytest = "*" | ||
ghstack = "*" | ||
ipython = "*" | ||
pytest-sugar = "*" | ||
pytest-xdist = "*" | ||
filelock = "*" | ||
sympy = "*" | ||
astunparse = "*" | ||
dill = "*" | ||
jinja2 = "*" | ||
lark = "*" | ||
optree = "*" | ||
tabulate = "*" | ||
networkx = "*" | ||
zlib = "*" | ||
parameterized = "*" | ||
libglib = "*" | ||
pango = "*" | ||
pillow = "*" | ||
|
||
[feature.core.target.linux-64.dependencies] | ||
gcc = "13.*" | ||
gxx = "13.*" | ||
clang = "*" | ||
clangxx = "*" | ||
magma = "*" | ||
cuda-driver-dev = "*" | ||
cuda-version = "12.6.*" | ||
cudnn = "*" | ||
conda-gcc-specs = "*" | ||
cuda-libraries-dev = "*" | ||
cuda-nvcc = "*" | ||
cuda-gdb = "*" | ||
cuda-nvtx-dev = "*" | ||
cuda-nvml-dev = "*" | ||
cuda-cupti-dev = "*" | ||
mkl = "*" | ||
mkl-include = "*" | ||
sysroot_linux-64 = ">=2.17" | ||
|
||
[feature.core.pypi-dependencies] | ||
z3-solver = "*" | ||
|
||
[environments] | ||
default = ["default", "core"] | ||
freethreading = { features = [ | ||
"freethreading", | ||
"core", | ||
], no-default-feature = true } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed to make sure the environment is set up properly
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With
conda
, yes. But if you look at the following lines;pixi
will take care of that for us. I'm calling the script inside theactivation.scripts
section ofpixi.toml
.torch-build/pixi.toml
Lines 18 to 19 in 9634e20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about deactivation?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pixi tasks are generally run under a new shell process with
pixi shell
orpixi run
instead of in the same process. Thus the deactivation cleanup isn't needed. One CAN use the same shell witheval "$(pixi shell-hook)"
, but that's a fringe use-case.