| 1537 | } |
| 1538 | |
| 1539 | void TFE_Py_TapeSetRemove(PyObject* tape) { |
| 1540 | auto* stack = GetTapeSet(); |
| 1541 | stack->erase(reinterpret_cast<TFE_Py_Tape*>(tape)); |
| 1542 | // We kept a reference to the tape in the set to ensure it wouldn't get |
| 1543 | // deleted under us; cleaning it up here. |
| 1544 | Py_DECREF(tape); |
| 1545 | } |
| 1546 | |
| 1547 | static std::vector<tensorflow::int64> MakeIntList(PyObject* list) { |
| 1548 | if (list == Py_None) { |