Skip to content

Commit

Permalink
0.17.2 Release (#175)
Browse files Browse the repository at this point in the history
Going ahead with this release without torch.compile so that the recent
patches get picked up. Also adds torch 2.5 binaries.

Fixes #174.
  • Loading branch information
alihassanijr authored Oct 29, 2024
1 parent 0f0b82e commit ec79bcc
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 32 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog

## [Main branch]


## [0.17.2] - 2024-10-29
* Enable KV parallelism by default
* No realistic use case will disable KV parallelism, because it virtually kills occupancy in any
small-batch/few-head case. Most packages should be using this by default, the same way PyTorch's
Expand All @@ -11,6 +14,7 @@
* Fix inconsistencies in docs. (#167)
* QoL
* Switch from `torch.cuda.amp` to `torch.amp` since the former is deprecated (#168)
* Binaries for torch 2.5.

## [0.17.1] - 2024-05-19
* Fixed interface for python 3.8 and 3.9
Expand Down
32 changes: 24 additions & 8 deletions dev/packaging/build_all_wheels_parallel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ build_one() {
echo "Launching container with $image_name ..."
container_name="$image_name"_"$cu"_"$pytorch_ver"

py_versions=(3.8 3.9 3.10 3.11)
py_versions=(3.9 3.10 3.11)

# Torch started supporting python 3.12 since
# 2.2.0
Expand All @@ -43,6 +43,10 @@ build_one() {
if [[ $torch_major -ge 22 ]]; then
py_versions+=(3.12)
fi
# Torch 2.5 dropped support for python 3.8.
if [[ $torch_major -le 24 ]]; then
py_versions+=(3.8)
fi

for py in "${py_versions[@]}"; do
container_name_="${container_name}_${py}"
Expand All @@ -65,24 +69,36 @@ EOF
done
}

build_one_and_capture_output ()
{
build_one $1 $2 2>&1 > log_${1}_${2}.txt
}


if [[ -n "$1" ]] && [[ -n "$2" ]]; then
build_one "$1" "$2"
else
# We don't need to build for every minor torch release; they're usually
# compatible in their python API and ABIs.

build_one cu124 2.4.0 & build_one cu121 2.4.0
build_one_and_capture_output cu124 2.5.0 & build_one_and_capture_output cu121 2.5.0

build_one_and_capture_output cu118 2.5.0 & build_one_and_capture_output cu124 2.4.0

build_one cu118 2.4.0 & build_one cpu 2.4.0
build_one_and_capture_output cu121 2.4.0 & build_one_and_capture_output cu118 2.4.0

build_one cu121 2.3.0 & build_one cu118 2.3.0
build_one_and_capture_output cu121 2.3.0 & build_one_and_capture_output cu118 2.3.0

build_one cu121 2.2.0 & build_one cu118 2.2.0
build_one_and_capture_output cu121 2.2.0 & build_one_and_capture_output cu118 2.2.0

build_one cu121 2.1.0 & build_one cu118 2.1.0
build_one_and_capture_output cu121 2.1.0 & build_one_and_capture_output cu118 2.1.0

build_one cu118 2.0.0 & build_one cu117 2.0.0
build_one_and_capture_output cu118 2.0.0 & build_one_and_capture_output cu117 2.0.0

build_one cpu 2.3.0 & build_one cpu 2.2.0 & build_one cpu 2.1.0 & build_one cpu 2.0.0
build_one_and_capture_output cpu 2.5.0 & \
build_one_and_capture_output cpu 2.4.0 & \
build_one_and_capture_output cpu 2.3.0 & \
build_one_and_capture_output cpu 2.2.0 & \
build_one_and_capture_output cpu 2.1.0 & \
build_one_and_capture_output cpu 2.0.0
fi
23 changes: 20 additions & 3 deletions dev/packaging/gen_wheel_index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,44 @@ for cu in cpu cu101 cu102 cu111 cu113 cu115 cu116 cu117 cu118 cu121 cu124; do
echo "Creating $PWD/index.html ..."
# First sort by torch version, then stable sort by d2 version with unique.
# As a result, the latest torch version for each d2 version is kept.
rm index.html
echo "<!DOCTYPE html><html lang=\"en\"><head>" >> index.html
echo "<meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">" >> index.html
echo "<title>Index of packages</title></head><body>" >> index.html
for whl in $(find -type f -name '*.whl' -printf '%P\n' \
| sort -k 1 -r | sort -t '/' -k 2 --stable -r --unique); do
echo "<a href=\"${whl/+/%2B}\">$whl</a><br>"
done > index.html
done >> index.html
echo "</body></html>" >> index.html


for torch in torch*; do
cd "$root/$cu/$torch"

rm index.html
echo "<!DOCTYPE html><html lang=\"en\"><head>" >> index.html
echo "<meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">" >> index.html
echo "<title>Index of packages</title></head><body>" >> index.html

# list all whl for each cuda,torch version
echo "Creating $PWD/index.html ..."
for whl in $(find . -type f -name '*.whl' -printf '%P\n' | sort -r); do
echo "<a href=\"${whl/+/%2B}\">$whl</a><br>"
done > index.html
done >> index.html
echo "</body></html>" >> index.html
done
done

cd "$root"
# Just list everything:
rm index.html
echo "<!DOCTYPE html><html lang=\"en\"><head>" >> $index
echo "<meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">" >> $index
echo "<title>Index of packages</title></head><body>" >> $index

echo "Creating $index ..."
for whl in $(find . -type f -name '*.whl' -printf '%P\n' | sort -r); do
echo "<a href=\"${whl/+/%2B}\">$whl</a><br>"
done > "$index"
done >> "$index"
echo "</body></html>" >> $index

2 changes: 1 addition & 1 deletion src/natten/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,4 @@
"disable_tiled_na",
]

__version__ = "0.17.2.dev0"
__version__ = "0.17.2"
72 changes: 52 additions & 20 deletions webpage/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<div class="title row">
<div class="col-lg-12">
<p class="h2">Install with pip</p>
<p>Latest release: <code>0.17.1</code></p>
<p>Latest release: <code>0.17.2</code></p>
</div>
</div>
<div class="row">
Expand All @@ -60,7 +60,10 @@
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">PyTorch:</a>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link active" id="tab-E" data-bs-toggle="tab" data-bs-target="#v240" type="button" role="tab" aria-controls="v240" aria-selected="true">2.4.X</button>
<button class="nav-link active" id="tab-E" data-bs-toggle="tab" data-bs-target="#v250" type="button" role="tab" aria-controls="v250" aria-selected="true">2.5.X</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="tab-E" data-bs-toggle="tab" data-bs-target="#v240" type="button" role="tab" aria-controls="v240" aria-selected="true">2.4.X</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="tab-D" data-bs-toggle="tab" data-bs-target="#v230" type="button" role="tab" aria-controls="v230" aria-selected="true">2.3.X</button>
Expand All @@ -76,7 +79,36 @@
</li>
</ul>
<div class="tab-content" id="torchTabContent">
<div class="tab-pane fade show active" id="v240" role="tabpanel" aria-labelledby="tab-E">
<div class="tab-pane fade show active" id="v250" role="tabpanel" aria-labelledby="tab-F">
<div class="d-flex align-items-start">
<div class="nav flex-column nav-pills me-3" id="v250-tab" role="tablist" aria-orientation="vertical">
<button class="nav-link active" id="v250-cu124-tab" data-bs-toggle="pill"
data-bs-target="#v250-124" type="button" role="tab" aria-controls="v250-124" aria-selected="true">CUDA 12.4</button>
<button class="nav-link" id="v250-cu121-tab" data-bs-toggle="pill" data-bs-target="#v250-121" type="button" role="tab" aria-controls="v250-121" aria-selected="true">CUDA 12.1</button>
<button class="nav-link" id="v250-cu118-tab" data-bs-toggle="pill" data-bs-target="#v250-118" type="button" role="tab" aria-controls="v230-118" aria-selected="false">CUDA 11.8</button>
<button class="nav-link" id="v250-cpu-tab" data-bs-toggle="pill" data-bs-target="#v250-cpu" type="button" role="tab" aria-controls="v230-cpu" aria-selected="false">CPU</button>
</div>
<div class="tab-content" id="v250-tabContent">
<div class="tab-pane fade show active" id="v250-124" role="tabpanel" aria-labelledby="v250-cu124-tab">
<p>Run this command:</p>
<pre>pip3 install natten==0.17.2+torch250cu124 -f https://shi-labs.com/natten/wheels/</pre>
</div>
<div class="tab-pane fade show" id="v250-121" role="tabpanel" aria-labelledby="v250-cu121-tab">
<p>Run this command:</p>
<pre>pip3 install natten==0.17.2+torch250cu121 -f https://shi-labs.com/natten/wheels/</pre>
</div>
<div class="tab-pane fade" id="v250-118" role="tabpanel" aria-labelledby="v250-cu118-tab">
<p>Run this command:</p>
<pre>pip3 install natten==0.17.2+torch250cu118 -f https://shi-labs.com/natten/wheels</pre>
</div>
<div class="tab-pane fade" id="v250-cpu" role="tabpanel" aria-labelledby="v250-cpu-tab">
<p>Run this command:</p>
<pre>pip3 install natten==0.17.2+torch250cpu -f https://shi-labs.com/natten/wheels</pre>
</div>
</div>
</div>
</div>
<div class="tab-pane fade show" id="v240" role="tabpanel" aria-labelledby="tab-E">
<div class="d-flex align-items-start">
<div class="nav flex-column nav-pills me-3" id="v240-tab" role="tablist" aria-orientation="vertical">
<button class="nav-link active" id="v240-cu124-tab" data-bs-toggle="pill"
Expand All @@ -88,19 +120,19 @@
<div class="tab-content" id="v240-tabContent">
<div class="tab-pane fade show active" id="v240-124" role="tabpanel" aria-labelledby="v240-cu124-tab">
<p>Run this command:</p>
<pre>pip3 install natten==0.17.1+torch240cu124 -f https://shi-labs.com/natten/wheels/</pre>
<pre>pip3 install natten==0.17.2+torch240cu124 -f https://shi-labs.com/natten/wheels/</pre>
</div>
<div class="tab-pane fade show" id="v240-121" role="tabpanel" aria-labelledby="v240-cu121-tab">
<p>Run this command:</p>
<pre>pip3 install natten==0.17.1+torch240cu121 -f https://shi-labs.com/natten/wheels/</pre>
<pre>pip3 install natten==0.17.2+torch240cu121 -f https://shi-labs.com/natten/wheels/</pre>
</div>
<div class="tab-pane fade" id="v240-118" role="tabpanel" aria-labelledby="v240-cu118-tab">
<p>Run this command:</p>
<pre>pip3 install natten==0.17.1+torch240cu118 -f https://shi-labs.com/natten/wheels</pre>
<pre>pip3 install natten==0.17.2+torch240cu118 -f https://shi-labs.com/natten/wheels</pre>
</div>
<div class="tab-pane fade" id="v240-cpu" role="tabpanel" aria-labelledby="v240-cpu-tab">
<p>Run this command:</p>
<pre>pip3 install natten==0.17.1+torch240cpu -f https://shi-labs.com/natten/wheels</pre>
<pre>pip3 install natten==0.17.2+torch240cpu -f https://shi-labs.com/natten/wheels</pre>
</div>
</div>
</div>
Expand All @@ -115,15 +147,15 @@
<div class="tab-content" id="v230-tabContent">
<div class="tab-pane fade show active" id="v230-121" role="tabpanel" aria-labelledby="v230-cu121-tab">
<p>Run this command:</p>
<pre>pip3 install natten==0.17.1+torch230cu121 -f https://shi-labs.com/natten/wheels/</pre>
<pre>pip3 install natten==0.17.2+torch230cu121 -f https://shi-labs.com/natten/wheels/</pre>
</div>
<div class="tab-pane fade" id="v230-118" role="tabpanel" aria-labelledby="v230-cu118-tab">
<p>Run this command:</p>
<pre>pip3 install natten==0.17.1+torch230cu118 -f https://shi-labs.com/natten/wheels</pre>
<pre>pip3 install natten==0.17.2+torch230cu118 -f https://shi-labs.com/natten/wheels</pre>
</div>
<div class="tab-pane fade" id="v230-cpu" role="tabpanel" aria-labelledby="v230-cpu-tab">
<p>Run this command:</p>
<pre>pip3 install natten==0.17.1+torch230cpu -f https://shi-labs.com/natten/wheels</pre>
<pre>pip3 install natten==0.17.2+torch230cpu -f https://shi-labs.com/natten/wheels</pre>
</div>
</div>
</div>
Expand All @@ -138,15 +170,15 @@
<div class="tab-content" id="v220-tabContent">
<div class="tab-pane fade show active" id="v220-121" role="tabpanel" aria-labelledby="v220-cu121-tab">
<p>Run this command:</p>
<pre>pip3 install natten==0.17.1+torch220cu121 -f https://shi-labs.com/natten/wheels/</pre>
<pre>pip3 install natten==0.17.2+torch220cu121 -f https://shi-labs.com/natten/wheels/</pre>
</div>
<div class="tab-pane fade" id="v220-118" role="tabpanel" aria-labelledby="v220-cu118-tab">
<p>Run this command:</p>
<pre>pip3 install natten==0.17.1+torch220cu118 -f https://shi-labs.com/natten/wheels</pre>
<pre>pip3 install natten==0.17.2+torch220cu118 -f https://shi-labs.com/natten/wheels</pre>
</div>
<div class="tab-pane fade" id="v220-cpu" role="tabpanel" aria-labelledby="v220-cpu-tab">
<p>Run this command:</p>
<pre>pip3 install natten==0.17.1+torch220cpu -f https://shi-labs.com/natten/wheels</pre>
<pre>pip3 install natten==0.17.2+torch220cpu -f https://shi-labs.com/natten/wheels</pre>
</div>
</div>
</div>
Expand All @@ -161,15 +193,15 @@
<div class="tab-content" id="v210-tabContent">
<div class="tab-pane fade show active" id="v210-121" role="tabpanel" aria-labelledby="v210-cu121-tab">
<p>Run this command:</p>
<pre>pip3 install natten==0.17.1+torch210cu121 -f https://shi-labs.com/natten/wheels/</pre>
<pre>pip3 install natten==0.17.2+torch210cu121 -f https://shi-labs.com/natten/wheels/</pre>
</div>
<div class="tab-pane fade" id="v210-118" role="tabpanel" aria-labelledby="v210-cu118-tab">
<p>Run this command:</p>
<pre>pip3 install natten==0.17.1+torch210cu118 -f https://shi-labs.com/natten/wheels</pre>
<pre>pip3 install natten==0.17.2+torch210cu118 -f https://shi-labs.com/natten/wheels</pre>
</div>
<div class="tab-pane fade" id="v210-cpu" role="tabpanel" aria-labelledby="v210-cpu-tab">
<p>Run this command:</p>
<pre>pip3 install natten==0.17.1+torch210cpu -f https://shi-labs.com/natten/wheels</pre>
<pre>pip3 install natten==0.17.2+torch210cpu -f https://shi-labs.com/natten/wheels</pre>
</div>
</div>
</div>
Expand All @@ -184,21 +216,21 @@
<div class="tab-content" id="v200-tabContent">
<div class="tab-pane fade show active" id="v200-118" role="tabpanel" aria-labelledby="v200-cu118-tab">
<p>Run this command:</p>
<pre>pip3 install natten==0.17.1+torch200cu118 -f https://shi-labs.com/natten/wheels</pre>
<pre>pip3 install natten==0.17.2+torch200cu118 -f https://shi-labs.com/natten/wheels</pre>
</div>
<div class="tab-pane fade" id="v200-117" role="tabpanel" aria-labelledby="v200-cu117-tab">
<p>Run this command:</p>
<pre>pip3 install natten==0.17.1+torch200cu117 -f https://shi-labs.com/natten/wheels</pre>
<pre>pip3 install natten==0.17.2+torch200cu117 -f https://shi-labs.com/natten/wheels</pre>
</div>
<div class="tab-pane fade" id="v200-cpu" role="tabpanel" aria-labelledby="v200-cpu-tab">
<p>Run this command:</p>
<pre>pip3 install natten==0.17.1+torch200cpu -f https://shi-labs.com/natten/wheels</pre>
<pre>pip3 install natten==0.17.2+torch200cpu -f https://shi-labs.com/natten/wheels</pre>
</div>
</div>
</div>
</div>
</div>
<p>Your build isn't listed? Mac user? Just do: <pre class="tight">pip install natten==0.17.1</pre></p>
<p>Your build isn't listed? Mac user? Just do: <pre class="tight">pip install natten==0.17.2</pre></p>
<p>Careful though, without pre-compiled wheels installing might take a while.</p>
<p>You're also required to have CUDA &gt; 11.7, cmake &gt; 3.20 and PyTorch &gt; 2.0 installed before attempting to install/build NATTEN.</p>
<p></p>
Expand Down

0 comments on commit ec79bcc

Please sign in to comment.