Remove unused variables.
PiperOrigin-RevId: 254781764
This commit is contained in:
parent
e7a8ed51ee
commit
9c75b7ffd2
@ -43,7 +43,6 @@ void SetAttr(TF_Graph* graph, TF_Operation* op, const char* attr_name,
|
|||||||
|
|
||||||
void ClearAttr(TF_Graph* graph, TF_Operation* op, const char* attr_name,
|
void ClearAttr(TF_Graph* graph, TF_Operation* op, const char* attr_name,
|
||||||
TF_Status* status) {
|
TF_Status* status) {
|
||||||
AttrValue attr_val;
|
|
||||||
|
|
||||||
mutex_lock l(graph->mu);
|
mutex_lock l(graph->mu);
|
||||||
op->node.ClearAttr(attr_name);
|
op->node.ClearAttr(attr_name);
|
||||||
|
@ -88,7 +88,6 @@ absl::flat_hash_map<string, std::vector<string>> GetClusterSets(
|
|||||||
|
|
||||||
TEST(XlaCompilationTest, Chains) {
|
TEST(XlaCompilationTest, Chains) {
|
||||||
std::unique_ptr<Graph> graph(new Graph(OpRegistry::Global()));
|
std::unique_ptr<Graph> graph(new Graph(OpRegistry::Global()));
|
||||||
GraphDef graphdef;
|
|
||||||
{
|
{
|
||||||
GraphDefBuilder builder(GraphDefBuilder::kFailImmediately);
|
GraphDefBuilder builder(GraphDefBuilder::kFailImmediately);
|
||||||
Node* a =
|
Node* a =
|
||||||
@ -114,7 +113,6 @@ TEST(XlaCompilationTest, Chains) {
|
|||||||
|
|
||||||
TEST(XlaCompilationTest, UncompilableCycles) {
|
TEST(XlaCompilationTest, UncompilableCycles) {
|
||||||
std::unique_ptr<Graph> graph(new Graph(OpRegistry::Global()));
|
std::unique_ptr<Graph> graph(new Graph(OpRegistry::Global()));
|
||||||
GraphDef graphdef;
|
|
||||||
{
|
{
|
||||||
GraphDefBuilder builder(GraphDefBuilder::kFailImmediately);
|
GraphDefBuilder builder(GraphDefBuilder::kFailImmediately);
|
||||||
Node* a = ops::SourceOp("Const", builder.opts()
|
Node* a = ops::SourceOp("Const", builder.opts()
|
||||||
@ -135,7 +133,6 @@ TEST(XlaCompilationTest, UncompilableCycles) {
|
|||||||
|
|
||||||
TEST(XlaCompilationTest, CompilableCycles) {
|
TEST(XlaCompilationTest, CompilableCycles) {
|
||||||
std::unique_ptr<Graph> graph(new Graph(OpRegistry::Global()));
|
std::unique_ptr<Graph> graph(new Graph(OpRegistry::Global()));
|
||||||
GraphDef graphdef;
|
|
||||||
{
|
{
|
||||||
GraphDefBuilder builder(GraphDefBuilder::kFailImmediately);
|
GraphDefBuilder builder(GraphDefBuilder::kFailImmediately);
|
||||||
Node* a = ops::SourceOp("Const", builder.opts()
|
Node* a = ops::SourceOp("Const", builder.opts()
|
||||||
@ -157,7 +154,6 @@ TEST(XlaCompilationTest, CompilableCycles) {
|
|||||||
|
|
||||||
TEST(XlaCompilationTest, StringUnsupported) {
|
TEST(XlaCompilationTest, StringUnsupported) {
|
||||||
std::unique_ptr<Graph> graph(new Graph(OpRegistry::Global()));
|
std::unique_ptr<Graph> graph(new Graph(OpRegistry::Global()));
|
||||||
GraphDef graphdef;
|
|
||||||
{
|
{
|
||||||
GraphDefBuilder builder(GraphDefBuilder::kFailImmediately);
|
GraphDefBuilder builder(GraphDefBuilder::kFailImmediately);
|
||||||
Node* a = ops::SourceOp(
|
Node* a = ops::SourceOp(
|
||||||
@ -177,7 +173,6 @@ TEST(XlaCompilationTest, StringUnsupported) {
|
|||||||
|
|
||||||
TEST(XlaCompilationTest, HalfSupported) {
|
TEST(XlaCompilationTest, HalfSupported) {
|
||||||
std::unique_ptr<Graph> graph(new Graph(OpRegistry::Global()));
|
std::unique_ptr<Graph> graph(new Graph(OpRegistry::Global()));
|
||||||
GraphDef graphdef;
|
|
||||||
{
|
{
|
||||||
GraphDefBuilder builder(GraphDefBuilder::kFailImmediately);
|
GraphDefBuilder builder(GraphDefBuilder::kFailImmediately);
|
||||||
Tensor t(DT_HALF, TensorShape());
|
Tensor t(DT_HALF, TensorShape());
|
||||||
@ -253,7 +248,6 @@ TEST(XlaCompilationTest, FunctionCalls) {
|
|||||||
FunctionLibraryDefinition flib_def(OpRegistry::Global(), flib);
|
FunctionLibraryDefinition flib_def(OpRegistry::Global(), flib);
|
||||||
|
|
||||||
std::unique_ptr<Graph> graph(new Graph(&flib_def));
|
std::unique_ptr<Graph> graph(new Graph(&flib_def));
|
||||||
GraphDef graphdef;
|
|
||||||
{
|
{
|
||||||
GraphDefBuilder builder(GraphDefBuilder::kFailImmediately, &flib_def);
|
GraphDefBuilder builder(GraphDefBuilder::kFailImmediately, &flib_def);
|
||||||
Node* a =
|
Node* a =
|
||||||
@ -291,7 +285,6 @@ TEST(XlaCompilationTest, CallXlaDeviceFuncWithResourceOp) {
|
|||||||
FunctionLibraryDefinition flib_def(OpRegistry::Global(), flib);
|
FunctionLibraryDefinition flib_def(OpRegistry::Global(), flib);
|
||||||
|
|
||||||
std::unique_ptr<Graph> graph(new Graph(&flib_def));
|
std::unique_ptr<Graph> graph(new Graph(&flib_def));
|
||||||
GraphDef graphdef;
|
|
||||||
{
|
{
|
||||||
GraphDefBuilder builder(GraphDefBuilder::kFailImmediately, &flib_def);
|
GraphDefBuilder builder(GraphDefBuilder::kFailImmediately, &flib_def);
|
||||||
Node* resource =
|
Node* resource =
|
||||||
@ -381,7 +374,6 @@ REGISTER_OP_GRADIENT("Unsupported", UnsupportedGrad);
|
|||||||
|
|
||||||
TEST(XlaCompilationTest, SymbolicGradients) {
|
TEST(XlaCompilationTest, SymbolicGradients) {
|
||||||
std::unique_ptr<Graph> graph(new Graph(OpRegistry::Global()));
|
std::unique_ptr<Graph> graph(new Graph(OpRegistry::Global()));
|
||||||
GraphDef graphdef;
|
|
||||||
{
|
{
|
||||||
GraphDefBuilder builder(GraphDefBuilder::kFailImmediately);
|
GraphDefBuilder builder(GraphDefBuilder::kFailImmediately);
|
||||||
Node* a =
|
Node* a =
|
||||||
@ -449,7 +441,6 @@ TEST(XlaCompilationTest, Loops) {
|
|||||||
|
|
||||||
TEST(XlaCompilationTest, CyclesWithAllDifferentScopesGlobalJitOverridden) {
|
TEST(XlaCompilationTest, CyclesWithAllDifferentScopesGlobalJitOverridden) {
|
||||||
std::unique_ptr<Graph> graph(new Graph(OpRegistry::Global()));
|
std::unique_ptr<Graph> graph(new Graph(OpRegistry::Global()));
|
||||||
GraphDef graphdef;
|
|
||||||
{
|
{
|
||||||
GraphDefBuilder builder(GraphDefBuilder::kFailImmediately);
|
GraphDefBuilder builder(GraphDefBuilder::kFailImmediately);
|
||||||
Node* a = ops::SourceOp("Const", builder.opts()
|
Node* a = ops::SourceOp("Const", builder.opts()
|
||||||
@ -483,7 +474,6 @@ TEST(XlaCompilationTest, CyclesWithAllDifferentScopesGlobalJitOverridden) {
|
|||||||
|
|
||||||
TEST(XlaCompilationTest, CyclesWithAllDifferentScopes) {
|
TEST(XlaCompilationTest, CyclesWithAllDifferentScopes) {
|
||||||
std::unique_ptr<Graph> graph(new Graph(OpRegistry::Global()));
|
std::unique_ptr<Graph> graph(new Graph(OpRegistry::Global()));
|
||||||
GraphDef graphdef;
|
|
||||||
{
|
{
|
||||||
GraphDefBuilder builder(GraphDefBuilder::kFailImmediately);
|
GraphDefBuilder builder(GraphDefBuilder::kFailImmediately);
|
||||||
Node* a = ops::SourceOp("Const", builder.opts()
|
Node* a = ops::SourceOp("Const", builder.opts()
|
||||||
@ -512,7 +502,6 @@ TEST(XlaCompilationTest, CyclesWithAllDifferentScopes) {
|
|||||||
|
|
||||||
TEST(XlaCompilationTest, CyclesWithSplittingScopes) {
|
TEST(XlaCompilationTest, CyclesWithSplittingScopes) {
|
||||||
std::unique_ptr<Graph> graph(new Graph(OpRegistry::Global()));
|
std::unique_ptr<Graph> graph(new Graph(OpRegistry::Global()));
|
||||||
GraphDef graphdef;
|
|
||||||
{
|
{
|
||||||
GraphDefBuilder builder(GraphDefBuilder::kFailImmediately);
|
GraphDefBuilder builder(GraphDefBuilder::kFailImmediately);
|
||||||
Node* a = ops::SourceOp("Const", builder.opts()
|
Node* a = ops::SourceOp("Const", builder.opts()
|
||||||
@ -555,7 +544,6 @@ TEST(XlaCompilationTest, CyclesWithSplittingScopes) {
|
|||||||
|
|
||||||
TEST(XlaCompilationTest, CyclesWithDifferentScopesAndBridge) {
|
TEST(XlaCompilationTest, CyclesWithDifferentScopesAndBridge) {
|
||||||
std::unique_ptr<Graph> graph(new Graph(OpRegistry::Global()));
|
std::unique_ptr<Graph> graph(new Graph(OpRegistry::Global()));
|
||||||
GraphDef graphdef;
|
|
||||||
{
|
{
|
||||||
GraphDefBuilder builder(GraphDefBuilder::kFailImmediately);
|
GraphDefBuilder builder(GraphDefBuilder::kFailImmediately);
|
||||||
Node* a = ops::SourceOp("Const", builder.opts()
|
Node* a = ops::SourceOp("Const", builder.opts()
|
||||||
@ -789,7 +777,6 @@ TEST(XlaCompilationTest, IllegalCycle_UsefulErrorMessage) {
|
|||||||
|
|
||||||
TEST(XlaCompilationTest, Retval) {
|
TEST(XlaCompilationTest, Retval) {
|
||||||
std::unique_ptr<Graph> graph(new Graph(OpRegistry::Global()));
|
std::unique_ptr<Graph> graph(new Graph(OpRegistry::Global()));
|
||||||
GraphDef graphdef;
|
|
||||||
{
|
{
|
||||||
GraphDefBuilder builder(GraphDefBuilder::kFailImmediately);
|
GraphDefBuilder builder(GraphDefBuilder::kFailImmediately);
|
||||||
Node* a = ops::SourceOp("Const", builder.opts()
|
Node* a = ops::SourceOp("Const", builder.opts()
|
||||||
|
Loading…
Reference in New Issue
Block a user