File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
backends/mediatek/runtime Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 1313#include " api/NeuronAdapter.h"
1414
1515#include " executorch/runtime/core/error.h"
16+ #include " executorch/runtime/core/exec_aten/util/dim_order_util.h"
1617
1718#include < algorithm>
1819#include < memory>
@@ -111,6 +112,13 @@ Error NeuronExecuTorchDelegate::execute(
111112 size_t inputCount = mInputSizes .size (), outputCount = mOutputSizes .size ();
112113
113114 for (int i = 0 ; i < inputCount; i++) {
115+ auto tensor_in = args[i]->toTensor ();
116+ ET_CHECK_OR_RETURN_ERROR (
117+ runtime::is_contiguous_dim_order (tensor_in.dim_order ().data (), tensor_in.dim ()),
118+ Internal,
119+ " Expecting default dim_order but got a non default dim_order tensor for external input %u" ,
120+ i);
121+
114122 auto data_ptr = args[i]->toTensor ().data_ptr ();
115123 auto data_size = args[i]->toTensor ().nbytes ();
116124 if (IsCached</* isInput=*/ true >(i, data_ptr)) {
You can’t perform that action at this time.
0 commit comments