Skip to content
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

ARROW-17421: [C++] CUDA on Windows fails to build #13883

Merged
merged 2 commits into from
Aug 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cpp/src/arrow/gpu/cuda_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class ARROW_EXPORT CudaDeviceManager {
static std::unique_ptr<CudaDeviceManager> instance_;

class Impl;
std::unique_ptr<Impl> impl_;
std::shared_ptr<Impl> impl_;

friend class CudaContext;
friend class CudaDevice;
Expand Down Expand Up @@ -146,7 +146,7 @@ class ARROW_EXPORT CudaDevice : public Device {
/// \endcond

explicit CudaDevice(Impl);
std::unique_ptr<Impl> impl_;
std::shared_ptr<Impl> impl_;
};

/// \brief Return whether a device instance is a CudaDevice
Expand Down Expand Up @@ -297,7 +297,7 @@ class ARROW_EXPORT CudaContext : public std::enable_shared_from_this<CudaContext
uintptr_t dst, uintptr_t src, int64_t nbytes);

class Impl;
std::unique_ptr<Impl> impl_;
std::shared_ptr<Impl> impl_;

friend class CudaBuffer;
friend class CudaBufferReader;
Expand Down
1 change: 1 addition & 0 deletions cpp/src/arrow/gpu/cuda_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ namespace internal {

std::string CudaErrorDescription(CUresult err);

ARROW_EXPORT
Status StatusFromCuda(CUresult res, const char* function_name = nullptr);

#define CU_RETURN_NOT_OK(FUNC_NAME, STMT) \
Expand Down
2 changes: 2 additions & 0 deletions cpp/src/arrow/gpu/cuda_memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,12 @@ Result<std::shared_ptr<CudaHostBuffer>> AllocateCudaHostBuffer(int device_number
const int64_t size);

/// Low-level: get a device address through which the CPU data be accessed.
ARROW_EXPORT
Result<uintptr_t> GetDeviceAddress(const uint8_t* cpu_data,
const std::shared_ptr<CudaContext>& ctx);

/// Low-level: get a CPU address through which the device data be accessed.
ARROW_EXPORT
Result<uint8_t*> GetHostAddress(uintptr_t device_ptr);

} // namespace cuda
Expand Down