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
tsoc
openmm
Commits
484e6b99
Unverified
Commit
484e6b99
authored
Feb 07, 2020
by
peastman
Committed by
GitHub
Feb 07, 2020
Browse files
Merge pull request #2553 from peastman/index
Fixed incorrect indexing in kernel
parents
f37bdaa2
c3895fc5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
platforms/common/src/kernels/customNonbondedGroups.cc
platforms/common/src/kernels/customNonbondedGroups.cc
+1
-1
platforms/cuda/src/CudaContext.cpp
platforms/cuda/src/CudaContext.cpp
+1
-1
No files found.
platforms/common/src/kernels/customNonbondedGroups.cc
View file @
484e6b99
...
@@ -23,7 +23,7 @@ DEVICE int reduceMax(int val, LOCAL_ARG int* temp) {
...
@@ -23,7 +23,7 @@ DEVICE int reduceMax(int val, LOCAL_ARG int* temp) {
temp
[
LOCAL_ID
]
=
val
;
temp
[
LOCAL_ID
]
=
val
;
SYNC_WARPS
;
SYNC_WARPS
;
for
(
int
offset
=
16
;
offset
>
0
;
offset
/=
2
)
{
for
(
int
offset
=
16
;
offset
>
0
;
offset
/=
2
)
{
if
(
offset
<
indexInWarp
)
if
(
indexInWarp
<
offset
)
temp
[
LOCAL_ID
]
=
max
(
temp
[
LOCAL_ID
],
temp
[
LOCAL_ID
+
offset
]);
temp
[
LOCAL_ID
]
=
max
(
temp
[
LOCAL_ID
],
temp
[
LOCAL_ID
+
offset
]);
SYNC_WARPS
;
SYNC_WARPS
;
}
}
...
...
platforms/cuda/src/CudaContext.cpp
View file @
484e6b99
...
@@ -258,7 +258,7 @@ CudaContext::CudaContext(const System& system, int deviceIndex, bool useBlocking
...
@@ -258,7 +258,7 @@ CudaContext::CudaContext(const System& system, int deviceIndex, bool useBlocking
int
multiprocessors
;
int
multiprocessors
;
CHECK_RESULT
(
cuDeviceGetAttribute
(
&
multiprocessors
,
CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT
,
device
));
CHECK_RESULT
(
cuDeviceGetAttribute
(
&
multiprocessors
,
CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT
,
device
));
numThreadBlocks
=
numThreadBlocksPerComputeUnit
*
multiprocessors
;
numThreadBlocks
=
numThreadBlocksPerComputeUnit
*
multiprocessors
;
if
(
c
omputeCapability
>=
7.
0
)
{
if
(
c
udaDriverVersion
>=
900
0
)
{
compilationDefines
[
"SYNC_WARPS"
]
=
"__syncwarp();"
;
compilationDefines
[
"SYNC_WARPS"
]
=
"__syncwarp();"
;
compilationDefines
[
"SHFL(var, srcLane)"
]
=
"__shfl_sync(0xffffffff, var, srcLane);"
;
compilationDefines
[
"SHFL(var, srcLane)"
]
=
"__shfl_sync(0xffffffff, var, srcLane);"
;
compilationDefines
[
"BALLOT(var)"
]
=
"__ballot_sync(0xffffffff, var);"
;
compilationDefines
[
"BALLOT(var)"
]
=
"__ballot_sync(0xffffffff, var);"
;
...
...
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