Commit 10e541e
authored
Implement aten.stft (#2645)
Fixed pytorch/pytorch#147052
```bash
$ python -m pytest tests/function_libs/torch_lib/ops_test.py -k ops_aten_stft
====================================================================================================================================================================================================== test session starts ======================================================================================================================================================================================================
platform linux -- Python 3.13.1, pytest-8.4.1, pluggy-1.6.0
Using --randomly-seed=371864411
rootdir: /home/moatom/github/onnxscript
configfile: pyproject.toml
plugins: randomly-3.16.0, xdist-3.8.0, subtests-0.14.2, cov-6.2.1, hypothesis-6.138.2
collected 2158 items / 2154 deselected / 4 selected
tests/function_libs/torch_lib/ops_test.py s..x [100%]
======================================================================================================================================================================================================= warnings summary ========================================================================================================================================================================================================
onnxscript/converter.py:457: 429 warnings
tests/function_libs/torch_lib/ops_test.py: 15 warnings
/home/moatom/github/onnxscript/onnxscript/converter.py:457: DeprecationWarning: Expression.__init__ got an unexpected keyword argument 'lineno'. Support for arbitrary keyword arguments is deprecated and will be removed in Python 3.15.
expr = ast.Expression(expr, lineno=expr.lineno, col_offset=expr.col_offset)
onnxscript/converter.py:457: 429 warnings
tests/function_libs/torch_lib/ops_test.py: 15 warnings
/home/moatom/github/onnxscript/onnxscript/converter.py:457: DeprecationWarning: Expression.__init__ got an unexpected keyword argument 'col_offset'. Support for arbitrary keyword arguments is deprecated and will be removed in Python 3.15.
expr = ast.Expression(expr, lineno=expr.lineno, col_offset=expr.col_offset)
tests/function_libs/torch_lib/ops_test.py::TestOutputConsistencyFullGraphCPU::test_output_match_opinfo__ops_aten_stft_cpu_float32
tests/function_libs/torch_lib/ops_test.py::TestOutputConsistencyFullGraphCPU::test_output_match_opinfo__ops_aten_stft_cpu_float32
tests/function_libs/torch_lib/ops_test.py::TestOutputConsistencyFullGraphCPU::test_output_match_opinfo__ops_aten_stft_cpu_float32
/home/moatom/github/onnxscript/tests/function_libs/torch_lib/ops_test_common.py:329: DeprecationWarning: __array__ implementation doesn't accept a copy keyword, so passing copy=False failed. __array__ must implement 'dtype' and 'copy' keyword arguments. To learn more, see the migration guide https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword
value = np.array(value.cpu())
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
==================================================================================================================================================================================================== short test summary info ====================================================================================================================================================================================================
SKIPPED [1] tests/function_libs/torch_lib/ops_test.py:101: Traced functions does not have a function proto
=================================================================================================================================================================== 2 passed, 1 skipped, 2154 deselected, 1 xfailed, 891 warnings, 7 subtests passed in 4.42s ===================================================================================================================================================================
```1 parent a1be5c8 commit 10e541e
File tree
3 files changed
+174
-0
lines changed- onnxscript/function_libs/torch_lib/ops
- tests/function_libs/torch_lib
3 files changed
+174
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8548 | 8548 | | |
8549 | 8549 | | |
8550 | 8550 | | |
| 8551 | + | |
| 8552 | + | |
| 8553 | + | |
| 8554 | + | |
| 8555 | + | |
| 8556 | + | |
| 8557 | + | |
| 8558 | + | |
| 8559 | + | |
| 8560 | + | |
| 8561 | + | |
| 8562 | + | |
| 8563 | + | |
| 8564 | + | |
| 8565 | + | |
| 8566 | + | |
| 8567 | + | |
| 8568 | + | |
| 8569 | + | |
| 8570 | + | |
| 8571 | + | |
| 8572 | + | |
| 8573 | + | |
| 8574 | + | |
| 8575 | + | |
| 8576 | + | |
| 8577 | + | |
| 8578 | + | |
| 8579 | + | |
| 8580 | + | |
| 8581 | + | |
| 8582 | + | |
| 8583 | + | |
| 8584 | + | |
| 8585 | + | |
| 8586 | + | |
| 8587 | + | |
| 8588 | + | |
| 8589 | + | |
| 8590 | + | |
| 8591 | + | |
| 8592 | + | |
| 8593 | + | |
| 8594 | + | |
| 8595 | + | |
| 8596 | + | |
| 8597 | + | |
| 8598 | + | |
| 8599 | + | |
| 8600 | + | |
| 8601 | + | |
| 8602 | + | |
| 8603 | + | |
| 8604 | + | |
| 8605 | + | |
| 8606 | + | |
| 8607 | + | |
| 8608 | + | |
| 8609 | + | |
| 8610 | + | |
| 8611 | + | |
| 8612 | + | |
| 8613 | + | |
| 8614 | + | |
| 8615 | + | |
| 8616 | + | |
| 8617 | + | |
| 8618 | + | |
| 8619 | + | |
| 8620 | + | |
| 8621 | + | |
| 8622 | + | |
| 8623 | + | |
| 8624 | + | |
| 8625 | + | |
| 8626 | + | |
| 8627 | + | |
| 8628 | + | |
| 8629 | + | |
| 8630 | + | |
| 8631 | + | |
| 8632 | + | |
| 8633 | + | |
| 8634 | + | |
| 8635 | + | |
| 8636 | + | |
| 8637 | + | |
| 8638 | + | |
| 8639 | + | |
| 8640 | + | |
| 8641 | + | |
| 8642 | + | |
| 8643 | + | |
| 8644 | + | |
| 8645 | + | |
| 8646 | + | |
| 8647 | + | |
8551 | 8648 | | |
8552 | 8649 | | |
8553 | 8650 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
409 | 478 | | |
410 | 479 | | |
411 | 480 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1760 | 1760 | | |
1761 | 1761 | | |
1762 | 1762 | | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
1763 | 1771 | | |
1764 | 1772 | | |
1765 | 1773 | | |
| |||
0 commit comments