felipeblazing commented on code in PR #36489:
URL: https://github.com/apache/arrow/pull/36489#discussion_r1264268076
##########
cpp/src/arrow/device.h:
##########
@@ -29,6 +29,25 @@
namespace arrow {
+/// \brief EXPERIMENTAL: Device type enum which matches up with C Data Device
types
+enum class DeviceType : char {
+ UNKNOWN = 0,
+ CPU = 1,
+ CUDA = 2,
Review Comment:
Its not a device which is stream ordered but rather an allocation. A user
could have allocations that are both made via async allocators and via
synchronous ones. If the memory layout doesn't have a way of specifying this
then users will have to basically have an extra piece of information which is
carried around with every allocation they make in order to ensure that
asynchronously allocated memory calls synchronize before being accessed.
The more I think about it though there is a further complication which is
knowing which stream it was allocated on and the fact that if you enable per
thread default stream this would further complicate situations in which every
thread would have its own stream of value 0. I can understand why it might be
necessary to hold off on this for a while but I do think this is something that
should be kept in mind.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]