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

Improve the error message when jaxlib is installed without GPU support. #296

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion jax_triton/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,16 @@
from jax_triton.version import __version__
from jax_triton.version import __version_info__

get_compute_capability = gpu_triton.get_compute_capability
try:
get_compute_capability = gpu_triton.get_compute_capability
except AttributeError:
raise ImportError(
"jax-triton requires JAX to be installed with GPU support. The "
"installation page on the JAX documentation website includes "
"instructions for installing a supported version:\n"
"https://jax.readthedocs.io/en/latest/installation.html"
)

if jaxlib.version.__version_info__ >= (0, 4, 14):
try:
get_serialized_metadata = gpu_triton.get_serialized_metadata
Expand Down