Skip to content

Commit

Permalink
add new prebuilts for 3.13 and cu126
Browse files Browse the repository at this point in the history
  • Loading branch information
FindDefinition committed Dec 9, 2024
1 parent 125a194 commit f0ffe61
Show file tree
Hide file tree
Showing 33 changed files with 71 additions and 120 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
runs-on: windows-2019
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
cuda-version: ['10.2', '11.3', '11.4', '11.6', '11.7', '11.8', '12.0']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
cuda-version: ['11.4', '11.8', '12.1', '12.4', '12.6']
steps:
- uses: actions/checkout@master
- uses: dorny/paths-filter@v2
Expand All @@ -41,7 +41,7 @@ jobs:
(github.event_name == 'push' && (startsWith(github.ref, 'refs/tags')) ) ||
(
(steps.changes.outputs.needbuild == 'true') &&
(env.PYTHON_VERSION == '3.10')
(env.PYTHON_VERSION == '3.12')
)
)
shell: powershell
Expand All @@ -60,7 +60,7 @@ jobs:
(github.event_name == 'push' && (startsWith(github.ref, 'refs/tags')) ) ||
(
(steps.changes.outputs.needbuild == 'true') &&
(env.PYTHON_VERSION == '3.10')
(env.PYTHON_VERSION == '3.12')
)
)
shell: powershell
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
(github.event_name == 'push' && (startsWith(github.ref, 'refs/tags')) ) ||
(
(steps.changes.outputs.needbuild == 'true') &&
(env.PYTHON_VERSION == '3.10')
(env.PYTHON_VERSION == '3.12')
)
)
run: |
Expand All @@ -115,8 +115,8 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] # this version is only used for upload.
cuda-version: ['102', '113', '114', '116', '117', '118', '120', '']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] # this version is only used for upload.
cuda-version: ['114', '118', '121', '124', '126', '']

steps:
- uses: actions/checkout@master
Expand Down Expand Up @@ -160,7 +160,7 @@ jobs:
(github.event_name == 'push' && (startsWith(github.ref, 'refs/tags')) ) ||
(
(steps.changes.outputs.needbuild == 'true') &&
(env.PYTHON_VERSION == '3.10')
(env.PYTHON_VERSION == '3.12')
)
)
run: |
Expand All @@ -174,15 +174,15 @@ jobs:
env:
CUDA_VERSION: ${{ matrix.cuda-version }}
PYTHON_VERSION: ${{ matrix.python-version }}
DOCKER_IMAGE: scrin/manylinux2014-cuda:cu120-devel-1.0.0
DOCKER_IMAGE: scrin/manylinux2014-cuda:cu126-devel-1.0.0
PLAT: manylinux2014_x86_64
BOOST_VERSION: boost_1_77_0
if: |
(env.CUDA_VERSION == '') && (
(github.event_name == 'push' && (startsWith(github.ref, 'refs/tags')) ) ||
(
(steps.changes.outputs.needbuild == 'true') &&
(env.PYTHON_VERSION == '3.10')
(env.PYTHON_VERSION == '3.12')
)
)
run: |
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/stale.yaml

This file was deleted.

4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Changelog
## [2.3.7] - 2024-12-08
### Changed
- add python 3.13 and cuda 12.1/12.4/12.6 prebuilts, drop python 3.7/3.8 prebuilts, change manylinux glibc from 2_17 to 2_28 if cuda >= 12.4, which requires recent OS such as ubuntu 18.10+.

## [2.3.6] - 2023-04-19
### Fixed
- Fix a CI bug that cpu cumm and spconv use different gcc compiler, must be same.
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=41.0", "wheel", "pccm>=0.4.0", "cumm>=0.4.8"]
requires = ["setuptools>=41.0", "wheel", "pccm>=0.4.16", "cumm>=0.7.5"]
# requires = ["setuptools>=41.0", "wheel", "pccm>=0.4.0", "cumm @ file:///io/dist/cumm_cu120-0.4.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"]
# requires = ["setuptools>=41.0", "wheel", "pccm>=0.4.0", "cumm @ file:///io/dist/cumm_cu117-0.4.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"]
# requires = ["setuptools>=41.0", "wheel", "pccm>=0.4.0", "cumm-cu126 @ file:///io/dist/cumm_cu126-0.7.3-cp313-cp313-manylinux_2_28_x86_64.whl"]
build-backend = "setuptools.build_meta"
12 changes: 6 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,21 @@
cuda_ver_str = cuda_ver.replace(".", "") # 10.2 to 102

RELEASE_NAME += "-cu{}".format(cuda_ver_str)
deps = ["cumm-cu{}>=0.4.5, <0.5.0".format(cuda_ver_str)]
deps = ["cumm-cu{}>=0.7.5, <0.8.0".format(cuda_ver_str)]
else:
deps = ["cumm>=0.4.5, <0.5.0"]
deps = ["cumm>=0.7.5, <0.8.0"]



DESCRIPTION = 'spatial sparse convolution'
URL = 'https://github.com/traveller59/spconv'
EMAIL = 'yanyan.sub@outlook.com'
AUTHOR = 'Yan Yan'
REQUIRES_PYTHON = '>=3.7'
REQUIRES_PYTHON = '>=3.9'
VERSION = None

# What packages are required for this module to be executed?
REQUIRED = ["pccm>=0.4.0", "ccimport>=0.4.0", "pybind11>=2.6.0", "fire", "numpy", *deps]
REQUIRED = ["pccm>=0.4.16", "ccimport>=0.4.4", "pybind11>=2.6.0", "fire", "numpy", *deps]

# What packages are optional?
EXTRAS = {
Expand Down Expand Up @@ -249,11 +249,11 @@ def run(self):
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: Implementation :: CPython',
],
# $ setup.py publish support.
Expand Down
2 changes: 1 addition & 1 deletion spconv/core_cc/csrc/hash/core.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import overload, Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union
from pccm.stubs import EnumValue, EnumClassValue
from pccm.stubs import EnumValue, EnumClassValue, enum
from cumm.tensorview import Tensor
class HashTable:
key_itemsize: int
Expand Down
2 changes: 1 addition & 1 deletion spconv/core_cc/csrc/sparse/all/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import overload, Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union
from pccm.stubs import EnumValue, EnumClassValue
from pccm.stubs import EnumValue, EnumClassValue, enum
from cumm.tensorview import Tensor
from cumm.tensorview import CUDAKernelTimer
class ThrustCustomAllocatorV2:
Expand Down
2 changes: 1 addition & 1 deletion spconv/core_cc/csrc/sparse/all/ops1d.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import overload, Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union
from pccm.stubs import EnumValue, EnumClassValue
from pccm.stubs import EnumValue, EnumClassValue, enum
from cumm.tensorview import Tensor
class Point2Voxel:
hashdata: Tensor
Expand Down
2 changes: 1 addition & 1 deletion spconv/core_cc/csrc/sparse/all/ops2d.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import overload, Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union
from pccm.stubs import EnumValue, EnumClassValue
from pccm.stubs import EnumValue, EnumClassValue, enum
from cumm.tensorview import Tensor
class Point2Voxel:
hashdata: Tensor
Expand Down
2 changes: 1 addition & 1 deletion spconv/core_cc/csrc/sparse/all/ops3d.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import overload, Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union
from pccm.stubs import EnumValue, EnumClassValue
from pccm.stubs import EnumValue, EnumClassValue, enum
from cumm.tensorview import Tensor
class Point2Voxel:
hashdata: Tensor
Expand Down
2 changes: 1 addition & 1 deletion spconv/core_cc/csrc/sparse/all/ops4d.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import overload, Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union
from pccm.stubs import EnumValue, EnumClassValue
from pccm.stubs import EnumValue, EnumClassValue, enum
from cumm.tensorview import Tensor
class Point2Voxel:
hashdata: Tensor
Expand Down
2 changes: 1 addition & 1 deletion spconv/core_cc/csrc/sparse/all/ops_cpu1d.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import overload, Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union
from pccm.stubs import EnumValue, EnumClassValue
from pccm.stubs import EnumValue, EnumClassValue, enum
from cumm.tensorview import Tensor
class Point2VoxelCPU:
densehashdata: Tensor
Expand Down
2 changes: 1 addition & 1 deletion spconv/core_cc/csrc/sparse/all/ops_cpu2d.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import overload, Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union
from pccm.stubs import EnumValue, EnumClassValue
from pccm.stubs import EnumValue, EnumClassValue, enum
from cumm.tensorview import Tensor
class Point2VoxelCPU:
densehashdata: Tensor
Expand Down
2 changes: 1 addition & 1 deletion spconv/core_cc/csrc/sparse/all/ops_cpu3d.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import overload, Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union
from pccm.stubs import EnumValue, EnumClassValue
from pccm.stubs import EnumValue, EnumClassValue, enum
from cumm.tensorview import Tensor
class Point2VoxelCPU:
densehashdata: Tensor
Expand Down
2 changes: 1 addition & 1 deletion spconv/core_cc/csrc/sparse/all/ops_cpu4d.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import overload, Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union
from pccm.stubs import EnumValue, EnumClassValue
from pccm.stubs import EnumValue, EnumClassValue, enum
from cumm.tensorview import Tensor
class Point2VoxelCPU:
densehashdata: Tensor
Expand Down
2 changes: 1 addition & 1 deletion spconv/core_cc/csrc/sparse/alloc.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import overload, Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union
from pccm.stubs import EnumValue, EnumClassValue
from pccm.stubs import EnumValue, EnumClassValue, enum
from cumm.tensorview import Tensor
class ExternalAllocator:
def zeros(self, name: str, shape: List[int], dtype: int, device: int, stream: int = 0, is_temp_memory: bool = False, scale: float = 1.0) -> Tensor:
Expand Down
2 changes: 1 addition & 1 deletion spconv/core_cc/csrc/sparse/convops/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import overload, Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union
from pccm.stubs import EnumValue, EnumClassValue
from pccm.stubs import EnumValue, EnumClassValue, enum
from cumm.tensorview.gemm import GemmAlgoDesp
from cumm.tensorview.gemm import ConvAlgoDesp
from cumm.tensorview import Tensor
Expand Down
2 changes: 1 addition & 1 deletion spconv/core_cc/csrc/sparse/convops/convops.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import overload, Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union
from pccm.stubs import EnumValue, EnumClassValue
from pccm.stubs import EnumValue, EnumClassValue, enum
from cumm.tensorview.gemm import ConvAlgoDesp
from cumm.tensorview import Tensor
from cumm.tensorview.gemm import NVRTCParams
Expand Down
2 changes: 1 addition & 1 deletion spconv/core_cc/csrc/sparse/convops/gemmops.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import overload, Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union
from pccm.stubs import EnumValue, EnumClassValue
from pccm.stubs import EnumValue, EnumClassValue, enum
from cumm.tensorview.gemm import GemmAlgoDesp
from cumm.tensorview import Tensor
from cumm.tensorview.gemm import NVRTCParams
Expand Down
2 changes: 1 addition & 1 deletion spconv/core_cc/csrc/sparse/convops/spops.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import overload, Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union
from pccm.stubs import EnumValue, EnumClassValue
from pccm.stubs import EnumValue, EnumClassValue, enum
from cumm.tensorview import Tensor
from cumm.tensorview.gemm import Activation
from cumm.tensorview import CUDAKernelTimer
Expand Down
2 changes: 1 addition & 1 deletion spconv/core_cc/csrc/sparse/inference.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import overload, Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union
from pccm.stubs import EnumValue, EnumClassValue
from pccm.stubs import EnumValue, EnumClassValue, enum
from cumm.tensorview import Tensor
from cumm.tensorview.gemm import Activation
class InferenceOps:
Expand Down
2 changes: 1 addition & 1 deletion spconv/core_cc/csrc/utils/boxops.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import overload, Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union
from pccm.stubs import EnumValue, EnumClassValue
from pccm.stubs import EnumValue, EnumClassValue, enum
from cumm.tensorview import Tensor
class BoxOps:
@staticmethod
Expand Down
8 changes: 4 additions & 4 deletions spconv/core_cc/csrc/utils/pcc.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import overload, Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union
from pccm.stubs import EnumValue, EnumClassValue
from pccm.stubs import EnumValue, EnumClassValue, enum
from cumm.tensorview import Tensor
class PointCloudCompress:
@staticmethod
Expand Down Expand Up @@ -43,8 +43,8 @@ class PointCloudCompress:
data:
"""
...
class EncodeType:
XYZ_8 = EnumClassValue(0) # type: EnumClassValue
XYZI_8 = EnumClassValue(1) # type: EnumClassValue
class EncodeType(enum.Enum):
XYZ_8 = 0
XYZI_8 = 1
@staticmethod
def __members__() -> Dict[str, EnumClassValue]: ...
2 changes: 1 addition & 1 deletion spconv/core_cc/cumm/common.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import overload, Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union
from pccm.stubs import EnumValue, EnumClassValue
from pccm.stubs import EnumValue, EnumClassValue, enum
class CompileInfo:
@staticmethod
def get_compiled_cuda_version() -> Tuple[int, int]: ...
Expand Down
2 changes: 1 addition & 1 deletion spconv/core_cc/cumm/conv/main.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import overload, Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union
from pccm.stubs import EnumValue, EnumClassValue
from pccm.stubs import EnumValue, EnumClassValue, enum
from cumm.tensorview.gemm import ConvParams
class ConvMainUnitTest:
@staticmethod
Expand Down
2 changes: 1 addition & 1 deletion spconv/core_cc/cumm/gemm/main.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import overload, Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union
from pccm.stubs import EnumValue, EnumClassValue
from pccm.stubs import EnumValue, EnumClassValue, enum
from cumm.tensorview.gemm import GemmAlgoDesp
from cumm.tensorview.gemm import GemmParams
class GemmMainUnitTest:
Expand Down
3 changes: 2 additions & 1 deletion spconv/csrc/utils/pcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def encode_with_order(self):
enc[3] = uint8_t(inten);
}}
auto pos_uint = pos_int + hash_t::direct_hash_offset();
uint64_t scalar = hash_t::encode(pos_int[0], pos_int[1], pos_int[2]);
uint64_t scalar = hash_t::encode(pos_uint[0], pos_uint[1], pos_uint[2]);
auto iter = hash.find(scalar);
if (iter == hash.end()){{
auto pos_offset = pos_int.cast<float>() * vsize;
Expand All @@ -116,6 +116,7 @@ def encode_with_order(self):
}}
}}
points_data += point_stride;
intensity_data += inten_stride;
}}
res = tv::empty({{final_size}}, tv::uint8, -1);
Expand Down
6 changes: 5 additions & 1 deletion spconv/pytorch/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@
def identity_decorator(func: _T) -> _T:
return func

if PYTORCH_VERSION >= [2, 5, 0]:
import torch.amp as amp
_TORCH_CUSTOM_FWD = amp.custom_fwd(cast_inputs=torch.float16, device_type="cuda")
_TORCH_CUSTOM_BWD = amp.custom_bwd(device_type="cuda")

if PYTORCH_VERSION >= [1, 6, 0]:
elif PYTORCH_VERSION >= [1, 6, 0]:
import torch.cuda.amp as amp
_TORCH_CUSTOM_FWD = amp.custom_fwd(cast_inputs=torch.float16)
_TORCH_CUSTOM_BWD = amp.custom_bwd
Expand Down
14 changes: 3 additions & 11 deletions tools/build-wheels-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,16 @@ function repair_wheel {
gcc -v
export SPCONV_DISABLE_JIT="1"
export CUMM_CUDA_ARCH_LIST="8.6"
# export SPCONV_PYTHON_LIST="3.7;3.8;3.9;3.10"
export SPCONV_PYTHON_LIST="3.13"
# Compile wheels, we only support 3.6-3.10.
# "/opt/python/cp36-cp36m/bin/pip" wheel /io/ --no-deps -w /io/wheelhouse_tmp

for PYVER in ${SPCONV_PYTHON_LIST//;/ }
do
PYVER2=`echo "$PYVER" | sed 's/\.//'`
PYVER_CP="cp$PYVER2-cp$PYVER2"
if [ "$PYVER2" = "36" ]; then
PYVER_CP="cp$PYVER2-cp${PYVER2}m"
fi
if [ "$PYVER2" = "37" ]; then
PYVER_CP="cp$PYVER2-cp${PYVER2}m"
fi
if [[ $PYVER2 == *"311"* ]]; then
PYVER_CP="cp311-cp311"
fi
PYVER_T=`echo "$PYVER2" | sed 's/t//'`

PYVER_CP="cp$PYVER_T-cp$PYVER2"
"/opt/python/$PYVER_CP/bin/pip" wheel /io/ -v --no-deps -w /io/wheelhouse_tmp
done

Expand Down
Loading

0 comments on commit f0ffe61

Please sign in to comment.