File tree Expand file tree Collapse file tree 3 files changed +6
-11
lines changed
Expand file tree Collapse file tree 3 files changed +6
-11
lines changed Original file line number Diff line number Diff line change 11#pragma once
22
3+ #include < cuda_runtime_api.h>
34#include < torch/csrc/stable/c/shim.h>
45#include < torch/csrc/stable/device.h>
56
6- #include < cuda_runtime_api.h>
7-
8- // TODO: replace TA_CUDA_CHECK with STD_CUDA_CHECK after
9- // https://github.com/pytorch/pytorch/pull/169385 has landed.
10- #define TA_CUDA_CHECK (...) __VA_ARGS__
11-
127namespace libtorchaudio ::cuda {
138
149inline cudaStream_t getCurrentCUDAStream (
Original file line number Diff line number Diff line change 11#include < libtorchaudio/cuda_utils.h>
22#include < libtorchaudio/utils.h>
33#include < torch/csrc/stable/library.h>
4+ #include < torch/csrc/stable/macros.h>
45#include < torch/headeronly/core/Dispatch_v2.h>
56#include < torch/headeronly/core/ScalarType.h>
6- #include < c10/cuda/CUDAException.h>
77
88#include < cub/cub.cuh>
99#include < limits.h>
@@ -207,7 +207,7 @@ void forced_align_impl(
207207 backPtrBufferLen,
208208 torchaudio::packed_accessor32<scalar_t , 2 >(alphas),
209209 torchaudio::packed_accessor32<int8_t , 2 >(backPtrBuffer));
210- C10_CUDA_KERNEL_LAUNCH_CHECK ();
210+ STD_CUDA_KERNEL_LAUNCH_CHECK ();
211211 ++backPtrBufferLen;
212212 if (backPtrBufferLen == kBackPtrBufferSize || t == T - 1 ) {
213213 libtorchaudio::cuda::synchronize (cpuDataTranferStream, device_index);
@@ -219,7 +219,7 @@ void forced_align_impl(
219219 // Copy ASYNC from GPU to CPU
220220 int64_t offset =
221221 static_cast <int64_t >(t + 1 - backPtrBufferLen) * S * sizeof (int8_t );
222- C10_CUDA_CHECK (cudaMemcpyAsync (
222+ STD_CUDA_CHECK (cudaMemcpyAsync (
223223 static_cast <int8_t *>(backPtrCpu.data_ptr ()) + offset,
224224 bufferCopy.data_ptr (),
225225 backPtrBufferLen * S * sizeof (int8_t ),
Original file line number Diff line number Diff line change 11#include < libtorchaudio/utils.h>
22#include < torch/csrc/stable/accelerator.h>
3+ #include < torch/csrc/stable/macros.h>
34#include < torch/headeronly/core/Dispatch_v2.h>
45#include < torch/headeronly/core/ScalarType.h>
5- #include < c10/cuda/CUDAException.h>
66
77using torch::headeronly::ScalarType;
88using torch::stable::Tensor;
@@ -74,7 +74,7 @@ Tensor cuda_lfilter_core_loop(
7474 torchaudio::packed_accessor_size_t <scalar_t , 3 >(in),
7575 torchaudio::packed_accessor_size_t <scalar_t , 2 >(a_flipped),
7676 torchaudio::packed_accessor_size_t <scalar_t , 3 >(padded_out)));
77- C10_CUDA_KERNEL_LAUNCH_CHECK ();
77+ STD_CUDA_KERNEL_LAUNCH_CHECK ();
7878 }), AT_FLOATING_TYPES);
7979 return padded_out;
8080}
You can’t perform that action at this time.
0 commit comments