Skip to content
Open
Show file tree
Hide file tree
Changes from 11 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 @@ -240,6 +240,25 @@ public boolean hasJitCompileParam() {
public boolean hasReduceRetracingParam() {
return this.reduceRetracingParamExists;
}

/**
* True iff this {@link Function}'s {@link decoratorsType} has parameter experimental_compile.
*
* @return True iff this {@link Function} has parameter experimental_compile.
*/
public boolean hasExperimentalCompileParam() {
return this.jitCompileParamExists;
}

/**
* True iff this {@link Function}'s {@link decoratorsType} has parameter experimental_relax_shapes.
*
* @return True iff this {@link Function} has parameter experimental_relax_shapes.
*/
public boolean hasExperimentalRelaxShapesParam() {
return this.reduceRetracingParamExists;
}

}

private static final String TF_FUNCTION_FQN = "tensorflow.python.eager.def_function.function";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,7 @@ public void testComputeParameters() throws Exception {

assertTrue(!args.hasFuncParam() && args.hasInputSignatureParam() & !args.hasAutoGraphParam() && !args.hasJitCompileParam()
&& !args.hasReduceRetracingParam() && !args.hasExperimentalImplementsParam() && !args.hasExperimentalAutographOptParam()
&& !args.hasExperimentalRelaxShapesParam() && !args.hasExperimentalCompileParam()
&& !args.hasExperimentalFollowTypeHintsParam());
}

Expand All @@ -608,6 +609,7 @@ public void testComputeParameters2() throws Exception {

assertTrue(!args.hasFuncParam() && !args.hasInputSignatureParam() & !args.hasAutoGraphParam() && !args.hasJitCompileParam()
&& !args.hasReduceRetracingParam() && !args.hasExperimentalImplementsParam() && args.hasExperimentalAutographOptParam()
&& !args.hasExperimentalRelaxShapesParam() && !args.hasExperimentalCompileParam()
&& !args.hasExperimentalFollowTypeHintsParam());
}

Expand All @@ -629,6 +631,7 @@ public void testComputeParameters3() throws Exception {

assertTrue(!args.hasFuncParam() && !args.hasInputSignatureParam() & !args.hasAutoGraphParam() && !args.hasJitCompileParam()
&& !args.hasReduceRetracingParam() && !args.hasExperimentalImplementsParam() && !args.hasExperimentalAutographOptParam()
&& !args.hasExperimentalRelaxShapesParam() && !args.hasExperimentalCompileParam()
&& args.hasExperimentalFollowTypeHintsParam());
}

Expand All @@ -650,6 +653,7 @@ public void testComputeParameters4() throws Exception {

assertTrue(!args.hasFuncParam() && !args.hasInputSignatureParam() & !args.hasAutoGraphParam() && !args.hasJitCompileParam()
&& !args.hasReduceRetracingParam() && args.hasExperimentalImplementsParam() && !args.hasExperimentalAutographOptParam()
&& !args.hasExperimentalRelaxShapesParam() && !args.hasExperimentalCompileParam()
&& !args.hasExperimentalFollowTypeHintsParam());
}

Expand All @@ -671,6 +675,7 @@ public void testComputeParameters5() throws Exception {

assertTrue(!args.hasFuncParam() && !args.hasInputSignatureParam() & !args.hasAutoGraphParam() && args.hasJitCompileParam()
&& !args.hasReduceRetracingParam() && !args.hasExperimentalImplementsParam() && !args.hasExperimentalAutographOptParam()
&& !args.hasExperimentalRelaxShapesParam() && args.hasExperimentalCompileParam()
&& !args.hasExperimentalFollowTypeHintsParam());
}

Expand All @@ -690,6 +695,7 @@ public void testComputeParameters6() throws Exception {

assertTrue(!args.hasFuncParam() && !args.hasInputSignatureParam() & !args.hasAutoGraphParam() && !args.hasJitCompileParam()
&& args.hasReduceRetracingParam() && !args.hasExperimentalImplementsParam() && !args.hasExperimentalAutographOptParam()
&& args.hasExperimentalRelaxShapesParam() && !args.hasExperimentalCompileParam()
&& !args.hasExperimentalFollowTypeHintsParam());
}

Expand All @@ -711,6 +717,7 @@ public void testComputeParameters7() throws Exception {

assertTrue(!args.hasFuncParam() && !args.hasInputSignatureParam() & args.hasAutoGraphParam() && !args.hasJitCompileParam()
&& !args.hasReduceRetracingParam() && !args.hasExperimentalImplementsParam() && !args.hasExperimentalAutographOptParam()
&& !args.hasExperimentalRelaxShapesParam() && !args.hasExperimentalCompileParam()
&& !args.hasExperimentalFollowTypeHintsParam());
}

Expand All @@ -732,6 +739,7 @@ public void testComputeParameters8() throws Exception {

assertTrue(!args.hasFuncParam() && !args.hasInputSignatureParam() & !args.hasAutoGraphParam() && !args.hasJitCompileParam()
&& !args.hasReduceRetracingParam() && !args.hasExperimentalImplementsParam() && !args.hasExperimentalAutographOptParam()
&& !args.hasExperimentalRelaxShapesParam() && !args.hasExperimentalCompileParam()
&& !args.hasExperimentalFollowTypeHintsParam());
}

Expand All @@ -753,6 +761,7 @@ public void testComputeParameters9() throws Exception {

assertTrue(!args.hasFuncParam() && args.hasInputSignatureParam() & args.hasAutoGraphParam() && !args.hasJitCompileParam()
&& !args.hasReduceRetracingParam() && !args.hasExperimentalImplementsParam() && !args.hasExperimentalAutographOptParam()
&& !args.hasExperimentalRelaxShapesParam() && !args.hasExperimentalCompileParam()
&& !args.hasExperimentalFollowTypeHintsParam());
}

Expand Down Expand Up @@ -800,6 +809,7 @@ public void testComputeParameters11() throws Exception {

assertTrue(!args.hasFuncParam() && !args.hasInputSignatureParam() & args.hasAutoGraphParam() && !args.hasJitCompileParam()
&& !args.hasReduceRetracingParam() && !args.hasExperimentalImplementsParam() && !args.hasExperimentalAutographOptParam()
&& !args.hasExperimentalRelaxShapesParam() && !args.hasExperimentalCompileParam()
&& !args.hasExperimentalFollowTypeHintsParam());

}
Expand All @@ -822,6 +832,7 @@ public void testComputeParameters12() throws Exception {

assertTrue(!args.hasFuncParam() && !args.hasInputSignatureParam() & !args.hasAutoGraphParam() && args.hasJitCompileParam()
&& !args.hasReduceRetracingParam() && !args.hasExperimentalImplementsParam() && !args.hasExperimentalAutographOptParam()
&& !args.hasExperimentalRelaxShapesParam() && args.hasExperimentalCompileParam()
&& !args.hasExperimentalFollowTypeHintsParam());

}
Expand Down