File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -193,6 +193,10 @@ class EthosUBackend final : public ::executorch::runtime::BackendInterface {
193
193
supported |=
194
194
(tensor_in.scalar_type () == ScalarType::Char and
195
195
handles.inputs ->io [i].elem_size == 1 );
196
+ // 16 bit int (IOQDQ pass prepared networks)
197
+ supported |=
198
+ (tensor_in.scalar_type () == ScalarType::Short and
199
+ handles.inputs ->io [i].elem_size == 2 );
196
200
if (!supported) {
197
201
ET_LOG (
198
202
Error,
@@ -220,6 +224,8 @@ class EthosUBackend final : public ::executorch::runtime::BackendInterface {
220
224
handles.inputs ->io [i].elem_size == 1 ;
221
225
bool both_int = tensor_in.scalar_type () == ScalarType::Int and
222
226
handles.inputs ->io [i].elem_size == 4 ;
227
+ bool both_short = tensor_in.scalar_type () == ScalarType::Short and
228
+ handles.inputs ->io [i].elem_size == 2 ;
223
229
224
230
// Select a compatible copy routine
225
231
if (both_char and permuted_input_shape) {
@@ -233,7 +239,7 @@ class EthosUBackend final : public ::executorch::runtime::BackendInterface {
233
239
tensor_in.size (1 ),
234
240
tensor_in.size (2 ),
235
241
tensor_in.size (3 ));
236
- } else if (both_char or both_int) {
242
+ } else if (both_char or both_int or both_short ) {
237
243
EXECUTORCH_PROF_SCOPE (
238
244
event_tracer, " +EthosUBackend::execute()handles.input.memcpy()" );
239
245
// Sizes match and elt size matches so memcpy
Original file line number Diff line number Diff line change 1
1
# Copyright 2024-2025 Arm Limited and/or its affiliates.
2
- # All rights reserved.
3
2
#
4
3
# This source code is licensed under the BSD-style license found in the
5
4
# LICENSE file in the root directory of this source tree.
@@ -75,16 +74,14 @@ def test_rshift_tosa_MI(self, test_data):
75
74
def test_rshift_tosa_BI (self , test_data ):
76
75
self ._test_rshift_tosa_BI (test_data )
77
76
78
- # TODO: MLETORCH-644 - Add support for INT16 input/output
79
- @parameterized .expand (Rshift .test_data [:- 1 ])
77
+ @parameterized .expand (Rshift .test_data )
80
78
def test_rshift_u55_BI (self , test_data ):
81
79
compile_spec = common .get_u55_compile_spec ()
82
80
tester = self ._test_rshift_ethosu_BI (test_data , compile_spec )
83
81
if conftest .is_option_enabled ("corstone_fvp" ):
84
82
tester .run_method_and_compare_outputs (atol = 1 , inputs = test_data )
85
83
86
- # TODO: MLETORCH-644 - Add support for INT16 input/output
87
- @parameterized .expand (Rshift .test_data [:- 1 ])
84
+ @parameterized .expand (Rshift .test_data )
88
85
def test_rshift_u85_BI (self , test_data ):
89
86
compile_spec = common .get_u85_compile_spec ()
90
87
tester = self ._test_rshift_ethosu_BI (test_data , compile_spec )
You can’t perform that action at this time.
0 commit comments