Note that the "rules" in these tests are not meant to be logically correct
| 107 | |
| 108 | // Note that the "rules" in these tests are not meant to be logically correct |
| 109 | TEST_F(OptimizerCSETest, Simple) { |
| 110 | InitGraph( |
| 111 | "node { name: 'A' op: 'Input'}" |
| 112 | "node { name: 'B' op: 'Input'}" |
| 113 | "node { name: 'C' op: 'Mul' attr { key: 'T' value { type: DT_FLOAT } }" |
| 114 | " input: ['A', 'B'] }" |
| 115 | "node { name: 'D' op: 'Mul' attr { key: 'T' value { type: DT_FLOAT } }" |
| 116 | " input: ['A', 'B'] }"); |
| 117 | EXPECT_EQ(DoCSE(), |
| 118 | "A(Input);B(Input);C(Mul)|" |
| 119 | "A->C;B->C:1"); |
| 120 | } |
| 121 | |
| 122 | TEST_F(OptimizerCSETest, Simple_ThreeEquivalent) { |
| 123 | InitGraph( |
nothing calls this directly
no test coverage detected