Unverified Commit dd76e9d4 authored by prarabdh9909's avatar prarabdh9909 Committed by GitHub
Browse files

Remove unused helper function (#1396)

parent 4100ad89
......@@ -141,24 +141,6 @@ caffe2::TypeMeta get_dtype(
return c10::scalarTypeToTypeMeta(dtype);
}
caffe2::TypeMeta get_dtype_from_str(const std::string dtype) {
const auto tgt_dtype = [&]() {
if (dtype == "uint8")
return torch::kUInt8;
else if (dtype == "int16")
return torch::kInt16;
else if (dtype == "int32")
return torch::kInt32;
else if (dtype == "float32")
return torch::kFloat32;
else if (dtype == "float64")
return torch::kFloat64;
else
throw std::runtime_error("Unsupported dtype");
}();
return c10::scalarTypeToTypeMeta(tgt_dtype);
}
torch::Tensor convert_to_tensor(
sox_sample_t* buffer,
const int32_t num_samples,
......
......@@ -68,8 +68,6 @@ caffe2::TypeMeta get_dtype(
const sox_encoding_t encoding,
const unsigned precision);
caffe2::TypeMeta get_dtype_from_str(const std::string dtype);
///
/// Convert sox_sample_t buffer to uint8/int16/int32/float32 Tensor
/// NOTE: This function might modify the values in the input buffer to
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment