zeroshade commented on code in PR #36489:
URL: https://github.com/apache/arrow/pull/36489#discussion_r1268196449


##########
cpp/src/arrow/gpu/cuda_memory.cc:
##########
@@ -480,5 +485,21 @@ Result<uint8_t*> GetHostAddress(uintptr_t device_ptr) {
   return static_cast<uint8_t*>(ptr);
 }
 
+Result<std::shared_ptr<MemoryManager>> DefaultMemoryMapper(ArrowDeviceType 
device_type,
+                                                           int64_t device_id) {
+  switch (device_type) {
+    case ARROW_DEVICE_CPU:
+      return default_cpu_memory_manager();
+    case ARROW_DEVICE_CUDA:
+    case ARROW_DEVICE_CUDA_HOST:
+    case ARROW_DEVICE_CUDA_MANAGED: {
+      ARROW_ASSIGN_OR_RAISE(auto device, 
arrow::cuda::CudaDevice::Make(device_id));

Review Comment:
   I'll look at this in a subsequent PR rather than make that change here since 
it'll probably have other effects elsewhere



-- 
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]

Reply via email to