2022. 08. 09. 6:20 keltezéssel, Anuj Mittal írta:
On Mon, 2022-08-08 at 18:02 +0200, Böszörményi Zoltán wrote:
Hi,
I am trying to create a recipe for pytorch
(https://github.com/pytorch/pytorch)
with GPU accceleration but it seems I ran into a few issues.
The intel-oneapi-mkl recipe simply repackages the contents of a DEB
package.
There are some problems with this as this recipe cannot be used to
build
others that would link to e.g. libmkl_intel_lp64.so
* the contents are installed into /opt so sysroot-destdir is empty
* if I add /opt to SYSROOT_DIRS, then the libraries are carried
over intel-oneapi-mkl into recipe-sysroot but they are
in /opt and this directory is not used by default to find
libraries
I think it was originally done because the oneAPI installer installs
everything in /opt right now and it also installs libraries which may
or may not already be installed in the system in standard locations
(like tbb, opencv).
I looked at mkl and it doesn't look like it installs any such library
so we can probably change at least mkl to have it installed properly.
* even if I convince pytorch to look for the library in the
correct location, it stil looks for mkl_cblas.h which is
not present in the intel-oneapi-mkl package.
It seems this header is in intel-oneapi-mkl-common-devel so that might
also need to be fetched and installed.
Can you please check if this helps?
Yes, thank you, it seems to help. The set of changes are:
* /opt is added to SYSROOT_DIRS
* the common-devel deb package is added to SRC_URI
* library files are symlinked to ${libdir}
* header files are symlinked to ${includedir}
This way, pytorch can pick up the presence of MKL.
Now it complains about CUDA being missing but I can
disable this and work from there.
I will send the RFC patch for the mkl recipe.
For the future, since the Arc GPU may not be limited
to x86-64 machines, it would really be better if
MKL is compiled from sources and installed into
standard locations.
Thanks,
Zoltán Böszörményi
Thanks,
Anuj
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7615):
https://lists.yoctoproject.org/g/meta-intel/message/7615
Mute This Topic: https://lists.yoctoproject.org/mt/92895333/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-intel/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-