| 1450 | namespace register_kernel { |
| 1451 | |
| 1452 | class Name : public KernelDefBuilder { |
| 1453 | public: |
| 1454 | // With selective registration, kernels whose implementation class is not used |
| 1455 | // by any kernel are disabled with the SHOULD_REGISTER_OP_KERNEL call in |
| 1456 | // REGISTER_KERNEL_BUILDER_UNIQ. However, an unused kernel that shares an |
| 1457 | // implementation class with a used kernel would get through that mechanism. |
| 1458 | // |
| 1459 | // This mechanism stops that registration by changing the name of the kernel |
| 1460 | // for the unused op to one that is ignored by |
| 1461 | // OpKernelRegistrar::InitInternal. Note that this method alone is |
| 1462 | // not sufficient - the compiler can't evaluate the entire KernelDefBuilder at |
| 1463 | // compilation time, so this method doesn't actually reduce code size. |
| 1464 | explicit Name(const char* op) |
| 1465 | : KernelDefBuilder(SHOULD_REGISTER_OP(op) ? op : "_no_register") {} |
| 1466 | }; |
| 1467 | |
| 1468 | namespace system { |
| 1469 |
no outgoing calls
no test coverage detected