agrocylo / bitsandbytes-rocm

8-bit CUDA functions for PyTorch, ported to HIP for use in AMD GPUs
MIT License
43 stars 5 forks source link

Unabel to build missing #1

Open vladimirgeorgiev opened 1 year ago

vladimirgeorgiev commented 1 year ago

bitsandbytes-rocm/csrc/ops.hiph:15:10: fatal error: hip/hip_runtime_api.h: No such file or directory 15 | #include <hip/hip_runtime_api.h>

Spencer-Dawson commented 1 year ago

Looks like a build dependency that should be included with hiplibsdk, but I'm seeing this issue as well. Maybe we're using a different version of ROCm then agrocylo. https://git.ecker.tech/mrq/bitsandbytes-rocm builds for me, but I'd prefer a better supported fork.

Edit: There is a /opt/rocm/hip/include/hip/hip_runtime_api.h file on my system. Why it's not included in the build path I have no idea. Edit 2: It's a makefile thing. Pretty obvious now that I'm thinking about it. I'm sure I could fix that, but not tonight

vladimirgeorgiev commented 1 year ago

Yeah, I also saw that I have it in /opt/rocm/hip/include/*, but then on WSL 2.0 once I modify the makefile it gives that make has no permissions to the folder. Will wait for your commit, maybe I am doing something wrong.

npccoin commented 1 year ago

I am having the same problem. I wonder if there is a possible solution soon to be able to compile or if any dependency or something special is needed to do the compilation. Thank you.

JHalbritter commented 1 year ago

I was able to get a successful build by manually setting the ROCM_HOME environment variable before running the make command export ROCM_HOME=/opt/rocm The makefile was setting it incorrectly to "/usr"