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
ColossalAI
Commits
cfa60708
"tests/git@developer.sourcefind.cn:OpenDAS/colossalai.git" did not exist on "da01c234e19f2522768a4e48c926cddf9ac62423"
Unverified
Commit
cfa60708
authored
Sep 01, 2023
by
Mashiro
Committed by
GitHub
Sep 01, 2023
Browse files
[Fix] Fix compile error (#4357)
parent
eb952ea8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
op_builder/utils.py
op_builder/utils.py
+2
-1
No files found.
op_builder/utils.py
View file @
cfa60708
...
...
@@ -197,11 +197,12 @@ def get_cuda_cc_flag() -> List[str]:
import
torch
cc_flag
=
[]
max_arch
=
''
.
join
(
str
(
i
)
for
i
in
torch
.
cuda
.
get_device_capability
())
for
arch
in
torch
.
cuda
.
get_arch_list
():
res
=
re
.
search
(
r
'sm_(\d+)'
,
arch
)
if
res
:
arch_cap
=
res
[
1
]
if
int
(
arch_cap
)
>=
60
:
if
int
(
arch_cap
)
>=
60
and
int
(
arch_cap
)
<=
int
(
max_arch
)
:
cc_flag
.
extend
([
'-gencode'
,
f
'arch=compute_
{
arch_cap
}
,code=
{
arch
}
'
])
return
cc_flag
...
...
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