Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
MMCV
Commits
a4dc2a72
Unverified
Commit
a4dc2a72
authored
Dec 24, 2021
by
pc
Committed by
GitHub
Dec 24, 2021
Browse files
support device dispatch in parrots (#1588)
parent
0bcbeadb
Changes
46
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
143 additions
and
293 deletions
+143
-293
mmcv/ops/csrc/parrots/three_nn.cpp
mmcv/ops/csrc/parrots/three_nn.cpp
+7
-19
mmcv/ops/csrc/parrots/tin_shift.cpp
mmcv/ops/csrc/parrots/tin_shift.cpp
+7
-39
mmcv/ops/csrc/parrots/upfirdn2d.cpp
mmcv/ops/csrc/parrots/upfirdn2d.cpp
+111
-19
mmcv/ops/csrc/parrots/voxelization.cpp
mmcv/ops/csrc/parrots/voxelization.cpp
+15
-62
mmcv/ops/csrc/parrots/voxelization_cpu.cpp
mmcv/ops/csrc/parrots/voxelization_cpu.cpp
+0
-152
setup.py
setup.py
+3
-2
No files found.
mmcv/ops/csrc/parrots/three_nn.cpp
View file @
a4dc2a72
This diff is collapsed.
Click to expand it.
mmcv/ops/csrc/parrots/tin_shift.cpp
View file @
a4dc2a72
This diff is collapsed.
Click to expand it.
mmcv/ops/csrc/parrots/upfirdn2d.cpp
View file @
a4dc2a72
This diff is collapsed.
Click to expand it.
mmcv/ops/csrc/parrots/voxelization.cpp
View file @
a4dc2a72
This diff is collapsed.
Click to expand it.
mmcv/ops/csrc/parrots/voxelization_cpu.cpp
deleted
100644 → 0
View file @
0bcbeadb
This diff is collapsed.
Click to expand it.
setup.py
View file @
a4dc2a72
...
...
@@ -189,13 +189,14 @@ def get_extensions():
define_macros
=
[]
include_dirs
=
[]
op_files
=
glob
.
glob
(
'./mmcv/ops/csrc/pytorch/cuda/*.cu'
)
+
\
glob
.
glob
(
'./mmcv/ops/csrc/pytorch/cpu/*.cpp'
)
+
\
glob
.
glob
(
'./mmcv/ops/csrc/parrots/*.cpp'
)
include_dirs
.
append
(
os
.
path
.
abspath
(
'./mmcv/ops/csrc/common'
))
include_dirs
.
append
(
os
.
path
.
abspath
(
'./mmcv/ops/csrc/common/cuda'
))
cuda_args
=
os
.
getenv
(
'MMCV_CUDA_ARGS'
)
extra_compile_args
=
{
'nvcc'
:
[
cuda_args
]
if
cuda_args
else
[],
'cxx'
:
[],
'nvcc'
:
[
cuda_args
,
'-std=c++14'
]
if
cuda_args
else
[
'-std=c++14'
],
'cxx'
:
[
'-std=c++14'
],
}
if
torch
.
cuda
.
is_available
()
or
os
.
getenv
(
'FORCE_CUDA'
,
'0'
)
==
'1'
:
define_macros
+=
[(
'MMCV_WITH_CUDA'
,
None
)]
...
...
Prev
1
2
3
Next
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