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

User defined operation #836

Open
Francis235 opened this issue May 24, 2024 · 2 comments
Open

User defined operation #836

Francis235 opened this issue May 24, 2024 · 2 comments

Comments

@Francis235
Copy link

How should I add a new operator?

@balisujohn
Copy link
Contributor

You might want to first ask by creating an issue or discussion question to make sure there isn't a way to do what you want with existing operators. If there isn't, I'd recommend copying the code of an operator with the same number of arguments and creating a new OP with a different name with the exact same behavior to start. Then you can change the behavior to match what you want. Here is an example of a recent PR that adds a new OP #806, you can look at the diff to see what kind of changes you need to make,

@Francis235
Copy link
Author

Thanks for your suggestion.

You might want to first ask by creating an issue or discussion question to make sure there isn't a way to do what you want with existing operators. If there isn't, I'd recommend copying the code of an operator with the same number of arguments and creating a new OP with a different name with the exact same behavior to start. Then you can change the behavior to match what you want. Here is an example of a recent PR that adds a new OP #806, you can look at the diff to see what kind of changes you need to make,

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