Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
hehl2
Torchaudio
Commits
dd76e9d4
"...git@developer.sourcefind.cn:OpenDAS/torchaudio.git" did not exist on "7a36c5573d4fac310d694ab758052f8d5aa55ed3"
Unverified
Commit
dd76e9d4
authored
Mar 17, 2021
by
prarabdh9909
Committed by
GitHub
Mar 17, 2021
Browse files
Remove unused helper function (#1396)
parent
4100ad89
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
20 deletions
+0
-20
torchaudio/csrc/sox/utils.cpp
torchaudio/csrc/sox/utils.cpp
+0
-18
torchaudio/csrc/sox/utils.h
torchaudio/csrc/sox/utils.h
+0
-2
No files found.
torchaudio/csrc/sox/utils.cpp
View file @
dd76e9d4
...
@@ -141,24 +141,6 @@ caffe2::TypeMeta get_dtype(
...
@@ -141,24 +141,6 @@ caffe2::TypeMeta get_dtype(
return
c10
::
scalarTypeToTypeMeta
(
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
(
torch
::
Tensor
convert_to_tensor
(
sox_sample_t
*
buffer
,
sox_sample_t
*
buffer
,
const
int32_t
num_samples
,
const
int32_t
num_samples
,
...
...
torchaudio/csrc/sox/utils.h
View file @
dd76e9d4
...
@@ -68,8 +68,6 @@ caffe2::TypeMeta get_dtype(
...
@@ -68,8 +68,6 @@ caffe2::TypeMeta get_dtype(
const
sox_encoding_t
encoding
,
const
sox_encoding_t
encoding
,
const
unsigned
precision
);
const
unsigned
precision
);
caffe2
::
TypeMeta
get_dtype_from_str
(
const
std
::
string
dtype
);
///
///
/// Convert sox_sample_t buffer to uint8/int16/int32/float32 Tensor
/// Convert sox_sample_t buffer to uint8/int16/int32/float32 Tensor
/// NOTE: This function might modify the values in the input buffer to
/// NOTE: This function might modify the values in the input buffer to
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment