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

Compatibility Issue: NumPy 2.0+ Causes Errors in Triton Interpret Mode #1

Closed
justcyl opened this issue Nov 12, 2024 · 1 comment
Closed

Comments

@justcyl
Copy link

justcyl commented Nov 12, 2024

Description:
Running Triton in interpret mode (TRITON_INTERPRET=1) with NumPy 2.0 or higher can lead to unexpected errors. Downgrading NumPy to a version below 2.0 (e.g., 1.21.x or 1.22.x) resolves these issues.

Steps to Fix:

  1. Check your NumPy version:
    pip show numpy
  2. If numpy >= 2.0, downgrade with:
    pip install numpy<2.0
@justcyl justcyl closed this as completed Nov 12, 2024
@SiriusNEO
Copy link
Owner

SiriusNEO commented Nov 12, 2024

I use numpy==2.1.2 and don't meet errors. It may also have something to do with the version of torch and triton.

Update: After a few attempts, I realized that this is indeed a compatibility issue, which may be related to the adaptation between numpy2.0 and triton.

I found two usable combinations of versions, which are:

Solution 1: Downgrade numpy to 1.26.4:

torch==2.5.0
triton==3.1.0
numpy==1.26.4

Solution 2: Use the latest nightly Triton in Github (Build it from source)

torch==2.5.0
triton==3.2.0
numpy==2.1.2

Related Issues: triton-lang/triton#4730

owlxiao added a commit to owlxiao/Triton-Puzzles-Lite that referenced this issue Jan 20, 2025
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

2 participants