GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||
GeezerVison is showing github.com — gh-100239: Handle NaN and zero division in guards by Eclips4 · Pull Request #128963 · python/cpython Conversation
|
|
Shall we check for NaN as well? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
You mean "Shall we continue with specialization if we encounter a NaN value?"? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Yes, I guess it would be fine. Might be good to cover this in the tests though. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Doesn't need to be in this PR, but I don't think we have a test for deoptimizing |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: Tomas R. <[email protected]>
|
Unfortunately Details== CPython 3.14.0a4+ (heads/fix-zero-division-dirty:850a862a7d8, Jan 18 2025, 13:17:14) [Clang 16.0.0 (clang-1600.0.26.4)] == macOS-15.1.1-arm64-arm-64bit-Mach-O little-endian == Python build: debug == cwd: /Users/eclips4/programming/programming-languages/cpython/build/test_python_worker_4826æ == CPU count: 8 == encodings: locale=UTF-8 FS=utf-8 == resources: all test resources are disabled, use -u option to unskip tests Using random seed: 548978877 0:00:00 load avg: 2.19 Run 1 test sequentially in a single process 0:00:00 load avg: 2.19 [1/1] test_opcache beginning 6 repetitions. Showing number of leaks (. for 0 or less, X for 10 or more) 123:456 test_binary_op (test.test_opcache.TestSpecializer.test_binary_op) ... ok ---------------------------------------------------------------------- Ran 1 test in 0.006s OK Xtest_binary_op (test.test_opcache.TestSpecializer.test_binary_op) ... ok ---------------------------------------------------------------------- Ran 1 test in 0.007s OK Xtest_binary_op (test.test_opcache.TestSpecializer.test_binary_op) ... FAIL ====================================================================== FAIL: test_binary_op (test.test_opcache.TestSpecializer.test_binary_op) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/eclips4/programming/programming-languages/cpython/Lib/test/test_opcache.py", line 1405, in test_binary_op binary_op_nan() ~~~~~~~~~~~~~^^ File "/Users/eclips4/programming/programming-languages/cpython/Lib/test/test_opcache.py", line 1402, in binary_op_nan self.assert_no_opcode(compactlong_lhs, "BINARY_OP_EXTEND") ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/eclips4/programming/programming-languages/cpython/Lib/test/test_opcache.py", line 42, in assert_no_opcode self.assertNotIn(opname, opnames) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^ AssertionError: 'BINARY_OP_EXTEND' unexpectedly found in {'RESUME_CHECK', 'RETURN_VALUE', 'POP_TOP', 'LOAD_CONST_IMMORTAL', 'BINARY_OP_EXTEND', 'LOAD_SMALL_INT', 'LOAD_FAST'} ---------------------------------------------------------------------- Ran 1 test in 0.012s FAILED (failures=1) test test_opcache failed test_opcache failed (1 failure) == Tests result: FAILURE == 1 test failed: test_opcache Total duration: 174 ms Total tests: run=1 (filtered) failures=1 Total test files: run=1/1 (filtered) failed=1 Result: FAILURE I'm digging into what's happening. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Okay, It seems that to get de-specialization it need to "hit" more guards. I'm not sure, though, if this is right. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Irit Katriel <[email protected]>
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thank you Irit and Tomas for your review! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…P_EXTEND` (python#128963) Co-authored-by: Tomas R. <[email protected]> Co-authored-by: Irit Katriel <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.