Skip to content
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

upgrade libtorch to 2.6.0 and cutlass to 3.8.0 #398

Merged
merged 4 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,9 @@ jobs:
build_wheel:
strategy:
matrix:
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python: ["3.9", "3.10", "3.11", "3.12"]
cuda: ["11.8", "12.1", "12.4"]
torch: ["2.4.1", "2.5.1"]
exclude: # torch 2.5.1 dropped support for python 3.8
- python: "3.8"
torch: "2.5.1"
torch: ["2.4.1", "2.5.1", "2.6.0"]
runs-on: [self-hosted, linux, release]
env:
PYTHON_VERSION: ${{ matrix.python }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/package_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
matrix:
python: ["3.12"]
cuda: ["12.4"]
torch: ["2.5.1"]
torch: ["2.6.0"]
runs-on: [self-hosted, linux, build]
env:
PYTHON_VERSION: ${{ matrix.python }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
matrix:
python: ["3.9", "3.10", "3.11", "3.12"]
cuda: ["12.4"]
torch: ["2.5.1"]
torch: ["2.6.0"]
runs-on: [self-hosted, linux, release]
env:
PYTHON_VERSION: ${{ matrix.python }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
matrix:
python: ["3.9", "3.10", "3.11", "3.12"]
cuda: ["12.4"]
torch: ["2.5.1"]
torch: ["2.6.0"]
runs-on: [self-hosted, linux, release]
env:
PYTHON_VERSION: ${{ matrix.python }}
Expand Down
20 changes: 10 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -196,25 +196,25 @@ if (DEFINED ENV{LIBTORCH_ROOT})
else()
include(FetchContent)
if (CUDAToolkit_VERSION VERSION_GREATER_EQUAL 12.4)
# download libtorch 2.5.1 with cuda 12.4 from pytorch.org
# download libtorch 2.6.0 with cuda 12.4 from pytorch.org
if (USE_CXX11_ABI)
set(LIBTORCH_URL "https://download.pytorch.org/libtorch/cu124/libtorch-cxx11-abi-shared-with-deps-2.5.1%2Bcu124.zip")
set(LIBTORCH_URL "https://download.pytorch.org/libtorch/cu124/libtorch-cxx11-abi-shared-with-deps-2.6.0%2Bcu124.zip")
else()
set(LIBTORCH_URL "https://download.pytorch.org/libtorch/cu124/libtorch-shared-with-deps-2.5.1%2Bcu124.zip")
set(LIBTORCH_URL "https://download.pytorch.org/libtorch/cu124/libtorch-shared-with-deps-2.6.0%2Bcu124.zip")
endif()
elseif(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 12.1)
# download libtorch 2.5.1 with cuda 12.1 from pytorch.org
# download libtorch 2.6.0 with cuda 12.1 from pytorch.org
if (USE_CXX11_ABI)
set(LIBTORCH_URL "https://download.pytorch.org/libtorch/cu121/libtorch-cxx11-abi-shared-with-deps-2.5.1%2Bcu121.zip")
set(LIBTORCH_URL "https://download.pytorch.org/libtorch/cu121/libtorch-cxx11-abi-shared-with-deps-2.6.0%2Bcu121.zip")
else()
set(LIBTORCH_URL "https://download.pytorch.org/libtorch/cu121/libtorch-shared-with-deps-2.5.1%2Bcu121.zip")
set(LIBTORCH_URL "https://download.pytorch.org/libtorch/cu121/libtorch-shared-with-deps-2.6.0%2Bcu121.zip")
endif()
elseif(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 11.8)
# download libtorch 2.5.1 with cuda 11.8 from pytorch.org
# download libtorch 2.6.0 with cuda 11.8 from pytorch.org
if (USE_CXX11_ABI)
set(LIBTORCH_URL "https://download.pytorch.org/libtorch/cu118/libtorch-cxx11-abi-shared-with-deps-2.5.1%2Bcu118.zip")
set(LIBTORCH_URL "https://download.pytorch.org/libtorch/cu118/libtorch-cxx11-abi-shared-with-deps-2.6.0%2Bcu118.zip")
else()
set(LIBTORCH_URL "https://download.pytorch.org/libtorch/cu118/libtorch-shared-with-deps-2.5.1%2Bcu118.zip")
set(LIBTORCH_URL "https://download.pytorch.org/libtorch/cu118/libtorch-shared-with-deps-2.6.0%2Bcu118.zip")
endif()
else()
# error out if cuda version is not supported
Expand All @@ -234,7 +234,7 @@ else()
FetchContent_MakeAvailable(libtorch)

find_package(Torch REQUIRED PATHS ${libtorch_SOURCE_DIR} NO_DEFAULT_PATH)
message(STATUS "Downloading and using libtorch 2.5.1 for cuda ${CUDA_VERSION} at ${libtorch_SOURCE_DIR}")
message(STATUS "Downloading and using libtorch 2.6.0 for cuda ${CUDA_VERSION} at ${libtorch_SOURCE_DIR}")
endif()

# check if USE_CXX11_ABI is set correctly
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ ScaleLLM is currently undergoing active development. We are fully committed to c

ScaleLLM is available as a Python Wheel package on PyPI. You can install it using pip:
```bash
# Install scalellm with CUDA 12.4 and Pytorch 2.5.1
# Install scalellm with CUDA 12.4 and Pytorch 2.6.0
pip install -U scalellm
```

Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ScaleLLM is available as a Python Wheel package on `PyPI <https://pypi.org/proje

.. code-block:: bash

# Install ScaleLLM with CUDA 12.4 and Pytorch 2.5.1
# Install ScaleLLM with CUDA 12.4 and Pytorch 2.6.0
$ pip install -U scalellm


Expand Down
18 changes: 18 additions & 0 deletions docs/source/quick_start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ If you want to install ScaleLLM with different versions of CUDA and PyTorch, you

.. tabs::

.. tab:: PyTorch 2.6.0

.. code-block:: bash

$ pip install -U scalellm -i https://whl.vectorch.com/cu124/torch2.6.0/

.. tab:: PyTorch 2.5.1

.. code-block:: bash
Expand All @@ -41,6 +47,12 @@ If you want to install ScaleLLM with different versions of CUDA and PyTorch, you

.. tabs::

.. tab:: PyTorch 2.6.0

.. code-block:: bash

$ pip install -U scalellm -i https://whl.vectorch.com/cu121/torch2.6.0/

.. tab:: PyTorch 2.5.1

.. code-block:: bash
Expand All @@ -57,6 +69,12 @@ If you want to install ScaleLLM with different versions of CUDA and PyTorch, you

.. tabs::

.. tab:: PyTorch 2.6.0

.. code-block:: bash

$ pip install -U scalellm -i https://whl.vectorch.com/cu118/torch2.6.0/

.. tab:: PyTorch 2.5.1

.. code-block:: bash
Expand Down
7 changes: 6 additions & 1 deletion scalellm/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ def convert_pickle_to_safetensors(path):
continue

# load the model
model = torch.load(file_path, map_location="cpu")
try:
model = torch.load(file_path, map_location="cpu")
except Exception as e:
print(f"Error loading {filename}: {e}")
continue

if hasattr(model, "state_dict"):
state_dict = model.state_dict()
else:
Expand Down
2 changes: 1 addition & 1 deletion third_party/cutlass
Submodule cutlass updated 303 files