Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
one
spconv
Commits
f83bba37
Commit
f83bba37
authored
Oct 20, 2021
by
yan.yan
Browse files
f**k msvc
parent
d5c4843d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
2 deletions
+17
-2
pyproject.toml
pyproject.toml
+1
-1
setup.py
setup.py
+6
-0
spconv/csrc/sparse/all.py
spconv/csrc/sparse/all.py
+10
-1
No files found.
pyproject.toml
View file @
f83bba37
[build-system]
[build-system]
requires
=
[
"setuptools>=41.0"
,
"wheel"
,
"pccm>=0.2.1
0
"
,
"cumm>=0.1.6"
]
requires
=
[
"setuptools>=41.0"
,
"wheel"
,
"pccm>=0.2.1
1
"
,
"cumm>=0.1.6"
]
build-backend
=
"setuptools.build_meta"
build-backend
=
"setuptools.build_meta"
setup.py
View file @
f83bba37
...
@@ -16,6 +16,7 @@ import pccm
...
@@ -16,6 +16,7 @@ import pccm
from
pccm.extension
import
ExtCallback
,
PCCMBuild
,
PCCMExtension
from
pccm.extension
import
ExtCallback
,
PCCMBuild
,
PCCMExtension
from
setuptools
import
Command
,
find_packages
,
setup
from
setuptools
import
Command
,
find_packages
,
setup
from
setuptools.extension
import
Extension
from
setuptools.extension
import
Extension
from
ccimport
import
compat
# Package meta-data.
# Package meta-data.
NAME
=
'spconv'
NAME
=
'spconv'
...
@@ -137,11 +138,16 @@ if disable_jit is not None and disable_jit == "1":
...
@@ -137,11 +138,16 @@ if disable_jit is not None and disable_jit == "1":
cu
=
GemmMainUnitTest
(
SHUFFLE_SIMT_PARAMS
+
SHUFFLE_VOLTA_PARAMS
+
SHUFFLE_TURING_PARAMS
)
cu
=
GemmMainUnitTest
(
SHUFFLE_SIMT_PARAMS
+
SHUFFLE_VOLTA_PARAMS
+
SHUFFLE_TURING_PARAMS
)
cu
.
namespace
=
"cumm.gemm.main"
cu
.
namespace
=
"cumm.gemm.main"
if
compat
.
InWindows
:
std
=
None
else
:
std
=
"-std=c++14"
ext_modules
:
List
[
Extension
]
=
[
ext_modules
:
List
[
Extension
]
=
[
PCCMExtension
([
cu
,
SpconvOps
()],
PCCMExtension
([
cu
,
SpconvOps
()],
"spconv/core_cc"
,
"spconv/core_cc"
,
Path
(
__file__
).
resolve
().
parent
/
"spconv"
,
Path
(
__file__
).
resolve
().
parent
/
"spconv"
,
objects_folder
=
"objects"
,
objects_folder
=
"objects"
,
std
=
std
,
disable_pch
=
True
)
disable_pch
=
True
)
]
]
else
:
else
:
...
...
spconv/csrc/sparse/all.py
View file @
f83bba37
...
@@ -17,7 +17,7 @@ from cumm.conv.bases import ConvOpType, NHWC
...
@@ -17,7 +17,7 @@ from cumm.conv.bases import ConvOpType, NHWC
from
cumm.conv.params
import
ConvProblem
from
cumm.conv.params
import
ConvProblem
from
cumm
import
dtypes
from
cumm
import
dtypes
import
pccm
import
pccm
from
ccimport
import
compat
from
.pointops
import
Point2Voxel
,
Point2VoxelCPU
from
.pointops
import
Point2Voxel
,
Point2VoxelCPU
from
.indices
import
SparseConvIndicesKernel
,
CudaCommonKernel
from
.indices
import
SparseConvIndicesKernel
,
CudaCommonKernel
from
.maxpool
import
IndiceMaxPool
from
.maxpool
import
IndiceMaxPool
...
@@ -26,6 +26,15 @@ class SpconvOps(pccm.Class):
...
@@ -26,6 +26,15 @@ class SpconvOps(pccm.Class):
def
__init__
(
self
):
def
__init__
(
self
):
super
().
__init__
()
super
().
__init__
()
self
.
ndims
=
[
1
,
2
,
3
,
4
]
self
.
ndims
=
[
1
,
2
,
3
,
4
]
if
compat
.
InWindows
:
if
"cl"
not
in
self
.
build_meta
.
compiler_to_cflags
:
self
.
build_meta
.
compiler_to_cflags
[
"cl"
]
=
[]
self
.
build_meta
.
compiler_to_cflags
[
"cl"
].
extend
(
"-Xcompiler=
\"
/std:c++17
\"
"
)
if
"nvcc"
not
in
self
.
build_meta
.
compiler_to_cflags
:
self
.
build_meta
.
compiler_to_cflags
[
"nvcc"
]
=
[]
self
.
build_meta
.
compiler_to_cflags
[
"nvcc"
].
extend
(
"-std=c++14"
)
for
ndim
in
self
.
ndims
:
for
ndim
in
self
.
ndims
:
p2v
=
Point2Voxel
(
dtypes
.
float32
,
ndim
)
p2v
=
Point2Voxel
(
dtypes
.
float32
,
ndim
)
p2v_cpu
=
Point2VoxelCPU
(
dtypes
.
float32
,
ndim
)
p2v_cpu
=
Point2VoxelCPU
(
dtypes
.
float32
,
ndim
)
...
...
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