Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
fengzch-das
nunchaku
Commits
67c543d7
Unverified
Commit
67c543d7
authored
May 21, 2025
by
Muyang Li
Committed by
GitHub
May 21, 2025
Browse files
Merge pull request #388 from mit-han-lab/dev
Merge into to main for CI
parents
cef510d5
f0fc70f9
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
156 additions
and
63 deletions
+156
-63
.github/workflows/auto-merge-main-into-dev.yaml
.github/workflows/auto-merge-main-into-dev.yaml
+0
-0
.github/workflows/clean-nightly-releases.yaml
.github/workflows/clean-nightly-releases.yaml
+42
-0
.github/workflows/nightly-build.yaml
.github/workflows/nightly-build.yaml
+83
-0
.github/workflows/test_ampere.yaml
.github/workflows/test_ampere.yaml
+1
-1
.github/workflows/test_blackwell.yaml
.github/workflows/test_blackwell.yaml
+1
-1
MANIFEST.in
MANIFEST.in
+1
-1
nunchaku/__version__.py
nunchaku/__version__.py
+1
-1
nunchaku/caching/utils.py
nunchaku/caching/utils.py
+4
-4
scripts/build_all_linux_wheels.sh
scripts/build_all_linux_wheels.sh
+4
-6
scripts/build_all_windows_wheels.cmd
scripts/build_all_windows_wheels.cmd
+4
-6
scripts/build_linux_wheel.sh
scripts/build_linux_wheel.sh
+5
-1
scripts/build_linux_wheel_torch2.7_cu128.sh
scripts/build_linux_wheel_torch2.7_cu128.sh
+0
-36
scripts/build_windows_wheel.cmd
scripts/build_windows_wheel.cmd
+5
-1
scripts/build_windows_wheel_torch_nightly.cmd
scripts/build_windows_wheel_torch_nightly.cmd
+2
-5
setup.py
setup.py
+3
-0
No files found.
.github/workflows/auto-merge-main-into-dev.yml
→
.github/workflows/auto-merge-main-into-dev.y
a
ml
View file @
67c543d7
File moved
.github/workflows/clean-nightly-releases.yaml
0 → 100644
View file @
67c543d7
#name: Clean Nightly Releases
#
#on:
# schedule:
# - cron: '0 4 * * *' # Runs daily at 04:00 UTC
# workflow_dispatch: # Allows manual triggering
#
#jobs:
# clean-nightly:
# runs-on: ubuntu-latest
# permissions:
# contents: write
# packages: write
#
# steps:
# - name: Set up GitHub CLI
# uses: cli/cli-action@v2
#
# - name: Authenticate GitHub CLI
# run: echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
#
# - name: Get and clean old nightly releases
# env:
# GH_REPO: ${{ github.repository }}
# run: |
# # Get all release titles that match the nightly pattern
# mapfile -t releases < <(
# gh release list --limit 1000 --json tagName,name,createdAt --jq '
# sort_by(.createdAt) | reverse |
# map(select(.name | test("^Nunchaku Nightly v[0-9]+\\.[0-9]+\\.[0-9]+dev[0-9]{8}$"))) |
# map(.tagName)'
# )
#
# # Keep only the first 5 (latest), delete the rest
# if (( ${#releases[@]} > 5 )); then
# for tag in "${releases[@]:5}"; do
# echo "Deleting old release: $tag"
# gh release delete "$tag" --yes
# done
# else
# echo "Less than or equal to 5 nightly releases found. No cleanup needed."
# fi
.github/workflows/nightly-build.yaml
0 → 100644
View file @
67c543d7
#name: Nightly Build
#
#on:
# schedule:
# - cron: '0 8 * * *'
# workflow_dispatch:
#
#jobs:
# tag:
# name: Tag Dev Branch if dev version
# runs-on: ubuntu-latest
# outputs:
# is_dev: ${{ steps.check.outputs.is_dev }}
# tag_name: ${{ steps.tag.outputs.tag_name }}
# steps:
# - name: Checkout dev branch
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# ref: dev
#
# - name: Extract version from __version__.py
# id: version
# run: |
# version=$(grep '__version__' nunchaku/__version__.py | sed -E 's/.*"([^"]+)".*/\1/')
# echo "version=$version" >> "$GITHUB_OUTPUT"
# echo "Extracted version: $version"
#
# - name: Check if version contains 'dev'
# id: check
# run: |
# if [[ "${{ steps.version.outputs.version }}" == *dev* ]]; then
# echo "is_dev=true" >> "$GITHUB_OUTPUT"
# else
# echo "is_dev=false" >> "$GITHUB_OUTPUT"
# fi
#
# - name: Set tag name
# id: tag
# if: steps.check.outputs.is_dev == 'true'
# run: |
# today=$(date -u +"%Y%m%d")
# tag_name="v${{ steps.version.outputs.version }}-$today"
# echo "tag_name=$tag_name" >> "$GITHUB_OUTPUT"
#
# - name: Create and push tag
# if: steps.check.outputs.is_dev == 'true'
# run: |
# git config user.name "github-actions"
# git config user.email "github-actions@users.noreply.github.com"
# git tag ${{ steps.tag.outputs.tag_name }}
# git push origin ${{ steps.tag.outputs.tag_name }}
#
# - name: Skip tagging (version is not dev)
# if: steps.check.outputs.is_dev == 'false'
# run: echo "Version is not a dev version. Skipping tag."
#
# windows-build:
# name: Build the windows nightly wheels
# runs-on: self-hosted, windows-build
# needs: tag
# if: needs.tag.outputs.is_dev == 'true'
# steps:
# - name: Checkout to the tag
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# ref: ${{ needs.tag.outputs.tag_name }}
# submodules: true
# - name: Show current commit
# run: git log -1 --oneline
# - name: setup Conda
# run: |
# pwd
# - name: Build all wheels
# run: .\scripts\build_all_windows_wheels.cmd
# - name: Upload wheels
# run: |
# echo "Uploading wheels"
# mkdir -p wheels
# cp dist/*.whl wheels/
#
#
.github/workflows/
pr_
test_ampere.yaml
→
.github/workflows/test_ampere.yaml
View file @
67c543d7
name
:
pr_
test_ampere
name
:
test_ampere
on
:
on
:
workflow_dispatch
:
workflow_dispatch
:
...
...
.github/workflows/
pr_
test_blackwell.yaml
→
.github/workflows/test_blackwell.yaml
View file @
67c543d7
name
:
pr_
test_blackwell
name
:
test_blackwell
on
:
on
:
workflow_dispatch
:
workflow_dispatch
:
...
...
MANIFEST.in
View file @
67c543d7
recursive-include src *.cpp *.h *.hpp *.ipp *.cu *.cuh
recursive-include src *.cpp *.h *.hpp *.ipp *.cu *.cuh
recursive-include nunchaku *.py
recursive-include nunchaku *.py
*.json
recursive-include nunchaku/csrc *.cpp *.h *.hpp *.ipp *.cu *.cuh
recursive-include nunchaku/csrc *.cpp *.h *.hpp *.ipp *.cu *.cuh
recursive-include third_party/Block-Sparse-Attention/csrc/block_sparse_attn *.cpp *.h *.hpp *.ipp *.cu *.cuh
recursive-include third_party/Block-Sparse-Attention/csrc/block_sparse_attn *.cpp *.h *.hpp *.ipp *.cu *.cuh
...
...
nunchaku/__version__.py
View file @
67c543d7
__version__
=
"0.3.0dev
1
"
__version__
=
"0.3.0dev"
nunchaku/caching/utils.py
View file @
67c543d7
...
@@ -257,7 +257,7 @@ class SanaCachedTransformerBlocks(nn.Module):
...
@@ -257,7 +257,7 @@ class SanaCachedTransformerBlocks(nn.Module):
first_hidden_states_residual
=
hidden_states
-
original_hidden_states
first_hidden_states_residual
=
hidden_states
-
original_hidden_states
del
original_hidden_states
del
original_hidden_states
can_use_cache
=
get_can_use_cache
(
can_use_cache
,
_
=
get_can_use_cache
(
first_hidden_states_residual
,
first_hidden_states_residual
,
threshold
=
self
.
residual_diff_threshold
,
threshold
=
self
.
residual_diff_threshold
,
parallelized
=
self
.
transformer
is
not
None
and
getattr
(
self
.
transformer
,
"_is_parallelized"
,
False
),
parallelized
=
self
.
transformer
is
not
None
and
getattr
(
self
.
transformer
,
"_is_parallelized"
,
False
),
...
@@ -272,7 +272,7 @@ class SanaCachedTransformerBlocks(nn.Module):
...
@@ -272,7 +272,7 @@ class SanaCachedTransformerBlocks(nn.Module):
else
:
else
:
if
self
.
verbose
:
if
self
.
verbose
:
print
(
"Cache miss!!!"
)
print
(
"Cache miss!!!"
)
set_buffer
(
"first_hidden_states_residual"
,
first_hidden_states_residual
)
set_buffer
(
"first_
multi_
hidden_states_residual"
,
first_hidden_states_residual
)
del
first_hidden_states_residual
del
first_hidden_states_residual
hidden_states
,
hidden_states_residual
=
self
.
call_remaining_transformer_blocks
(
hidden_states
,
hidden_states_residual
=
self
.
call_remaining_transformer_blocks
(
...
@@ -284,7 +284,7 @@ class SanaCachedTransformerBlocks(nn.Module):
...
@@ -284,7 +284,7 @@ class SanaCachedTransformerBlocks(nn.Module):
post_patch_height
=
post_patch_height
,
post_patch_height
=
post_patch_height
,
post_patch_width
=
post_patch_width
,
post_patch_width
=
post_patch_width
,
)
)
set_buffer
(
"hidden_states_residual"
,
hidden_states_residual
)
set_buffer
(
"
multi_
hidden_states_residual"
,
hidden_states_residual
)
torch
.
_dynamo
.
graph_break
()
torch
.
_dynamo
.
graph_break
()
return
hidden_states
return
hidden_states
...
@@ -399,7 +399,7 @@ class FluxCachedTransformerBlocks(nn.Module):
...
@@ -399,7 +399,7 @@ class FluxCachedTransformerBlocks(nn.Module):
controlnet_block_samples
=
(
controlnet_block_samples
=
(
torch
.
stack
(
controlnet_block_samples
).
to
(
original_device
)
if
len
(
controlnet_block_samples
)
>
0
else
None
torch
.
stack
(
controlnet_block_samples
).
to
(
original_device
)
if
len
(
controlnet_block_samples
)
>
0
else
None
)
)
if
controlnet_single_block_samples
is
not
None
and
len
(
controlnet_single_block_samples
)
>
0
:
if
controlnet_single_block_samples
is
not
None
:
controlnet_single_block_samples
=
(
controlnet_single_block_samples
=
(
torch
.
stack
(
controlnet_single_block_samples
).
to
(
original_device
)
torch
.
stack
(
controlnet_single_block_samples
).
to
(
original_device
)
if
len
(
controlnet_single_block_samples
)
>
0
if
len
(
controlnet_single_block_samples
)
>
0
...
...
scripts/build_all_linux_wheels.sh
View file @
67c543d7
#!/bin/bash
#!/bin/bash
# Define the versions for Python, Torch, and CUDA
# Define the versions for Python, Torch, and CUDA
python_versions
=(
"3.10"
"3.11"
"3.12"
"3.13"
)
python_versions
=(
"3.10"
"3.11"
"3.12"
)
torch_versions
=(
"2.5"
"2.6"
)
torch_versions
=(
"2.5"
"2.6"
)
cuda_versions
=(
"12.4"
)
cuda_versions
=(
"12.4"
)
...
@@ -18,12 +18,10 @@ for python_version in "${python_versions[@]}"; do
...
@@ -18,12 +18,10 @@ for python_version in "${python_versions[@]}"; do
done
done
done
done
bash scripts/build_linux_wheel_torch2.7_cu128.sh
"3.10"
"2.7"
"12.8"
bash scripts/build_linux_wheel.sh
"3.10"
"2.7"
"12.8"
bash scripts/build_linux_wheel_torch2.7_cu128.sh
"3.11"
"2.7"
"12.8"
bash scripts/build_linux_wheel.sh
"3.11"
"2.7"
"12.8"
bash scripts/build_linux_wheel_torch2.7_cu128.sh
"3.12"
"2.7"
"12.8"
bash scripts/build_linux_wheel.sh
"3.12"
"2.7"
"12.8"
bash scripts/build_linux_wheel_torch2.7_cu128.sh
"3.13"
"2.7"
"12.8"
bash scripts/build_linux_wheel_cu128.sh
"3.10"
"2.8"
"12.8"
bash scripts/build_linux_wheel_cu128.sh
"3.10"
"2.8"
"12.8"
bash scripts/build_linux_wheel_cu128.sh
"3.11"
"2.8"
"12.8"
bash scripts/build_linux_wheel_cu128.sh
"3.11"
"2.8"
"12.8"
bash scripts/build_linux_wheel_cu128.sh
"3.12"
"2.8"
"12.8"
bash scripts/build_linux_wheel_cu128.sh
"3.12"
"2.8"
"12.8"
bash scripts/build_linux_wheel_cu128.sh
"3.13"
"2.8"
"12.8"
scripts/build_all_windows_wheels.cmd
View file @
67c543d7
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
setlocal
enabledelayedexpansion
setlocal
enabledelayedexpansion
REM Define Python and Torch versions
REM Define Python and Torch versions
set
"python_versions=3.10 3.11 3.12
3.13
"
set
"python_versions=3.10 3.11 3.12"
set
"torch_versions=2.5 2.6"
set
"torch_versions=2.5 2.6"
set
"cuda_version=12.4"
set
"cuda_version=12.4"
...
@@ -23,12 +23,10 @@ for %%P in (%python_versions%) do (
...
@@ -23,12 +23,10 @@ for %%P in (%python_versions%) do (
call
scripts
\build_windows_wheel_cu128.cmd
3
.10
2
.7
12
.8
call
scripts
\build_windows_wheel_cu128.cmd
3
.10
2
.7
12
.8
call
scripts
\build_windows_wheel_cu128.cmd
3
.11
2
.7
12
.8
call
scripts
\build_windows_wheel_cu128.cmd
3
.11
2
.7
12
.8
call
scripts
\build_windows_wheel_cu128.cmd
3
.12
2
.7
12
.8
call
scripts
\build_windows_wheel_cu128.cmd
3
.12
2
.7
12
.8
call
scripts
\build_windows_wheel_cu128.cmd
3
.13
2
.7
12
.8
call
scripts
\build_windows_wheel_cu128.cmd
3
.10
2
.8
12
.8
REM call scripts\build_windows_wheel_cu128.cmd 3.10 2.8 12.8
call
scripts
\build_windows_wheel_cu128.cmd
3
.11
2
.8
12
.8
REM call scripts\build_windows_wheel_cu128.cmd 3.11 2.8 12.8
call
scripts
\build_windows_wheel_cu128.cmd
3
.12
2
.8
12
.8
REM call scripts\build_windows_wheel_cu128.cmd 3.12 2.8 12.8
call
scripts
\build_windows_wheel_cu128.cmd
3
.13
2
.8
12
.8
echo
All
builds
completed
successfully
!
echo
All
builds
completed
successfully
!
exit
/b
0
exit
/b
0
scripts/build_linux_wheel.sh
View file @
67c543d7
...
@@ -16,8 +16,12 @@ elif [ "$TORCH_VERSION" == "2.6" ]; then
...
@@ -16,8 +16,12 @@ elif [ "$TORCH_VERSION" == "2.6" ]; then
TORCHVISION_VERSION
=
"0.21"
TORCHVISION_VERSION
=
"0.21"
TORCHAUDIO_VERSION
=
"2.6"
TORCHAUDIO_VERSION
=
"2.6"
echo
"TORCH_VERSION is 2.6, setting TORCHVISION_VERSION to
$TORCHVISION_VERSION
and TORCHAUDIO_VERSION to
$TORCHAUDIO_VERSION
"
echo
"TORCH_VERSION is 2.6, setting TORCHVISION_VERSION to
$TORCHVISION_VERSION
and TORCHAUDIO_VERSION to
$TORCHAUDIO_VERSION
"
elif
[
"
$TORCH_VERSION
"
==
"2.7"
]
;
then
TORCHVISION_VERSION
=
"0.22"
TORCHAUDIO_VERSION
=
"2.7"
echo
"TORCH_VERSION is 2.7, setting TORCHVISION_VERSION to
$TORCHVISION_VERSION
and TORCHAUDIO_VERSION to
$TORCHAUDIO_VERSION
"
else
else
echo
"TORCH_VERSION is not 2.5 or 2.
6
, no changes to versions."
echo
"TORCH_VERSION is not 2.5
, 2.6
or 2.
7
, no changes to versions."
fi
fi
docker run
--rm
\
docker run
--rm
\
...
...
scripts/build_linux_wheel_torch2.7_cu128.sh
deleted
100644 → 0
View file @
cef510d5
#!/bin/bash
# Modified from https://github.com/sgl-project/sglang/blob/main/sgl-kernel/build.sh
set
-ex
PYTHON_VERSION
=
$1
TORCH_VERSION
=
$2
# has no use for now
CUDA_VERSION
=
$3
MAX_JOBS
=
${
4
:-}
# optional
PYTHON_ROOT_PATH
=
/opt/python/cp
${
PYTHON_VERSION
//.
}
-cp
${
PYTHON_VERSION
//.
}
# Check if TORCH_VERSION is 2.5 or 2.6 and set the corresponding versions for TORCHVISION and TORCHAUDIO
#if [ "$TORCH_VERSION" == "2.5" ]; then
# TORCHVISION_VERSION="0.20"
# TORCHAUDIO_VERSION="2.5"
# echo "TORCH_VERSION is 2.5, setting TORCHVISION_VERSION to $TORCHVISION_VERSION and TORCHAUDIO_VERSION to $TORCHAUDIO_VERSION"
#elif [ "$TORCH_VERSION" == "2.6" ]; then
# TORCHVISION_VERSION="0.21"
# TORCHAUDIO_VERSION="2.6"
# echo "TORCH_VERSION is 2.6, setting TORCHVISION_VERSION to $TORCHVISION_VERSION and TORCHAUDIO_VERSION to $TORCHAUDIO_VERSION"
#else
# echo "TORCH_VERSION is not 2.5 or 2.6, no changes to versions."
#fi
docker run
--rm
\
-v
"
$(
pwd
)
"
:/nunchaku
\
pytorch/manylinux2_28-builder:cuda
${
CUDA_VERSION
}
\
bash
-c
"
cd /nunchaku &&
\
rm -rf build &&
\
gcc --version && g++ --version &&
\
${
PYTHON_ROOT_PATH
}
/bin/pip install --pre torch==2.7.0.dev20250307+cu128 torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128 &&
\
${
PYTHON_ROOT_PATH
}
/bin/pip install build ninja wheel setuptools &&
\
export NUNCHAKU_INSTALL_MODE=ALL &&
\
export NUNCHAKU_BUILD_WHEELS=1 &&
\
export MAX_JOBS=
${
MAX_JOBS
}
&&
\
${
PYTHON_ROOT_PATH
}
/bin/python -m build --wheel --no-isolation
"
scripts/build_windows_wheel.cmd
View file @
67c543d7
...
@@ -16,8 +16,11 @@ if "%TORCH_VERSION%"=="2.5" (
...
@@ -16,8 +16,11 @@ if "%TORCH_VERSION%"=="2.5" (
)
else
if
"
%TORCH_VERSION%
"
==
"2.6"
(
)
else
if
"
%TORCH_VERSION%
"
==
"2.6"
(
set
TORCHVISION_VERSION
=
0
.21
set
TORCHVISION_VERSION
=
0
.21
set
TORCHAUDIO_VERSION
=
2
.6
set
TORCHAUDIO_VERSION
=
2
.6
)
else
if
"
%TORCH_VERSION%
"
==
"2.7"
(
set
TORCHVISION_VERSION
=
0
.22
set
TORCHAUDIO_VERSION
=
2
.7
)
else
(
)
else
(
echo
TORCH_VERSION
is
not
2
.5
or
2
.
6
,
no
changes
to
versions
.
echo
TORCH_VERSION
is
not
2
.5
,
2
.6
or
2
.
7
,
no
changes
to
versions
.
)
)
echo
setting
TORCHVISION_VERSION
to
%TORCHVISION_VERSION%
and
TORCHAUDIO_VERSION
to
%TORCHAUDIO_VERSION%
echo
setting
TORCHVISION_VERSION
to
%TORCHVISION_VERSION%
and
TORCHAUDIO_VERSION
to
%TORCHAUDIO_VERSION%
...
@@ -44,6 +47,7 @@ if exist build rd /s /q build
...
@@ -44,6 +47,7 @@ if exist build rd /s /q build
:: set up Visual Studio compilation environment
:: set up Visual Studio compilation environment
call
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\VsDevCmd.bat"
-startdir
=
none
-arch
=
x64
-host
_arch
=
x64
call
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\VsDevCmd.bat"
-startdir
=
none
-arch
=
x64
-host
_arch
=
x64
set
DISTUTILS_USE_SDK
=
1
set
DISTUTILS_USE_SDK
=
1
set
MAX_JOBS
=
4
:: build wheels
:: build wheels
python
-m
build
--wheel --no-isolation
python
-m
build
--wheel --no-isolation
...
...
scripts/build_windows_wheel_
cu128
.cmd
→
scripts/build_windows_wheel_
torch_nightly
.cmd
View file @
67c543d7
...
@@ -20,11 +20,7 @@ call conda activate %ENV_NAME%
...
@@ -20,11 +20,7 @@ call conda activate %ENV_NAME%
:: install dependencies
:: install dependencies
call
pip
install
ninja
setuptools
wheel
build
call
pip
install
ninja
setuptools
wheel
build
if
"
%TORCH_VERSION%
"
==
"2.7"
(
call
pip
install
--pre
torch
torchvision
torchaudio
--index-url
https
://download.pytorch.org/whl/nightly/cu128
call
pip
install
--pre
torch
==
2
.7.0.dev20250307
+cu
128
torchvision
torchaudio
--index-url
https
://download.pytorch.org/whl/nightly/cu128
)
else
(
call
pip
install
--pre
torch
torchvision
torchaudio
--index-url
https
://download.pytorch.org/whl/nightly/cu128
)
:: set environment variables
:: set environment variables
set
NUNCHAKU_INSTALL_MODE
=
ALL
set
NUNCHAKU_INSTALL_MODE
=
ALL
...
@@ -37,6 +33,7 @@ if exist build rd /s /q build
...
@@ -37,6 +33,7 @@ if exist build rd /s /q build
:: set up Visual Studio compilation environment
:: set up Visual Studio compilation environment
call
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\VsDevCmd.bat"
-startdir
=
none
-arch
=
x64
-host
_arch
=
x64
call
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\VsDevCmd.bat"
-startdir
=
none
-arch
=
x64
-host
_arch
=
x64
set
DISTUTILS_USE_SDK
=
1
set
DISTUTILS_USE_SDK
=
1
set
MAX_JOBS
=
4
:: build wheels
:: build wheels
python
-m
build
--wheel --no-isolation
python
-m
build
--wheel --no-isolation
...
...
setup.py
View file @
67c543d7
...
@@ -2,6 +2,7 @@ import os
...
@@ -2,6 +2,7 @@ import os
import
re
import
re
import
subprocess
import
subprocess
import
sys
import
sys
from
datetime
import
date
import
setuptools
import
setuptools
import
torch
import
torch
...
@@ -64,6 +65,8 @@ if __name__ == "__main__":
...
@@ -64,6 +65,8 @@ if __name__ == "__main__":
torch_version
=
torch
.
__version__
.
split
(
"+"
)[
0
]
torch_version
=
torch
.
__version__
.
split
(
"+"
)[
0
]
torch_major_minor_version
=
"."
.
join
(
torch_version
.
split
(
"."
)[:
2
])
torch_major_minor_version
=
"."
.
join
(
torch_version
.
split
(
"."
)[:
2
])
if
"dev"
in
version
:
version
=
version
+
date
.
today
().
strftime
(
"%Y%m%d"
)
# data
version
=
version
+
"+torch"
+
torch_major_minor_version
version
=
version
+
"+torch"
+
torch_major_minor_version
ROOT_DIR
=
os
.
path
.
dirname
(
__file__
)
ROOT_DIR
=
os
.
path
.
dirname
(
__file__
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment