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

Building the shim without the kernel driver #342

Open
om26er opened this issue Jan 3, 2025 · 6 comments
Open

Building the shim without the kernel driver #342

om26er opened this issue Jan 3, 2025 · 6 comments

Comments

@om26er
Copy link

om26er commented Jan 3, 2025

i dont want to build the kernel driver. i only need to build the shim library so that xrt could work with AMD NPU.

How do i do that?

@maxzhen
Copy link
Collaborator

maxzhen commented Jan 3, 2025

We need to add some new options to support this. Will look into it soon.

@om26er
Copy link
Author

om26er commented Jan 3, 2025

@maxzhen do we know if the xrt shim is supposed to work with amdxdna driver in the linux kernel (linux-next right now) or is that going to need some changes in the shim code as well ?

@maxzhen
Copy link
Collaborator

maxzhen commented Jan 3, 2025

It should just work. @houlz0507 can confirm.

@houlz0507
Copy link
Contributor

Yes. It works fine. And the upstream driver is a little behind. E.g. import/export BO is not supported yet in upstream driver.

@lamikr
Copy link

lamikr commented Jan 9, 2025

I have patched the upstream driver version to 6.13.rc5 and used that version on Fedora 40 with the xrt runtime and xrt-plugin driver available by this repo. At least the example_noop_test is able to detect the npu and test passes.

For firmwares I used the versions available in this xdna-driver repo. Btw, does anybody know how to get the files from /lib/firmware/amdnpu folder to be added automatically to kernel's initrd image on Fedora? When ever I do the "make install" for kernel, amdnpu firmwares does not get into initrd. To get amdnpu firmware files to initrd so that amdxdna driver will find them, I need now run this dracut command always after kernel install.

dracut -f -i /lib/firmware /lib/firmware

Maybe I am missing some dracut conf file I should edit...

@houlz0507
Copy link
Contributor

The firmwares are upstreamed. Maybe you can try clone https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/. Then build firmware package and install it.

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

4 participants