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
b63c08aa
Commit
b63c08aa
authored
Sep 25, 2022
by
yan.yan
Browse files
fix cuda version bug
parent
77a7981a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
setup.py
setup.py
+7
-2
spconv/csrc/sparse/all.py
spconv/csrc/sparse/all.py
+7
-2
No files found.
setup.py
View file @
b63c08aa
...
@@ -177,8 +177,13 @@ if disable_jit is not None and disable_jit == "1":
...
@@ -177,8 +177,13 @@ if disable_jit is not None and disable_jit == "1":
cu
.
namespace
=
"cumm.gemm.main"
cu
.
namespace
=
"cumm.gemm.main"
std
=
"c++17"
std
=
"c++17"
if
cuda_ver
:
if
cuda_ver
:
cuda_ver_vec
=
list
(
map
(
int
,
cuda_ver
.
split
(
"."
)))
cuda_ver_items
=
cuda_ver
.
split
(
"."
)
cuda_ver_tuple
=
(
cuda_ver_vec
[
0
],
cuda_ver_vec
[
1
])
if
len
(
cuda_ver_items
)
==
1
:
cuda_ver_num
=
int
(
cuda_ver
)
cuda_ver_tuple
=
(
cuda_ver_num
//
10
,
cuda_ver_num
%
10
)
else
:
cuda_ver_vec
=
list
(
map
(
int
,
cuda_ver
.
split
(
"."
)))
cuda_ver_tuple
=
(
cuda_ver_vec
[
0
],
cuda_ver_vec
[
1
])
if
cuda_ver_tuple
[
0
]
<
11
:
if
cuda_ver_tuple
[
0
]
<
11
:
std
=
"c++14"
std
=
"c++14"
else
:
else
:
...
...
spconv/csrc/sparse/all.py
View file @
b63c08aa
...
@@ -134,8 +134,13 @@ class SpconvOps(pccm.Class):
...
@@ -134,8 +134,13 @@ class SpconvOps(pccm.Class):
self
.
build_meta
.
add_global_cflags
(
"cl"
,
"/DNOMINMAX"
)
self
.
build_meta
.
add_global_cflags
(
"cl"
,
"/DNOMINMAX"
)
cuda_ver
=
os
.
environ
.
get
(
"CUMM_CUDA_VERSION"
,
""
)
cuda_ver
=
os
.
environ
.
get
(
"CUMM_CUDA_VERSION"
,
""
)
if
cuda_ver
:
if
cuda_ver
:
cuda_ver_vec
=
list
(
map
(
int
,
cuda_ver
.
split
(
"."
)))
cuda_ver_items
=
cuda_ver
.
split
(
"."
)
cuda_ver_tuple
=
(
cuda_ver_vec
[
0
],
cuda_ver_vec
[
1
])
if
len
(
cuda_ver_items
)
==
1
:
cuda_ver_num
=
int
(
cuda_ver
)
cuda_ver_tuple
=
(
cuda_ver_num
//
10
,
cuda_ver_num
%
10
)
else
:
cuda_ver_vec
=
list
(
map
(
int
,
cuda_ver
.
split
(
"."
)))
cuda_ver_tuple
=
(
cuda_ver_vec
[
0
],
cuda_ver_vec
[
1
])
if
cuda_ver_tuple
[
0
]
<
11
:
if
cuda_ver_tuple
[
0
]
<
11
:
self
.
build_meta
.
add_global_cflags
(
"nvcc"
,
"-w"
)
self
.
build_meta
.
add_global_cflags
(
"nvcc"
,
"-w"
)
...
...
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