Skip to content

Commit 0ff3b57

Browse files
committed
Add back device type check
1 parent d4dd7bd commit 0ff3b57

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/libtorchaudio/rnnt/cpu/compute_alphas.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@ RAIIATH compute_alphas(
3737
options.blank_ = blank;
3838
options.clamp_ = clamp;
3939

40-
// TORCH_CHECK_EQ(logits.device().type(), torch::DeviceType::CPU);
41-
options.device_ = CPU;
40+
int32_t logits_device_type;
41+
aoti_torch_get_device_type(logits.get(), &logits_device_type);
42+
AOTI_TORCH_CHECK(logits_device_type == aoti_torch_device_type_cpu());
4243

44+
options.device_ = CPU;
4345

4446
int32_t logits_device;
4547
aoti_torch_get_device_type(logits.get(), &logits_device);

0 commit comments

Comments
 (0)