Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XDNA drivers for other linux distros #276

Open
rohitnanda1443 opened this issue Oct 2, 2024 · 8 comments
Open

XDNA drivers for other linux distros #276

rohitnanda1443 opened this issue Oct 2, 2024 · 8 comments

Comments

@rohitnanda1443
Copy link

Hi,

can this be used with other distros (such as Gentoo). The automated scripts all seem to use apt and fails.

@maxzhen
Copy link
Collaborator

maxzhen commented Oct 2, 2024

We have not tried other distros than Ubuntu. The driver mostly depends on Linux kernel, but packaging and scripts might be distro specific, yes.

@rohitnanda1443
Copy link
Author

I am more than happy to try it on Gentoo, if someone can help.
Kernel: 6.6.47 and 6.6.51 (build with all the requirements for XDNA)

I have a ryzen 8700G / 780m with 64GB RAM.

@rohitnanda1443
Copy link
Author

Installation of XRT drivers crashes. Does not give much info:

[ 23%] Building CXX object runtime_src/core/common/api/CMakeFiles/core_common_api_library_objects.dir/xrt_xclbin.cpp.o
[ 23%] Building CXX object runtime_src/core/common/api/CMakeFiles/core_common_api_library_objects.dir/aie/xrt_graph.cpp.o
[ 23%] Built target sw_emu_objects
[ 24%] Built target core_common_library_objects
[ 24%] Built target core_common_api_library_objects
[ 24%] Built target core_pcielinux_objects
make: *** [Makefile:166: all] Error 2

real 0m15.619s
user 2m39.851s
sys 0m13.742s

@jalmillateguiRPA
Copy link

Hi All, I'm compiling the driver in manjaro running kernel 6.11: see the following data specs:


OS: Manjaro Linux x86_64
Host: Venus series
Kernel: 6.11.2-4-MANJARO
Uptime: 23 hours, 50 mins
Packages: 1477 (pacman), 14 (flatpak)
Shell: bash 5.2.37
Resolution: 3840x2160
Terminal: /dev/pts/3
CPU: AMD Ryzen 9 7940HS w/ Radeon 780M Graphics (16) @ 5.263GHz
GPU: AMD ATI c5:00.0 Phoenix1
Memory: 4215MiB / 25837MiB

and apart from having to solve dependencies manually I get to the following section:

[ 77%] Building CXX object test/shim_test/CMakeFiles/shim_test.elf.dir/io.cpp.o
[ 77%] Building CXX object test/shim_test/CMakeFiles/shim_test.elf.dir/umq_tests.cpp.o
[ 77%] Built target xrt_core
[ 77%] Building CXX object src/shim/CMakeFiles/xrt_driver_xdna.dir/bo.cpp.o
In file included from xdna-driver/src/shim/hwctx.h:13,
from xdna-driver/src/shim/bo.h:8,
from xdna-driver/src/shim/bo.cpp:4:
xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:9:10: fatal error: drm/drm.h: No such file or directory
9 | #include <drm/drm.h>
| ^~~~~~~~~~~
compilation terminated.
make[2]: *** [src/shim/CMakeFiles/xrt_driver_xdna.dir/build.make:76: src/shim/CMakeFiles/xrt_driver_xdna.dir/bo.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1748: src/shim/CMakeFiles/xrt_driver_xdna.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 81%] Linking CXX executable xrt_test.elf
[ 81%] Built target xrt_test.elf
[ 86%] Linking CXX executable shim_test.elf
[ 86%] Built target shim_test.elf
make: *** [Makefile:156: all] Error 2

From what I can see, the amdxdna_accel.h has a reference to drm but it can't find it on the path.... am I missing something???

@mamin506
Copy link
Contributor

mamin506 commented Nov 7, 2024

Hi All, I'm compiling the driver in manjaro running kernel 6.11: see the following data specs:

OS: Manjaro Linux x86_64 Host: Venus series Kernel: 6.11.2-4-MANJARO Uptime: 23 hours, 50 mins Packages: 1477 (pacman), 14 (flatpak) Shell: bash 5.2.37 Resolution: 3840x2160 Terminal: /dev/pts/3 CPU: AMD Ryzen 9 7940HS w/ Radeon 780M Graphics (16) @ 5.263GHz GPU: AMD ATI c5:00.0 Phoenix1 Memory: 4215MiB / 25837MiB

and apart from having to solve dependencies manually I get to the following section:

[ 77%] Building CXX object test/shim_test/CMakeFiles/shim_test.elf.dir/io.cpp.o [ 77%] Building CXX object test/shim_test/CMakeFiles/shim_test.elf.dir/umq_tests.cpp.o [ 77%] Built target xrt_core [ 77%] Building CXX object src/shim/CMakeFiles/xrt_driver_xdna.dir/bo.cpp.o In file included from xdna-driver/src/shim/hwctx.h:13, from xdna-driver/src/shim/bo.h:8, from xdna-driver/src/shim/bo.cpp:4: xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:9:10: fatal error: drm/drm.h: No such file or directory 9 | #include <drm/drm.h> | ^~~~~~~~~~~ compilation terminated. make[2]: *** [src/shim/CMakeFiles/xrt_driver_xdna.dir/build.make:76: src/shim/CMakeFiles/xrt_driver_xdna.dir/bo.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:1748: src/shim/CMakeFiles/xrt_driver_xdna.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 81%] Linking CXX executable xrt_test.elf [ 81%] Built target xrt_test.elf [ 86%] Linking CXX executable shim_test.elf [ 86%] Built target shim_test.elf make: *** [Makefile:156: all] Error 2

From what I can see, the amdxdna_accel.h has a reference to drm but it can't find it on the path.... am I missing something???

On Ubuntu, there is a linux-libc-dev package which will install drm header to /usr/include/drm folder. Not sure if there is similar package for other distros.

@mamin506
Copy link
Contributor

mamin506 commented Nov 7, 2024

Installation of XRT drivers crashes. Does not give much info:

[ 23%] Building CXX object runtime_src/core/common/api/CMakeFiles/core_common_api_library_objects.dir/xrt_xclbin.cpp.o [ 23%] Building CXX object runtime_src/core/common/api/CMakeFiles/core_common_api_library_objects.dir/aie/xrt_graph.cpp.o [ 23%] Built target sw_emu_objects [ 24%] Built target core_common_library_objects [ 24%] Built target core_common_api_library_objects [ 24%] Built target core_pcielinux_objects make: *** [Makefile:166: all] Error 2

real 0m15.619s user 2m39.851s sys 0m13.742s

This is more like failing at build XRT library. Maybe you haven't installed all the dependencies that XRT needed.

@rum0r
Copy link

rum0r commented Nov 26, 2024

We have not tried other distros than Ubuntu. The driver mostly depends on Linux kernel, but packaging and scripts might be distro specific, yes.

Definitely would like support for other distros like Fedora.

@harrisonvanderbyl
Copy link

@rum0r #304
Please try this, it worked for me,
just note what dependencies you missed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants