Skip to content

Commit ceeb2db

Browse files
committed
Clean up
1 parent f0e1442 commit ceeb2db

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/libtorchaudio/cuda_utils.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
#include <cuda_runtime_api.h>
77

8+
// TODO: replace TA_CUDA_CHECK with STD_CUDA_CHECK after
9+
// https://github.com/pytorch/pytorch/pull/169385 has landed.
810
#define TA_CUDA_CHECK(...) __VA_ARGS__
911

1012
namespace libtorchaudio::cuda {

src/libtorchaudio/forced_align/gpu/compute.cu

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,10 @@ void forced_align_impl(
210210
C10_CUDA_KERNEL_LAUNCH_CHECK();
211211
++backPtrBufferLen;
212212
if (backPtrBufferLen == kBackPtrBufferSize || t == T - 1) {
213-
//cpuDataTranferStream.synchronize();
214213
libtorchaudio::cuda::synchronize(cpuDataTranferStream, device_index);
215214
// GPU -> GPU copy
216215
bufferCopy = torch::stable::clone(backPtrBuffer);
217216
STD_TORCH_CHECK(bufferCopy.is_contiguous(), "unexpected fail, need to implement stable::Tensor::contiguous()")
218-
//defaultStream.synchronize();
219217
libtorchaudio::cuda::synchronize(defaultStream, device_index);
220218
libtorchaudio::cuda::setCurrentCUDAStream(cpuDataTranferStream, device_index);
221219
// Copy ASYNC from GPU to CPU
@@ -231,7 +229,6 @@ void forced_align_impl(
231229
backPtrBufferLen = 0;
232230
}
233231
}
234-
//cpuDataTranferStream.synchronize();
235232
libtorchaudio::cuda::synchronize(cpuDataTranferStream, device_index);
236233
auto alphasCpu = torchaudio::stable::cpu(alphas);
237234
auto alphasCpu_a = torchaudio::accessor<scalar_t, 2>(alphasCpu);

src/libtorchaudio/shim_temporary.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22
// TODO: remove this file once https://github.com/pytorch/pytorch/pull/169376
3-
// has landed.
3+
// has landed in nightly.
44

55
#include <c10/cuda/CUDAStream.h>
66
#include <torch/csrc/inductor/aoti_torch/utils.h>

0 commit comments

Comments
 (0)