Skip to content

Commit

Permalink
[Fix] Fix record_stream for PyTorch 1.14 (dmlc#4975)
Browse files Browse the repository at this point in the history
  • Loading branch information
yaox12 authored Dec 2, 2022
1 parent 943abba commit 26612d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tensoradapter/pytorch/torch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ TA_EXPORTS cudaStream_t CUDACurrentStream() {

TA_EXPORTS void RecordStream(void* ptr, cudaStream_t stream, int device_id) {
c10::DataPtr data_ptr{
ptr, ptr, &c10::cuda::CUDACachingAllocator::raw_delete,
ptr, ptr, c10::cuda::CUDACachingAllocator::get()->raw_deleter(),
c10::Device(c10::DeviceType::CUDA, device_id)};
c10::cuda::CUDACachingAllocator::recordStream(
data_ptr,
Expand Down

0 comments on commit 26612d0

Please sign in to comment.