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
c8df384c
Commit
c8df384c
authored
Nov 28, 2021
by
yan.yan
Browse files
fix a small build bug
parent
027b9655
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
spconv/csrc/hash/core.py
spconv/csrc/hash/core.py
+12
-6
No files found.
spconv/csrc/hash/core.py
View file @
c8df384c
...
@@ -21,6 +21,12 @@ from cumm.common import (TensorView, TensorViewCPU, TensorViewHashKernel,
...
@@ -21,6 +21,12 @@ from cumm.common import (TensorView, TensorViewCPU, TensorViewHashKernel,
TensorViewKernel
,
TslRobinMap
)
TensorViewKernel
,
TslRobinMap
)
from
spconv.csrc.sparse.cpu_core
import
OMPLib
from
spconv.csrc.sparse.cpu_core
import
OMPLib
if
CUMM_CPU_ONLY_BUILD
:
_member_func
=
pccm
.
member_function
else
:
_member_func
=
pccm
.
cuda
.
member_function
class
HashTable
(
pccm
.
Class
,
pccm
.
pybind
.
PybindClassMixin
):
class
HashTable
(
pccm
.
Class
,
pccm
.
pybind
.
PybindClassMixin
):
"""a simple hashtable for both cpu and cuda.
"""a simple hashtable for both cpu and cuda.
CPU implementation don't support parallel.
CPU implementation don't support parallel.
...
@@ -79,7 +85,7 @@ class HashTable(pccm.Class, pccm.pybind.PybindClassMixin):
...
@@ -79,7 +85,7 @@ class HashTable(pccm.Class, pccm.pybind.PybindClassMixin):
return
code
return
code
@
pccm
.
pybind
.
mark
@
pccm
.
pybind
.
mark
@
pccm
.
cuda
.
member_func
tion
@
_
member_func
def
clear
(
self
):
def
clear
(
self
):
""" in this function, if values is empty, it will be assigned to zero.
""" in this function, if values is empty, it will be assigned to zero.
"""
"""
...
@@ -123,7 +129,7 @@ class HashTable(pccm.Class, pccm.pybind.PybindClassMixin):
...
@@ -123,7 +129,7 @@ class HashTable(pccm.Class, pccm.pybind.PybindClassMixin):
@
pccm
.
pybind
.
mark
@
pccm
.
pybind
.
mark
@
pccm
.
cuda
.
member_func
tion
@
_
member_func
def
insert
(
self
):
def
insert
(
self
):
""" in this function, if values is empty, it will be assigned to zero.
""" in this function, if values is empty, it will be assigned to zero.
"""
"""
...
@@ -195,7 +201,7 @@ class HashTable(pccm.Class, pccm.pybind.PybindClassMixin):
...
@@ -195,7 +201,7 @@ class HashTable(pccm.Class, pccm.pybind.PybindClassMixin):
return
code
return
code
@
pccm
.
pybind
.
mark
@
pccm
.
pybind
.
mark
@
pccm
.
cuda
.
member_func
tion
@
_
member_func
def
query
(
self
):
def
query
(
self
):
"""query keys, save to values, and save is_empty to is_empty
"""query keys, save to values, and save is_empty to is_empty
"""
"""
...
@@ -267,7 +273,7 @@ class HashTable(pccm.Class, pccm.pybind.PybindClassMixin):
...
@@ -267,7 +273,7 @@ class HashTable(pccm.Class, pccm.pybind.PybindClassMixin):
return
code
return
code
@
pccm
.
pybind
.
mark
@
pccm
.
pybind
.
mark
@
pccm
.
cuda
.
member_func
tion
@
_
member_func
def
assign_arange_
(
self
):
def
assign_arange_
(
self
):
""" this function assign "arange(NumItem)" to table values.
""" this function assign "arange(NumItem)" to table values.
useful in "unique-like" operations.
useful in "unique-like" operations.
...
@@ -322,7 +328,7 @@ class HashTable(pccm.Class, pccm.pybind.PybindClassMixin):
...
@@ -322,7 +328,7 @@ class HashTable(pccm.Class, pccm.pybind.PybindClassMixin):
return
code
return
code
@
pccm
.
pybind
.
mark
@
pccm
.
pybind
.
mark
@
pccm
.
cuda
.
member_func
tion
@
_
member_func
def
size_cpu
(
self
):
def
size_cpu
(
self
):
""" this function can only be used to get cpu hash table size.
""" this function can only be used to get cpu hash table size.
"""
"""
...
@@ -342,7 +348,7 @@ class HashTable(pccm.Class, pccm.pybind.PybindClassMixin):
...
@@ -342,7 +348,7 @@ class HashTable(pccm.Class, pccm.pybind.PybindClassMixin):
@
pccm
.
pybind
.
mark
@
pccm
.
pybind
.
mark
@
pccm
.
cuda
.
member_func
tion
@
_
member_func
def
items
(
self
):
def
items
(
self
):
"""get items.
"""get items.
"""
"""
...
...
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