Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/libtorchaudio/forced_align/gpu/compute.cu
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ std::tuple<Tensor, Tensor> compute(
auto B = logProbs.size(0);
auto T = logProbs.size(1); // num frames

Tensor paths = torchaudio::stable::new_zeros(targets, {B, T}, /*dtype=*/std::nullopt, /*layout=*/std::nullopt, /*device=*/torchaudio::stable::cpu_device());
Tensor paths = torchaudio::stable::new_zeros(targets, {B, T}, /*dtype=*/std::nullopt, /*layout=*/std::nullopt, /*device=*/torch::stable::DeviceType::CPU);

THO_DISPATCH_V2(logProbs.scalar_type(), "forced_align_impl", AT_WRAP([&] {
if (targets.scalar_type() == ScalarType::Long) {
Expand Down
45 changes: 0 additions & 45 deletions src/libtorchaudio/stable/Device.h

This file was deleted.

10 changes: 5 additions & 5 deletions src/libtorchaudio/stable/ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
features implemented here.
*/

#include <libtorchaudio/stable/Device.h>
#include <torch/csrc/stable/ops.h>
#include <torch/csrc/stable/tensor.h>

#ifdef USE_CUDA
#include <ATen/cuda/CUDAContext.h>
Expand Down Expand Up @@ -113,7 +113,7 @@ inline Tensor new_zeros(
std::vector<int64_t> size,
std::optional<c10::ScalarType> dtype = std::nullopt,
std::optional<Layout> layout = std::nullopt,
std::optional<Device> device = std::nullopt,
std::optional<torch::stable::Device> device = std::nullopt,
std::optional<bool> pin_memory = std::nullopt) {
int32_t target_dtype{};
if (dtype.has_value()) {
Expand All @@ -130,11 +130,11 @@ inline Tensor new_zeros(
TORCH_ERROR_CODE_CHECK(aoti_torch_get_layout(self.get(), &layout_));
}

DeviceType device_type;
DeviceIndex device_index = 0;
int32_t device_type;
torch::stable::DeviceIndex device_index = 0;
if (device.has_value()) {
auto device_ = device.value();
device_type = device_.type();
device_type = static_cast<int32_t>(device_.type());
device_index = device_.index();
} else {
TORCH_ERROR_CODE_CHECK(
Expand Down
Loading