-
Notifications
You must be signed in to change notification settings - Fork 215
Move op generation to Java #244
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
Merged
Merged
Changes from all commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
edbcd4e
Generate op def file
rnett f03198e
Cleanup, nicer usage header
rnett 487bc67
Move resource, fix generation
rnett f8dfc91
Better commenting and usage header
rnett 3f1dbb0
Copy ops.pb into platform jar
rnett 41dfa08
Don't copy generated ops file, leave in git
rnett 5c4551d
Move proto sources to separate source dir
rnett 151aff1
Duplicate protos instead of sharing
rnett b9990d0
Start of Java-side op generation
rnett bff2806
Fixes for generation
rnett 30f05df
More fixes, some code cleanup
rnett 60cd127
Cleanup
rnett 41f9b8f
Fix module name
rnett 370a35b
Error if on non-linux OS
rnett c7f80a3
A couple more fixes, mostly to use Long
rnett 11d5628
Move type stuff to the type resolver
rnett 71a8444
Missed a final
rnett d2f7f48
Try build fix
rnett b261bbe
Build updates, new package
rnett 1cc81c7
Commit the build updates
rnett 2d8ef31
Really fix build
rnett 120a63b
Rebuild
rnett f24a091
Don't fail on javadoc error
rnett 8ace759
Ignore IDEA run configs dir
rnett 756d6b1
Allow non-Linux OSs
rnett 2f2d420
Clean up code, add comments
rnett 18bd5d2
Bump version after rebase
rnett 065f5e8
Move op generator to tensorflow-core-generator, use exported op defs
rnett 6e0ed0e
Fixes
rnett bca4315
Formatting fix
rnett 567e4c1
Package name constants
rnett 4099c10
Add exec plugin
rnett af71cc6
Rebase fix
rnett 1882816
Clean up javadoc generation
rnett 04e2699
Remove Java 11 API
rnett 31e7d2c
Duplicate protos instead of sharing
rnett bf993dd
Remove rebase newline
rnett 533c241
Add a few missed javadoc conversions
rnett 8a18d37
Add commonmark-java
JimClarke5 003c888
Fix @compatability and @end_compatibility to add <br>
JimClarke5 3fdee84
Add checks for summary and description when empty, them provide defau…
JimClarke5 973cffb
Reformat code.
JimClarke5 29a9155
Reformat code.
JimClarke5 65b59a7
Reformat code.
JimClarke5 04e0cb3
Reformat code.
JimClarke5 f1a0239
Reformat code.
JimClarke5 3f8cf73
Reformat code.
JimClarke5 f6b9245
Add unused to renderCodeBlock for unused parameter attributes.
JimClarke5 e96e9a8
Fix merge and a few newline nits
rnett e610e79
Merge fixes
rnett cdc2e8a
Keep only necessary protos
rnett a6b389d
Add license header
rnett 0f9eb71
Move generator execution to core-api
rnett 6a09b43
pom comment
rnett File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
tensorflow-core/tensorflow-core-generator/src/main/java/org/tensorflow/Names.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/* | ||
Copyright 2021 The TensorFlow Authors. All Rights Reserved. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
============================================================================== | ||
*/ | ||
package org.tensorflow; | ||
|
||
import com.squareup.javapoet.ClassName; | ||
import com.squareup.javapoet.ParameterizedTypeName; | ||
import com.squareup.javapoet.TypeName; | ||
|
||
public class Names { | ||
|
||
public static final String TensorflowPackage = "org.tensorflow"; | ||
public static final String OpPackage = TensorflowPackage + ".op"; | ||
public static final String TypesPackage = TensorflowPackage + ".types"; | ||
|
||
public static final ClassName Operator = ClassName.get(OpPackage + ".annotation", "Operator"); | ||
public static final ClassName Endpoint = ClassName.get(OpPackage + ".annotation", "Endpoint"); | ||
|
||
public static final ClassName TType = ClassName.get(TypesPackage + ".family", "TType"); | ||
public static final ClassName TString = ClassName.get(TypesPackage, "TString"); | ||
public static final ClassName TBool = ClassName.get(TypesPackage, "TBool"); | ||
|
||
public static final ClassName TNumber = ClassName.get(TypesPackage + ".family", "TNumber"); | ||
|
||
public static final ClassName TFloating = ClassName.get(TypesPackage + ".family", "TFloating"); | ||
public static final ClassName TBfloat16 = ClassName.get(TypesPackage, "TBfloat16"); | ||
public static final ClassName TFloat16 = ClassName.get(TypesPackage, "TFloat16"); | ||
public static final ClassName TFloat32 = ClassName.get(TypesPackage, "TFloat32"); | ||
public static final ClassName TFloat64 = ClassName.get(TypesPackage, "TFloat64"); | ||
|
||
public static final ClassName TIntegral = ClassName.get(TypesPackage + ".family", "TIntegral"); | ||
public static final ClassName TUint8 = ClassName.get(TypesPackage, "TUint8"); | ||
public static final ClassName TInt32 = ClassName.get(TypesPackage, "TInt32"); | ||
public static final ClassName TInt64 = ClassName.get(TypesPackage, "TInt64"); | ||
|
||
public static final TypeName Op = ClassName.get(OpPackage, "Op"); | ||
public static final ClassName RawOp = ClassName.get(OpPackage, "RawOp"); | ||
public static final ClassName Operation = ClassName.get(TensorflowPackage, "Operation"); | ||
public static final ClassName Operands = ClassName.get(OpPackage, "Operands"); | ||
public static final ClassName OperationBuilder = ClassName.get(TensorflowPackage, "OperationBuilder"); | ||
public static final TypeName IterableOp = ParameterizedTypeName.get(ClassName.get(Iterable.class), Op); | ||
|
||
public static final ClassName Operand = ClassName.get(TensorflowPackage, "Operand"); | ||
public static final ClassName Output = ClassName.get(TensorflowPackage, "Output"); | ||
|
||
public static final ClassName Shape = ClassName.get(TensorflowPackage + ".ndarray", "Shape"); | ||
public static final ClassName Tensor = ClassName.get(TensorflowPackage, "Tensor"); | ||
public static final ClassName ConcreteFunction = ClassName.get(TensorflowPackage, "ConcreteFunction"); | ||
|
||
public static final ClassName Scope = ClassName.get(OpPackage, "Scope"); | ||
public static final TypeName DeviceSpec = ClassName.get(TensorflowPackage, "DeviceSpec"); | ||
public static final ClassName Ops = ClassName.get(OpPackage, "Ops"); | ||
|
||
public static final TypeName ExecutionEnvironment = | ||
ClassName.get(TensorflowPackage, "ExecutionEnvironment"); | ||
public static final TypeName EagerSession = ClassName.get(TensorflowPackage, "EagerSession"); | ||
|
||
public static final TypeName String = ClassName.get(String.class); | ||
|
||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.