Skip to content

Commit

Permalink
Upgrade to dlpack v0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Aug 3, 2023
1 parent f6a2e49 commit 9bd39ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def requirements(self):
self.requires("spdlog/1.11.0", transitive_headers=True)
self.requires("thrust/1.16.0", transitive_headers=True, force=True)
self.requires("stdgpu/cci.20230507@cupoch", transitive_headers=True)
self.requires("dlpack/0.4")
self.requires("dlpack/0.8")
self.requires("jsoncpp/1.9.5")
self.requires("fmt/10.0.0", override=True)

Expand Down
6 changes: 3 additions & 3 deletions src/cupoch/utility/dl_converter.cu
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ DLManagedTensor *ToDLPack(
dvdl->tensor.dl_tensor.data = const_cast<void *>(
(const void *)(thrust::raw_pointer_cast(src.data())));
int64_t device_id = GetDevice();
DLContext device;
DLDevice device;
device.device_id = device_id;
device.device_type = DLDeviceType::kDLGPU;
device.device_type = DLDeviceType::kDLCUDA;
dvdl->tensor.dl_tensor.device = device;
dvdl->tensor.dl_tensor.ndim = 2;
DLDataType dtype;
Expand Down Expand Up @@ -110,7 +110,7 @@ void FromDLPack(const DLManagedTensor *src,
thrust::raw_pointer_cast(base_ptr),
src->dl_tensor.shape[0] * sizeof(Eigen::Matrix<T, Dim, 1>),
cudaMemcpyHostToDevice));
} else if (src->dl_tensor.device.device_type == DLDeviceType::kDLGPU) {
} else if (src->dl_tensor.device.device_type == DLDeviceType::kDLCUDA) {
thrust::copy(base_ptr, base_ptr + src->dl_tensor.shape[0], dst.begin());
} else {
utility::LogError("[FromDLPack] Unsupported device type.");
Expand Down

0 comments on commit 9bd39ef

Please sign in to comment.