Generate op input and attribute accessors#302
Conversation
|
The formatting issues were since my IDE somehow got off google-java-format. I have the plugin now, which added some things that weren't in the XML. |
002fa85 to
faca5f4
Compare
|
Looks like the javadoc reformatting is still present |
|
Yeah, that happened when I applied the google-java-format plugin, and it matches the spec. Idk why the XML format didn't do it, I can revert to that. We really should set up some kind of CI formatter, I keep getting burnt by this. I haven't had time to look at it much but one of the plugins you linked in the lint PR looked like it did ktlint too (although it had a bug), that would be nice since we could to the Kotlin API in the same plugin. |
4436f16 to
e3f4561
Compare
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
Signed-off-by: Ryan Nett <JNett96@gmail.com>
Signed-off-by: Ryan Nett <JNett96@gmail.com>
Signed-off-by: Ryan Nett <JNett96@gmail.com>
Signed-off-by: Ryan Nett <JNett96@gmail.com>
Signed-off-by: Ryan Nett <JNett96@gmail.com>
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
Signed-off-by: Ryan Nett <JNett96@gmail.com>
a32b212 to
0895e48
Compare
|
Reminder for myself: run generation before merging! I'm going to work on a CI test for that. |
|
FYI @karllessard I'm going to be out of town most of the next 2 weeks or so. I might have time to follow up on these PRs, but I'm not sure. Feel free to take things over. I should at least be able to reply to comments. |
Signed-off-by: Ryan Nett <JNett96@gmail.com>
Signed-off-by: Ryan Nett <JNett96@gmail.com>
Signed-off-by: Ryan Nett <JNett96@gmail.com>
Signed-off-by: Ryan Nett <JNett96@gmail.com>
|
@rnett , can you please fix the conflict with |
|
Let me generate the op files first, too. |
|
I've been toying with the idea of a CI check that checks |
That's interesting, indeed! Shouldn't be hard to do. Though it looks like we still have this non-deterministic order of the |
Signed-off-by: Ryan Nett <JNett96@gmail.com>
|
Yeah, good point, I'll look at that first. |
|
Looks good, I've just merged another PR (#388) though so I'll wait that one to complete building before merging this one. |
|
@rnett , I've just realized that we forgot to a CI build round on this PR before merging it... :( Failing on Windows: https://github.com/tensorflow/java/runs/3908491275?check_suite_focus=true It fails on Linux too but it looks more like a bug we are having with the Bazel cache and that was happening before. CC\ @saudet |
|
I think I know what that is, I just need to skip a bunch of things that aren't exported on windows. |
This adds a nested class to the generated op classes that contains typesafe (and not quite type safe) accessors for the op inputs and attributes. It's only supported for graph ops at the moment, but it will eventually support
ForwardOperations as well (from the eager gradient support). The main use for this is defining custom gradients, whether it's the legacy graph gradients or the new gradient API.I haven't committed the generated outputs to make it easier to review, I'll do so after approval or in another PR.