Fix for the CUDA Levenshtein Distance.
Summary:
## What does this PR do?
Fixes
Some unknown editor bug automatically added one "}" in the last line and build does not detect that.
Pull Request resolved:
torch::Tensor operations) {
const auto batch_size = source.size(0);
- // const auto shared_size = (source.size(1) + 1) * 2 * sizeof(short);
-
at::TensorOptions options(source.device());
options = options.dtype(at::ScalarType::Int);
auto labels = torch::empty({batch_size, source.size(1)}, options);
torch::Tensor operations) {
const auto batch_size = target.size(0);
-
at::TensorOptions options(target.device());
options = options.dtype(at::ScalarType::Int);
auto labels = torch::empty({batch_size, target.size(1)}, options);
torch::Tensor target_length) {
const auto batch_size = source.size(0);
-
-
+ const auto shared_size = (source.size(1) + 1) * (target.size(1) + 1) * sizeof(short);
at::TensorOptions options(source.device());
options = options.dtype(at::ScalarType::Int);
operations.data<int>(),
distances.data<int>());
}));
-
} else {
AT_DISPATCH_ALL_TYPES(source.scalar_type(), "faster_levenshtein_distance", ([&] {
faster_levenshtein_distance_kernel<scalar_t><<<batch_size, 1, shared_size, stream>>>(
return operations;
}
- }
