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

Tinygrad can't find libhsa because hardcoded /lib in the code. #4168

Open
stalkerg opened this issue Apr 14, 2024 · 1 comment
Open

Tinygrad can't find libhsa because hardcoded /lib in the code. #4168

stalkerg opened this issue Apr 14, 2024 · 1 comment

Comments

@stalkerg
Copy link
Contributor

stalkerg commented Apr 14, 2024

By this line https://github.com/tinygrad/tinygrad/blob/master/tinygrad/runtime/autogen/hsa.py#L32C92-L32C98 they try to find lib by /lib/libhsa-runtime64.so inside ROCM_PATH, but on my system (Gentoo) this file in lib64 - /usr/lib64/libhsa-runtime64.so .

I don't think we should use absolute path in that case, it should be follow by ld.so

UPDATE: this as well https://github.com/tinygrad/tinygrad/blob/master/tinygrad/runtime/autogen/comgr.py#L32

@stalkerg
Copy link
Contributor Author

We can use --print-file-name to find path to lib:

$: gcc --print-file-name=libhsa-runtime64.so
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../lib64/libhsa-runtime64.so

$: clang --print-file-name=libhsa-runtime64.so
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../lib64/libhsa-runtime64.so

@stalkerg stalkerg changed the title Tinycrad can't find libhsa because hardcoded /lib in the code. Tinygrad can't find libhsa because hardcoded /lib in the code. Apr 14, 2024
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

1 participant