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

Replacing deprecated XLA translation rules with MLIR lowering rules #21

Merged
merged 3 commits into from
Oct 31, 2023
Merged
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions src/jax_finufft/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def batch(args, axes, *, output_shape, **kwargs):
nufft1_p.def_abstract_eval(shapes.abstract_eval)
mlir.register_lowering(nufft1_p, partial(lowering.lowering, "cpu"), platform="cpu")
if lowering.jax_finufft_gpu is not None:
mlir.register_lowering(nufft1_p, partial(lowering.lowering, "cpu"), platform="gpu")
mlir.register_lowering(nufft1_p, partial(lowering.lowering, "gpu"), platform="gpu")
ad.primitive_jvps[nufft1_p] = partial(jvp, nufft1_p)
ad.primitive_transposes[nufft1_p] = transpose
batching.primitive_batchers[nufft1_p] = batch
Expand All @@ -194,7 +194,7 @@ def batch(args, axes, *, output_shape, **kwargs):
nufft2_p.def_abstract_eval(shapes.abstract_eval)
mlir.register_lowering(nufft2_p, partial(lowering.lowering, "cpu"), platform="cpu")
if lowering.jax_finufft_gpu is not None:
mlir.register_lowering(nufft2_p, partial(lowering.lowering, "cpu"), platform="gpu")
mlir.register_lowering(nufft2_p, partial(lowering.lowering, "gpu"), platform="gpu")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lgarrison — Doh! I think I found the issue lol

ad.primitive_jvps[nufft2_p] = partial(jvp, nufft2_p)
ad.primitive_transposes[nufft2_p] = transpose
batching.primitive_batchers[nufft2_p] = batch
Loading