[dynamo] Tracking issue for itertools polyfills
- Dominant language
- Python
- Stars
- 103k
- Forks
- 29.6k
- PR merge metrics
- PR metrics pending
Description
This issue lists the `itertools` members, whether they have a polyfill or are supported in `IterToolsVariable.call_function` directly, and the status of some tests. More specifically, it lists if the CPython tests in `test_itertools.py` named after this member (using `-k membername`) complete successfully when run with `PYTORCH_TEST_WITH_DYNAMO=1` after disabling the `dynamo_expected_failures` mechanism. Note that some of these tests have been edited, by disabling test cases that don't really make sense in the dynamo setting, or by wrapping some cases in `with torch._dynamo.error_on_graph_break(False)`.
| member | has polyfill? | supported in `IterToolsVariable`? | CPython tests succeed? |
| :---- | :----: | :-----: | :-----: |
| `accumulate` | ✔ | ✕ | ✕ |
| `batched` | ✕ | ✕ | ✕ |
| `chain` | ✔ | ✕ | ✕ |
| `chain.from_iterable` | ✔ | ✕ | ✔ |
| `compress` | ✕ | ✕ | ✕ |
| `count` | ✕ | ✔ | ✕ |
| `cycle` | ✔ | ✕ | ✕ |
| `dropwhile` | ✔ | ✕ | ✔ |
| `filterfalse` | ✔ | ✕ | ✕ |
| `groupby` | ✕ | ✔ | ✕ |
| `islice` | ✔ | ✕ | (1) |
| `pairwise` | ✔ | ✕ | ✕ |
| `repeat` | ✕ | ✔ | ✕ |
| `starmap` | in progress | ✕ | in progress |
| `takewhile` | ✔ | ✕ | ✔ |
| `tee` | ✔ | ✕ | ✕ |
| `zip_longest` | ✔ | ✕ | ✕ |
| `product` | ✕ | ✔ | ✕ |
| `permutations` | ✕ | ✔ | ✕ |
| `combinations` | ✕ | ✔ | ✕ |
| `combinations_with_replacement` | ✕ | ✕ | ✕ |
(1): The test `TestPurePythonRoughEquivalents.test_islice_recipe` is disabled with `@skipIfTorchDynamo`, but that decorator is itself not currently supported, so we can't easily make this test pass.
(@guilhermeleobas suggested I file this.)
cc @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @kadeng @amjames @Lucaskabela @jataylo
Contributor guide
Assessment
This issue has not been assessed yet.