Commit a7d0e61f authored by Yan Yan's avatar Yan Yan
Browse files

v2.1.4: fix #370 fix a bug in SparseInverseConv

parent f31eee3a
# Changelog
## [2.1.4] - 2021-11-10
### Fixed
- Fix a bug of SparseInverseConv3d
## [2.1.3] - 2021-11-08
### Fixed
- Fix a bug of CPU only package
## [2.1.2] - 2021-11-06
### Fixed
- Fix a bug of python 3.7
## [2.1.0] - 2021-10-31
### Addad
* add implicit gemm algorithm for all kind of convolution with kernel volume <= 32. this algorithm is very fast with float16.
* add pytorch wrapper for voxel generator
* add CPU support and CPU-only build.
### Added
- add implicit gemm algorithm for all kind of convolution with kernel volume <= 32. this algorithm is very fast with float16.
- add pytorch wrapper for voxel generator
- add CPU support and CPU-only build.
## [2.0.2] - 2021-10-26
### Fixed
......
......@@ -26,6 +26,8 @@
[Spconv 1.x code](https://github.com/traveller59/spconv/tree/v1.2.1). We won't provide any support for spconv 1.x since it's deprecated. use spconv 2.x if possible. <!--remove this message in spconv 2.2-->
**WARNING** spconv < 2.1.4 users need to upgrade your version to 2.1.4, it fix a serious bug in SparseInverseConvXd.
## Breaking changes in Spconv 2.x
Spconv 1.x users **NEED READ [THIS](docs/SPCONV_2_BREAKING_CHANGEs.md)** before using spconv 2.x.
......
......@@ -266,7 +266,7 @@ class SparseConvolution(SparseModule):
outids = datas.indices
indice_pairs = datas.indice_pairs
indice_pair_num = datas.indice_pair_num
out_spatial_shape = datas.out_spatial_shape
out_spatial_shape = datas.spatial_shape
assert indice_pair_num.shape[0] == np.prod(
self.kernel_size
), "inverse conv must have same kernel size as its couple conv"
......@@ -295,6 +295,7 @@ class SparseConvolution(SparseModule):
indice_pairs,
indice_pair_num,
spatial_shape,
out_spatial_shape,
is_subm=self.subm,
algo=algo)
if self.indice_key is not None:
......@@ -338,7 +339,7 @@ class SparseConvolution(SparseModule):
mask_argsort_fwd_splits = datas.mask_argsort_bwd_splits
mask_argsort_bwd_splits = datas.mask_argsort_fwd_splits
masks = datas.masks
out_spatial_shape = datas.spatial_shape
else:
if self.indice_key is not None and datas is not None:
outids = datas.out_indices
......@@ -385,6 +386,7 @@ class SparseConvolution(SparseModule):
mask_argsort_bwd_splits=mask_argsort_bwd_splits,
masks=masks,
is_subm=self.subm,
spatial_shape=spatial_shape,
out_spatial_shape=out_spatial_shape,
algo=algo)
msg = f"your indice key {self.indice_key} already exists in this sparse tensor."
......
......@@ -40,11 +40,12 @@ else:
class IndiceData(object):
def __init__(self, out_indices, indices, indice_pairs, indice_pair_num,
out_spatial_shape, is_subm: bool, algo: ConvAlgo):
spatial_shape, out_spatial_shape, is_subm: bool, algo: ConvAlgo):
self.out_indices = out_indices
self.indices = indices
self.indice_pairs = indice_pairs
self.indice_pair_num = indice_pair_num
self.spatial_shape = spatial_shape
self.out_spatial_shape = out_spatial_shape
self.is_subm = is_subm
self.algo = algo
......@@ -57,7 +58,8 @@ class ImplicitGemmIndiceData(object):
pair_mask_bwd_splits: List[torch.Tensor],
mask_argsort_fwd_splits: List[torch.Tensor],
mask_argsort_bwd_splits: List[torch.Tensor],
masks: List[np.ndarray], out_spatial_shape, is_subm: bool, algo: ConvAlgo):
masks: List[np.ndarray], spatial_shape,
out_spatial_shape, is_subm: bool, algo: ConvAlgo):
self.out_indices = out_indices
self.indices = indices
self.pair_fwd = pair_fwd
......@@ -67,6 +69,7 @@ class ImplicitGemmIndiceData(object):
self.mask_argsort_fwd_splits = mask_argsort_fwd_splits
self.mask_argsort_bwd_splits = mask_argsort_bwd_splits
self.masks = masks
self.spatial_shape = spatial_shape
self.out_spatial_shape = out_spatial_shape
self.is_subm = is_subm
self.algo = algo
......
......@@ -148,6 +148,7 @@ class SparseMaxPool(SparseModule):
indice_pairs,
indice_pairs_num,
spatial_shape,
out_spatial_shape,
is_subm=False,
algo=self.algo)
indice_dict[self.indice_key] = indice_data
......@@ -192,6 +193,7 @@ class SparseMaxPool(SparseModule):
mask_argsort_bwd_splits=mask_argsort_bwd_splits,
masks=masks,
is_subm=self.subm,
spatial_shape=spatial_shape,
out_spatial_shape=out_spatial_shape,
algo=self.algo)
msg = f"your indice key {self.indice_key} already exists in this sparse tensor."
......
2.1.3
\ No newline at end of file
2.1.4
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment