-
Notifications
You must be signed in to change notification settings - Fork 725
[STABLE ABI] Port forced_align #4079
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/audio/4079
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 007452e with merge base 87ff22e ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
b3a5a0e
to
282bd7f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
TORCH_CHECK( | ||
logProbs.size(1) == at::max(inputLengths).item().toInt(), | ||
STD_TORCH_CHECK( | ||
logProbs.size(1) == torchaudio::util::max<int>(inputLengths), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is likely a bug: when inputLenghts
is a int64 tensor, int32-casting may produce incorrect result.
C10_CUDA_KERNEL_LAUNCH_CHECK(); | ||
++backPtrBufferLen; | ||
if (backPtrBufferLen == kBackPtrBufferSize || t == T - 1) { | ||
cpuDataTranferStream.synchronize(); | ||
// GPU -> GPU copy | ||
bufferCopy = backPtrBuffer.clone().contiguous(); | ||
bufferCopy = torchaudio::stable::clone(backPtrBuffer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: use clone(memory_format=contiguous_format)
to ensure contiguous bufferCopy.
// template<typename T, size_t N, template <typename U> class PtrTraits = | ||
// torchaudio::stable::DefaultPtrTraits, typename index_t = int64_t> | ||
// GenericPackedTensorAccessor<T,N> generic_packed_accessor(const Tensor& t) && | ||
// = delete; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove.
// template<typename T, size_t N, template <typename U> class PtrTraits = | ||
// torchaudio::stable::DefaultPtrTraits> PackedTensorAccessor32<T,N,PtrTraits> | ||
// packed_accessor32(const Tensor& t) && = delete; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove.
// template<typename T, size_t N, template <typename U> class PtrTraits = | ||
// DefaultPtrTraits> PackedTensorAccessor64<T,N,PtrTraits> | ||
// packed_accessor64(const Tensor& t) && = delete; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove.
As in the title.
This PR is marked as Draft as it requires the torch PR stack starting at pytorch/pytorch#161891 (read: CI failures are expected).
Same as #4022 but using C++ torch::stable::Tensor API instead of C shim Tensor API and this PR includes also the GPU port.
PLEASE NOTE THAT THE TORCHAUDIO REPOSITORY IS NO LONGER ACTIVELY MONITORED. You may not get a response. For open discussions, visit https://discuss.pytorch.org/.