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
OpenFold
Commits
c40bf687
Commit
c40bf687
authored
May 04, 2023
by
zhuwenwen
Browse files
support dtk2304
parent
ed252f75
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
11 deletions
+9
-11
openfold/utils/kernel/csrc/softmax_cuda_kernel.cu
openfold/utils/kernel/csrc/softmax_cuda_kernel.cu
+2
-2
setup.py
setup.py
+7
-9
No files found.
openfold/utils/kernel/csrc/softmax_cuda_kernel.cu
View file @
c40bf687
...
...
@@ -32,14 +32,14 @@
__inline__
__device__
float
WarpAllReduceMax
(
float
val
)
{
for
(
int
mask
=
1
;
mask
<
32
;
mask
*=
2
)
{
val
=
max
(
val
,
__shfl_xor
_sync
(
0xffffffff
,
val
,
mask
));
val
=
max
(
val
,
__shfl_xor
c
(
val
,
mask
));
}
return
val
;
}
__inline__
__device__
float
WarpAllReduceSum
(
float
val
)
{
for
(
int
mask
=
1
;
mask
<
32
;
mask
*=
2
)
{
val
+=
__shfl_xor
_sync
(
0xffffffff
,
val
,
mask
);
val
+=
__shfl_xor
(
val
,
mask
);
}
return
val
;
}
...
...
setup.py
View file @
c40bf687
...
...
@@ -32,30 +32,28 @@ version_dependent_macros = [
extra_cuda_flags
=
[
'-std=c++14'
,
#'-maxrregcount=50',
#'-U__CUDA_NO_HALF_OPERATORS__',
#'-U__CUDA_NO_HALF_CONVERSIONS__',
'--expt-relaxed-constexpr'
,
'--expt-extended-lambda'
'-U__CUDA_NO_HALF_OPERATORS__'
,
'-U__CUDA_NO_HALF_CONVERSIONS__'
]
cc_flag
=
[
'-DAMDGPU_TARGETS'
,
'gfx900;gfx906'
]
cc_flag
=
[
'-DAMDGPU_TARGETS'
,
'gfx900;gfx906
;gfx926
'
]
extra_cuda_flags
+=
cc_flag
def
get_sha
(
pytorch_
root
:
Union
[
str
,
Path
])
->
str
:
def
get_sha
(
root
:
Union
[
str
,
Path
])
->
str
:
try
:
return
subprocess
.
check_output
([
'git'
,
'rev-parse'
,
'HEAD'
],
cwd
=
pytorch_
root
).
decode
(
'ascii'
).
strip
()
return
subprocess
.
check_output
([
'git'
,
'rev-parse'
,
'HEAD'
],
cwd
=
root
).
decode
(
'ascii'
).
strip
()
except
Exception
:
return
'Unknown'
def
get_version_add
(
sha
:
Optional
[
str
]
=
None
)
->
str
:
openfold_root
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
add_version_path
=
"version.py"
if
sha
!=
'Unknown'
:
if
sha
is
None
:
sha_path
=
os
.
getenv
(
'OPENFOLD_DOWNLOAD_PATH'
,
""
)
sha
=
get_sha
(
sha_path
)
sha
=
get_sha
(
openfold_root
)
version
=
'git'
+
sha
[:
7
]
if
os
.
getenv
(
'OPENFOLD_BUILD_VERSION'
):
...
...
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