jorisvandenbossche commented on code in PR #40699:
URL: https://github.com/apache/arrow/pull/40699#discussion_r1537807924


##########
cpp/src/arrow/gpu/cuda_memory.cc:
##########
@@ -501,5 +502,27 @@ Result<std::shared_ptr<MemoryManager>> 
DefaultMemoryMapper(ArrowDeviceType devic
   }
 }
 
+Result<std::shared_ptr<MemoryManager>> DefaultGPUMemoryMapper(int64_t 
device_id) {
+  ARROW_ASSIGN_OR_RAISE(auto device, arrow::cuda::CudaDevice::Make(device_id));
+  return device->default_memory_manager();
+}

Review Comment:
   I somewhat blindly copied this from an existing function:
   
   
https://github.com/apache/arrow/blob/1781b3248743812f737f32c244434b00e8d18579/cpp/src/arrow/gpu/cuda_memory.cc#L488-L497
   
   But yes, that just ignores the device type at the moment. Looking at the 
code, it seems that CudaDevice currently only supports CUDA allocation type?
   
   Then for this PR I can just remove the other two?



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