-
Notifications
You must be signed in to change notification settings - Fork 17
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
importing bitsandbytes results in "No module named 'triton.ops'" (gfx1101 + Fedora 40) #202
Comments
Thanks for the feedback! I will try that also little later when I have more time. I am not sure whether I have actually tried to use the bitsandbytes by myself, so it's possible that something does not get installed. |
I know I've compiled a working version of BNB for this GPU on a previous Fedora 39 installation. |
I have tried a following test app:
When I run it, it can import the BitsAndBytesConfig but then it will throw an error when executing the last line:
Do you get same error? Or could you give me some other example to test? I remember seeing this "triton.ops" error also sometime earlier but I thought I had resolved it. It could be a some kind of dependency error (wrong version) between python libraries. |
I think I managed to hack it to work at least with my test code above. The problem seems to be that the pytorch 2.4 and bitsandbytes are not fully compatible with the new triton versions. I noticed 2 problems:
/opt/rocm_sdk_612/lib/python3.11/site-packages/bitsandbytes/triton/int8_matmul_rowwise_dequantize.py
and /opt/rocm_sdk_612/lib/python3.11/site-packages/bitsandbytes/triton/int8_matmul_mixed_dequantize.py
I also tested with the latest upstream bitsandbytes version by building it from the multi-backend-refactor branch which has AMD support and verified that it has the same problem. I will now try to to do a proper/better fix for these problems to rocm_sdk_builder by adding patches later on today. |
And I created a bug also to upstream bitsandbytes about this error: |
File "/opt/rocm_sdk_612/lib/python3.11/dataclasses.py", line 1246, in fields raise TypeError('must be called with a dataclass type or instance') from None TypeError: must be called with a dataclass type or instance fixes: #202 Signed-off-by: Mika Laitio <[email protected]>
- newest triton versions does not anymore have the triton.ops.matmul_perf_model, so this checks it's existence in addition of checking the triton existence fixes: #202 Signed-off-by: Mika Laitio <[email protected]>
- newest triton versions does not anymore have the triton.ops.matmul_perf_model, so this checks it's existence in addition of checking the triton existence fixes: #202 Signed-off-by: Mika Laitio <[email protected]>
I pushed the fix in if you want to test. You should get it by running ./babs.sh -up |
Hey, sorry for the late reply. Best Regards |
No problem, I will close this now. And thanks for pointing this out, if you notice some other issues, let me know. |
Hey, I "just" finished compiling everything a couple days ago and from what I've tried most seems to be working.
I tried manually importing bitsandbytes with
import bitsandbytes
, but it results in error.Sorry if I'm missing something obvious and thank you in advance.
The text was updated successfully, but these errors were encountered: