imx8mn-evk full-image pytorch execution error

Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx8mn-evk full-image pytorch execution error

Contributor I

I'm using an imx8mn-evk and I'm using this reference manual: IMX-MACHINE-LEARNING-UG.pdf

I tried to run the PyTorch example from the imx-image-full but I got the following error:

" root@imx8mnevk:/usr/bin/pytorch/examples# python3
Traceback (most recent call last):
File "", line 7, in <module>
import torch
File "/usr/lib/python3.7/site-packages/torch/", line 190, in <module>
from torch._C import *
ImportError: /lib/ version `GLIBC_2.32' not found (required by /usr/lib/python3.7/site-packages/torch/lib/ "

I have downloaded that version, 2.32 in this way:

tar zxvf glibc-2.32.tar.gz
cd glibc-2.32
mkdir build
cd build
../configure --prefix=/opt/glibc-2.32
make -j4
sudo make install
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/glibc-2.32/lib

However, it did not work.

I guess LD_LIBRARY is not correctly installed but I can't find the error.

Has anyone worked with Pytorch before, and know how to make it run?

Thank you.

0 Kudos
3 Replies

NXP Employee
NXP Employee


Got to this ticket while investigating a similar issue. A couple of comments:

1. This is a known issue, fixed in LF5.10.x.  A workaround for 5.4.x is to reinstall the wheel pkgs.

2. eIQ in general, and the example's in the ML User's guide are supported across all i.MX 8 family, not just 8MP. Depending on the platform, the ML compute unit can be different (e.g., for 8MPlus: NPU, GPU or CPU; for 8MNano: CPU). This compute unit can be set through a flag at runtime; for now pytorch only supports the CPU. 



0 Kudos

NXP TechSupport
NXP TechSupport

Hello Sonia

The examples in machine learning are for the MX8MPlus, since you have not used this not going to be supported.



0 Kudos

Contributor I

Many thanks for your answer.

I have been trying an other alternative: I installed Pytorch in my imx-image-core, first, the version was 1.9.0, wich I got a message about an "Ilegal Instruction" and I achieved to fixed it changing the version to a lower one (1.8.0), however, it was not completely succesful due to this warning: "OpenBLAS Warning : Detect OpenMP Loop and this application may hang. Please rebuild the library with USE_OPENMP=1 option"

Would you know about any more solution to include Pytorch packages to my image in the IMX8mn-evk?

Thanks in advance, I will be waIting for news ASAP.

0 Kudos