Skip to content

Commit 847b726

Browse files
committed
Correct dimensionality of path variable
1 parent 9629864 commit 847b726

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libtorchaudio/forced_align/cpu/compute.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ std::tuple<Tensor, Tensor> compute(
177177
blank >= 0 && blank < logProbs.size(-1),
178178
"blank must be within [0, num classes)");
179179

180-
// TODO: Requires port of `max` operator.
180+
// TODO: Requires port of `max` and `item` operators.
181181
// TORCH_CHECK(
182182
// logProbs.size(1) == at::max(inputLengths).item().toInt(),
183183
// "input length mismatch");
@@ -193,7 +193,7 @@ std::tuple<Tensor, Tensor> compute(
193193
AtenTensorHandle paths_h;
194194
int32_t targets_device;
195195
aoti_torch_get_device_type(targets.get(), &targets_device);
196-
aoti_torch_empty_strided(1, paths_size, paths_stride, targets.dtype(), targets_device, targets.get_device(), &paths_h);
196+
aoti_torch_empty_strided(2, paths_size, paths_stride, targets.dtype(), targets_device, targets.get_device(), &paths_h);
197197
auto paths = Tensor(paths_h);
198198

199199

0 commit comments

Comments
 (0)