Skip to content

Update manual ops for new codegen #196

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 1 commit into from
Jan 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3433,7 +3433,7 @@ public <U extends TType> OneHot<U> oneHot(Operand<? extends TNumber> indices,
* @return a constant tensor initialized with ones
* @throws IllegalArgumentException if the tensor type or shape cannot be initialized with ones.
*/
public <T extends TType, U extends TNumber> Ones<T> ones(Operand<U> dims, Class<T> type) {
public <T extends TType> Ones<T> ones(Operand<? extends TNumber> dims, Class<T> type) {
return Ones.create(scope, dims, type);
}

Expand Down Expand Up @@ -7674,7 +7674,7 @@ public <T extends TType> XlaSpmdShardToFullShape<T> xlaSpmdShardToFullShape(Oper
* @return a constant tensor initialized with zeros
* @throws IllegalArgumentException if the tensor type or shape cannot be initialized with zeros.
*/
public <T extends TType, U extends TNumber> Zeros<T> zeros(Operand<U> dims, Class<T> type) {
public <T extends TType> Zeros<T> zeros(Operand<? extends TNumber> dims, Class<T> type) {
return Zeros.create(scope, dims, type);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public final class Ones<T extends TType> implements Op, Operand<T> {
* @throws IllegalArgumentException if the tensor type or shape cannot be initialized with ones.
*/
@Endpoint
public static <T extends TType, U extends TNumber> Ones<T> create(Scope scope, Operand<U> dims, Class<T> type) {
public static <T extends TType> Ones<T> create(Scope scope, Operand<? extends TNumber> dims, Class<T> type) {
Scope onesScope = scope.withSubScope("Ones");
if (type == TString.class) {
throw new IllegalArgumentException("Can't create Ones of String DataType");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public final class Zeros<T extends TType> implements Op, Operand<T> {
*/
@Endpoint
@SuppressWarnings("unchecked")
public static <T extends TType, U extends TNumber> Zeros<T> create(Scope scope, Operand<U> dims, Class<T> type) {
public static <T extends TType> Zeros<T> create(Scope scope, Operand<? extends TNumber> dims, Class<T> type) {
Scope zerosScope = scope.withSubScope("Zeros");
Operand<T> zero;
if (type == TString.class) {
Expand Down