-
Notifications
You must be signed in to change notification settings - Fork 537
Improve the documentation of custom op build #4719
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
Comments
Hi everyone, thanks for inviting me to provide feedback and propose documentation changes! TLDR: proposition: create an editable template with placeholder custom op to edit step-by-step to integrate one's kernel. In general, I feel like the process of fully integrating custom kernels takes a lot of steps:
To get any feedback on whether what you're writing works you need to either:
It's a lot of steps to take with virtually no feedback. As such, I believe it would make sense to construct a demo with all of those steps implemented for a placeholder function, model and clear instructions on what to edit to replace them with one's custom ops. That way, people will be able to integrate their solution one step at a time (first editing the kernel code, then linking additional libraries, then changing signatures, then editing the Python level code) with clear feedback on what change caused things to stop working end-to-end. This would make debugging and error interpretation much easier than just a bunch of text describing what needs to be done from scratch. From my experience, I spent a lot of time backtracking because I didn't realize that some things were meant to be written, compiled or linked in a specific manner from the very start, and a preexisting template would seemingly solve that problem. |
@BlackSamorez Thanks for providing the detailed feedback! Definitely agree that ExecuTorch should provide good examples for users to follow. We have a custom ops example folder https://github.com/pytorch/executorch/blob/main/examples/portable/custom_ops/README.md but it was using old yaml based API. We will definitely add a new example for |
Thanks for the great feedback @BlackSamorez ! Just to call out that contribution to ExecuTorch code base is more than welcome. Feel free to submit PRs for improvements! |
@BlackSamorez #5297 is merged. Can you take a look and let us know if this is helpful? |
Closing this issue as #5297 been landed. |
📚 The doc issue
Based on feedback in https://blacksamorez.substack.com/p/aqlm-executorch-android, it would be great to improve our documentation page, https://pytorch.org/executorch/stable/kernel-library-custom-aten-kernel.html.
Suggest a potential alternative/fix
No response
The text was updated successfully, but these errors were encountered: