Skip to content

Commit

Permalink
🐛 Fix dlpack tensor evaporation
Browse files Browse the repository at this point in the history
  • Loading branch information
yhs0602 committed Jan 1, 2025
1 parent 04fb1d6 commit 8eef6af
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/cpp/ipc_cuda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
#include <string>

static void deleteDLManagedTensor(DLManagedTensor *self) {
return;
/*
Allocate once, deallocate once. (On exit)
cudaError_t err = cudaIpcCloseMemHandle(self->dl_tensor.data);
if (err != cudaSuccess) {
fprintf(stderr, "Failed to close CUDA IPC handle: %s\n", cudaGetErrorString(err));
Expand All @@ -14,6 +17,7 @@ static void deleteDLManagedTensor(DLManagedTensor *self) {
fflush(stderr);
free(self->dl_tensor.shape);
free(self);
*/
}

DLManagedTensor *
Expand Down

0 comments on commit 8eef6af

Please sign in to comment.