-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow device policy execution for IntersectionShaper, DistributedClosestPoint #1392
Conversation
4fe8f0f
to
0d90639
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for following up on this @bmhan12 !
Did you notice any performance improvements in this branch w.r.t the unified memory usage in develop
?
axom::Array<double> sqDistThresh_host( | ||
1, | ||
1, | ||
axom::execution_space<axom::SEQ_EXEC>::allocatorID()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
||
// Determine new allocator (for CUDA/HIP policy, set to Unified) | ||
// Set new default to device | ||
axom::setDefaultAllocator(::getUmpireDeviceId<ExecSpace>()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
+1 for reducing our usage of the global default allocator!
@@ -705,19 +693,20 @@ class IntersectionShaper : public Shaper | |||
this->getDC()->RegisterField(volFracName, volFrac); | |||
|
|||
// Initialize hexahedral elements | |||
m_hexes = axom::Array<HexahedronType>(NE, NE); | |||
axom::ArrayView<HexahedronType> hexes_view = m_hexes.view(); | |||
m_hexes = axom::Array<HexahedronType>(NE, NE, kernel_allocator); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be toggling between kernel
and device
in our naming?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Changed kernel_allocator
to device_allocator
to keep naming standard.
…round for getCandidates(point)
…es workaround for getCandidates(point)" - implementation fails when ats is disabled for cuda, BitSet::size() seemingly cannot be found on either host or device" This reverts commit a081b7e.
2c8f83f
to
0dc759c
Compare
I didn't do any major benchmarking, but at least for the
|
This PR: