File tree Expand file tree Collapse file tree 3 files changed +66
-7
lines changed Expand file tree Collapse file tree 3 files changed +66
-7
lines changed Original file line number Diff line number Diff line change
1
+ version_file=" assets/version.txt"
2
+ init_file=" torchtitan/__init__.py"
3
+ if [[ -n " $BUILD_VERSION " ]]; then
4
+ # Update the version in version.txt
5
+ echo " $BUILD_VERSION " > " $version_file "
6
+ # Create a variable named __version__ at the end of __init__.py
7
+ echo " __version__ = \" $BUILD_VERSION \" " >> " $init_file "
8
+ else
9
+ echo " Error: BUILD_VERSION environment variable is not set or empty."
10
+ exit 1
11
+ fi
Original file line number Diff line number Diff line change
1
+ name : Build nightly wheels and publish to PyTorch Index
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - nightly
7
+ workflow_dispatch :
8
+
9
+ permissions :
10
+ id-token : write
11
+ contents : read
12
+
13
+ jobs :
14
+ generate-matrix :
15
+ if : github.repository_owner == 'pytorch'
16
+ uses : pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
17
+ with :
18
+ package-type : wheel
19
+ os : linux
20
+ test-infra-repository : pytorch/test-infra
21
+ test-infra-ref : main
22
+ with-cuda : enable
23
+ with-rocm : enable
24
+ python-versions : ' ["3.10", "3.11", "3.12"]'
25
+ build :
26
+ needs : generate-matrix
27
+ name : ${{ matrix.repository }}
28
+ uses : pytorch/test-infra/.github/workflows/build_wheels_linux.yml@main
29
+ strategy :
30
+ fail-fast : false
31
+ with :
32
+ repository : pytorch/torchtitan
33
+ ref : " "
34
+ test-infra-repository : pytorch/test-infra
35
+ test-infra-ref : main
36
+ package-name : torchtitan
37
+ build-matrix : ${{ needs.generate-matrix.outputs.matrix }}
38
+ pre-script : .github/scripts/update_version.sh
39
+ trigger-event : ${{ github.event_name }}
40
+ build-platform : ' python-build-package'
Original file line number Diff line number Diff line change @@ -89,9 +89,7 @@ You may want to see how the model is defined or how parallelism techniques are a
89
89
90
90
## Installation
91
91
92
- ### Nightly
93
-
94
- Coming soon.
92
+ > [ Install PyTorch] ( https://pytorch.org/get-started/locally/ ) before proceeding.
95
93
96
94
### Stable
97
95
@@ -103,14 +101,24 @@ Or via conda:
103
101
``` sh
104
102
conda install conda-forge::torchtitan
105
103
```
106
- ### Sources
107
-
104
+
105
+ ### Nightly
106
+
107
+ > This method requires the nightly build of PyTorch.
108
+
109
+ ``` sh
110
+ pip install --pre torchtitan --index-url https://download.pytorch.org/whl/nightly/cu126
111
+ ```
112
+ You can replace ` cu126 ` with another version of cuda (e.g. ` cu128 ` ) or an AMD GPU (e.g. ` rocm6.3 ` ).
113
+
114
+ ### From source
115
+
116
+ > This method requires the nightly build of PyTorch or PyTorch built from source.
117
+
108
118
``` bash
109
119
git clone https://github.com/pytorch/torchtitan
110
120
cd torchtitan
111
121
pip install -r requirements.txt
112
- pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu126 --force-reinstall
113
- [For AMD GPU] pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/rocm6.3 --force-reinstall
114
122
```
115
123
116
124
### Downloading a tokenizer
You can’t perform that action at this time.
0 commit comments