Skip to content

Commit 6491161

Browse files
Update for delegate interface changes
1 parent dbe864d commit 6491161

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

backends/mediatek/runtime/NeuronBackend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ Error NeuronExecuTorchDelegate::execute(
169169

170170
PrepareInputsOuputs(args);
171171

172-
auto allocator = dynamic_cast<torch::executor::neuron::BufferAllocator*>(
172+
auto allocator = dynamic_cast<neuron::BufferAllocator*>(
173173
context.get_temp_allocator());
174174

175175
size_t inputCount = mInputSizes.size() + neuron_shared_weights_.size();

backends/mediatek/runtime/include/NeuronBackend.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ namespace neuron {
3131
using executorch::runtime::EValue;
3232
using executorch::runtime::FreeableBuffer;
3333
using executorch::runtime::Result;
34+
using executorch::runtime::Span;
3435

3536
class NeuronSharedWeights {
3637
public:
@@ -212,7 +213,7 @@ class NeuronExecuTorchDelegate {
212213
return NEURON_NO_ERROR;
213214
}
214215

215-
int CheckDimOrder(EValue** args) const {
216+
int CheckDimOrder(Span<EValue*> args) const {
216217
size_t data_input_count = mInputSizes.size();
217218
for (int i = 0; i < data_input_count; i++) {
218219
auto tensor_in = args[i]->toTensor();
@@ -226,7 +227,7 @@ class NeuronExecuTorchDelegate {
226227
return NEURON_NO_ERROR;
227228
}
228229

229-
int PrepareInputsOuputs(EValue** args) const {
230+
int PrepareInputsOuputs(Span<EValue*> args) const {
230231
bool has_shared_weights_input = neuron_shared_weights_.size() > 0;
231232

232233
size_t data_input_count = mInputSizes.size();
@@ -265,7 +266,7 @@ class NeuronExecuTorchDelegate {
265266
return NEURON_NO_ERROR;
266267
}
267268

268-
int HintNeuronBackend(::executorch::runtime::EValue** args) const;
269+
int HintNeuronBackend(Span<EValue*> args) const;
269270

270271
private:
271272
std::vector<size_t> mInputSizes;

0 commit comments

Comments
 (0)