executorch icon indicating copy to clipboard operation
executorch copied to clipboard

Undefined symbol while compiling runtime for MediaTek

Open micpod opened this issue 8 months ago • 4 comments

Hello, during compilation for MediaTek I'm receiving following issue:

ld.lld: error: undefined symbol: torch::executor::neuron::BufferAllocator::Find(void*)
>>> referenced by NeuronBackend.cpp:132 (/Users/nono/dev/executorch/backends/mediatek/runtime/NeuronBackend.cpp:132)
>>>               CMakeFiles/neuron_backend.dir/runtime/NeuronBackend.cpp.o:(executorch::backends::neuron::NeuronExecuTorchDelegate::execute(executorch::runtime::BackendExecutionContext&, executorch::runtime::EValue**) const)
>>> referenced by NeuronBackend.cpp:150 (/Users/nono/dev/executorch/backends/mediatek/runtime/NeuronBackend.cpp:150)
>>>               CMakeFiles/neuron_backend.dir/runtime/NeuronBackend.cpp.o:(executorch::backends::neuron::NeuronExecuTorchDelegate::execute(executorch::runtime::BackendExecutionContext&, executorch::runtime::EValue**) const)
>>> referenced by NeuronBackend.cpp:175 (/Users/nono/dev/executorch/backends/mediatek/runtime/NeuronBackend.cpp:175)
>>>               CMakeFiles/neuron_backend.dir/runtime/NeuronBackend.cpp.o:(executorch::backends::neuron::NeuronExecuTorchDelegate::HintNeuronBackend(executorch::runtime::EValue**) const)
>>> referenced 1 more times

ld.lld: error: undefined symbol: torch::executor::neuron::BufferAllocator::GetInstance()
>>> referenced by NeuronBackend.cpp:168 (/Users/nono/dev/executorch/backends/mediatek/runtime/NeuronBackend.cpp:168)

I did all steps as described in the README. Is there any problem I miss? Thank you for help!

cc @cccclai @neuropilot-captain @cbilgin

micpod avatar Apr 23 '25 12:04 micpod

@cccclai who is a good contact from mediatek for this?

metascroy avatar Apr 23 '25 21:04 metascroy

I found this error too, mark the issue.

tiger-of-shawn avatar Apr 25 '25 12:04 tiger-of-shawn

Can someone point me to a specific commit hash or tag of the ExecuTorch repository that is known to work with the MediaTek SDK / backend?

I've been trying to run the provided LLaMA demo and build the MediaTek flow, but I haven’t been able to find a version that actually works end-to-end without errors.

Thanks in advance! 🙏

micpod avatar Apr 25 '25 15:04 micpod

@neuropilot-captain can you have a look?

metascroy avatar Apr 28 '25 17:04 metascroy

I've noticed that this error has also been reported on Discord, indicating it may be a widespread issue. Is there any chance it will be resolved soon?

micpod avatar Apr 29 '25 06:04 micpod

Can somebody answer? Mediatek backend is not runnable in current Executorch and with current Neuropilot SDK.

micpod avatar May 13 '25 12:05 micpod

Sorry for the inconvenience, just pinged @neuropilot-captain again to take a look

cccclai avatar May 13 '25 17:05 cccclai

Hi @micpod, it seems to be a library compatibility issue. We are working on a PR to access the latest buffer allocator: https://github.com/pytorch/executorch/pull/8760, and will be merged very soon. Thanks!

neuropilot-captain avatar May 24 '25 07:05 neuropilot-captain