Skip to content

Correct the example in the "Adding JAX and Numba support for Ops" doc #670

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

Closed
wants to merge 1 commit into from

Conversation

jkunimune
Copy link

Description

As it was written, this example demonstrating how to add JAX support for the Eye Op threw a type error, because it registered with JAX a function that only takes a single argument op, which is actually called with the keyword arguments node and output_storage as well. Adding a **kwargs to the function signature resolves this, and is also what the existing Jaxified Ops mostly seem to do.

Type of change

  • New feature / enhancement
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):

This example as it was threw a type error because the registered function is called with `node` and `output_storage` keyword arguments, which were not included in the function signature.  Adding a `**kwargs` argument resolves this, and is also what the existing Jaxified Ops all seem to do.
@ricardoV94
Copy link
Member

Check out #654 (comment)

@ricardoV94
Copy link
Member

Closing in favor of #687

@ricardoV94 ricardoV94 closed this Apr 2, 2024
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

Successfully merging this pull request may close these issues.

2 participants