Failed to load data for backend XnnpackBackend
Open
@davidlin54 is already working on this.
Since Jun 14, 2024.
module: examples
triaged
- Dominant language
- Python
- Stars
- 5k
- Forks
- 1.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 581
Description
I'm trying to build llava_encoder using XNNPack & Android ToolChain.
Whenever i attempt to pass inputs to my model, it failed to delegate data to XNNBackend.
I've already checked .pte model working using xnn_executor_runner in linux (below command)
./cmake-out/backends/xnnpack/xnn_executor_runner --model_path=./xnn_llava_encoder.pte
and the input tensor shape was same with android input tensor. (1,3,336,336).
If anyone can help, I would greatly appreciate it.
type=1327 audit(1717601983.365:799): proctitle="com.example.executorchdemo"
File /data/user/0/com.example.executorchdemo/files/xnn_llava_encoder.pte: offset 5320704 + size 4198960 > file_size_ 8912896
Failed to load data for backend XnnpackBackend
Process: com.example.executorchdemo, PID: 886
java.lang.Exception: Execution of method forward failed with status 0x12
at org.pytorch.executorch.NativePeer.forward(Native Method)
at org.pytorch.executorch.Module.forward(Module.java:56)
at com.example.executorchdemo.MainActivity.run(MainActivity.java:199)
at java.lang.Thread.run(Thread.java:1012)
<MainActivity.java>
mBitmap = Bitmap.createScaledBitmap(mBitmap, 336, 336, true);
final Tensor inputTensor =
TensorImageUtils.bitmapToFloat32Tensor(
mBitmap,
TensorImageUtils.TORCHVISION_NORM_MEAN_RGB,
TensorImageUtils.TORCHVISION_NORM_STD_RGB);
Tensor outputTensor = mModule.forward(EValue.from(inputTensor))[0].toTensor();
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.