(self, exclude_eids)
| 30 | """ |
| 31 | |
| 32 | def __init__(self, exclude_eids): |
| 33 | device = None |
| 34 | if isinstance(exclude_eids, Mapping): |
| 35 | for _, v in exclude_eids.items(): |
| 36 | if device is None: |
| 37 | device = F.context(v) |
| 38 | break |
| 39 | else: |
| 40 | device = F.context(exclude_eids) |
| 41 | self._exclude_eids = None |
| 42 | self._filter = None |
| 43 | |
| 44 | if device == F.cpu(): |
| 45 | # TODO(nv-dlasalle): Once Filter is implemented for the CPU, we |
| 46 | # should just use that irregardless of the device. |
| 47 | self._exclude_eids = ( |
| 48 | recursive_apply(exclude_eids, F.zerocopy_to_numpy) |
| 49 | if exclude_eids is not None |
| 50 | else None |
| 51 | ) |
| 52 | else: |
| 53 | self._filter = recursive_apply(exclude_eids, utils.Filter) |
| 54 | |
| 55 | def _find_indices(self, parent_eids): |
| 56 | """Find the set of edge indices to remove.""" |
nothing calls this directly
no test coverage detected