@@ -1486,36 +1486,6 @@ class ID_MATCH : public LeafGuard {
1486
1486
intptr_t _expected;
1487
1487
};
1488
1488
1489
- class NONE_MATCH : public LeafGuard {
1490
- public:
1491
- NONE_MATCH (py::object verbose_code_parts)
1492
- : LeafGuard(std::move(verbose_code_parts)) {}
1493
-
1494
- bool check_nopybind (PyObject* value) override { // borrowed ref
1495
- return value == Py_None;
1496
- }
1497
- };
1498
-
1499
- class TRUE_MATCH : public LeafGuard {
1500
- public:
1501
- TRUE_MATCH (py::object verbose_code_parts)
1502
- : LeafGuard(std::move(verbose_code_parts)) {}
1503
-
1504
- bool check_nopybind (PyObject* value) override { // borrowed ref
1505
- return value == Py_True;
1506
- }
1507
- };
1508
-
1509
- class FALSE_MATCH : public LeafGuard {
1510
- public:
1511
- FALSE_MATCH (py::object verbose_code_parts)
1512
- : LeafGuard(std::move(verbose_code_parts)) {}
1513
-
1514
- bool check_nopybind (PyObject* value) override { // borrowed ref
1515
- return value == Py_False;
1516
- }
1517
- };
1518
-
1519
1489
class EQUALS_MATCH : public LeafGuard {
1520
1490
public:
1521
1491
EQUALS_MATCH (py::object value, py::object verbose_code_parts)
@@ -5263,18 +5233,6 @@ PyObject* torch_c_dynamo_guards_init() {
5263
5233
py::class_<ID_MATCH, LeafGuard, std::shared_ptr<ID_MATCH>>(py_m, " ID_MATCH" )
5264
5234
.def (py::init<py::object, py::list>())
5265
5235
.def (" __call__" , &ID_MATCH::check);
5266
- py::class_<NONE_MATCH, LeafGuard, std::shared_ptr<NONE_MATCH>>(
5267
- py_m, " NONE_MATCH" )
5268
- .def (py::init<py::list>())
5269
- .def (" __call__" , &NONE_MATCH::check);
5270
- py::class_<TRUE_MATCH, LeafGuard, std::shared_ptr<TRUE_MATCH>>(
5271
- py_m, " TRUE_MATCH" )
5272
- .def (py::init<py::list>())
5273
- .def (" __call__" , &TRUE_MATCH::check);
5274
- py::class_<FALSE_MATCH, LeafGuard, std::shared_ptr<FALSE_MATCH>>(
5275
- py_m, " FALSE_MATCH" )
5276
- .def (py::init<py::list>())
5277
- .def (" __call__" , &FALSE_MATCH::check);
5278
5236
py::class_<EQUALS_MATCH, LeafGuard, std::shared_ptr<EQUALS_MATCH>>(
5279
5237
py_m, " EQUALS_MATCH" )
5280
5238
.def (py::init<py::object, py::list>())
@@ -5520,27 +5478,6 @@ PyObject* torch_c_dynamo_guards_init() {
5520
5478
self.add_leaf_guard (std::make_shared<ID_MATCH>(
5521
5479
std::move (value), std::move (verbose_code_parts)));
5522
5480
})
5523
- .def (
5524
- " add_none_match_guard" ,
5525
- [](GuardManager& self, py::object verbose_code_parts) -> void {
5526
- SKIP_IF_GUARD_ALREADY_PRESENT (" NONE_MATCH" );
5527
- self.add_leaf_guard (
5528
- std::make_shared<NONE_MATCH>(std::move (verbose_code_parts)));
5529
- })
5530
- .def (
5531
- " add_true_match_guard" ,
5532
- [](GuardManager& self, py::object verbose_code_parts) -> void {
5533
- SKIP_IF_GUARD_ALREADY_PRESENT (" TRUE_MATCH" );
5534
- self.add_leaf_guard (
5535
- std::make_shared<TRUE_MATCH>(std::move (verbose_code_parts)));
5536
- })
5537
- .def (
5538
- " add_false_match_guard" ,
5539
- [](GuardManager& self, py::object verbose_code_parts) -> void {
5540
- SKIP_IF_GUARD_ALREADY_PRESENT (" FALSE_MATCH" );
5541
- self.add_leaf_guard (
5542
- std::make_shared<FALSE_MATCH>(std::move (verbose_code_parts)));
5543
- })
5544
5481
.def (
5545
5482
" add_equals_match_guard" ,
5546
5483
[](GuardManager& self,
0 commit comments