| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Not sure how to fix this error: /usr/bin/ld: /usr/bin/ld: DWARF error: invalid or unhandled FORM value: 0x25 Objects/floatobject.o: in function `PyFloat_Pack2': floatobject.c:(.text.PyFloat_Pack2[PyFloat_Pack2]+0x32): undefined reference to `__truncdfhf2' clang: error: linker command failed with exit code 1 (use -v to see invocation) CC @StanFromIreland (fuzzers) |
Sorry, something went wrong.
|
The configure probe only tests a compile-time _Float16 constant, so it reports "yes" in the OSS-Fuzz Docker container where clang accepts the type but the container's pre-GCC-12 libgcc lacks __truncdfhf2 which is the runtime helper the PyFloat_Pack2 double to _Float16 conversion links against. I suggest you make configure do a runtime double to _Float16 conversion. |
Sorry, something went wrong.
Good idea, that works. |
Sorry, something went wrong.
|
🤖 New build scheduled with the buildbot fleet by @skirpichev for commit ac38cb8 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F154796%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
Sorry, something went wrong.
|
@skirpichev: Did you close your PR on purpose? |
Sorry, something went wrong.
Yes, this lacks benchmarks. I hope someone will continue this. |
Sorry, something went wrong.
|
@hpkfft, maybe you can check performance for a simple pyperf-based benchmark? import pyperf
from struct import pack, unpack
x = 3.140625
bx = struct.pack('e', x)
runner = pyperf.Runner()
runner.bench_func('pack("e", 3.140625)', pack, "e", x)
runner.bench_func('unpack("e", b"HB")', unpack, "e", bx) |
Sorry, something went wrong.
|
Using gcc 14.2.0 and ./configure: main:
pack("e", 3.140625): Mean +- std dev: 56.2 ns +- 1.1 ns
unpack("e", b"HB"): Mean +- std dev: 64.8 ns +- 1.2 ns
patch:
pack("e", 3.140625): Mean +- std dev: 51.9 ns +- 0.8 ns
unpack("e", b"HB"): Mean +- std dev: 59.0 ns +- 1.0 ns
Using ./configure --enable-optimizations: main:
pack("e", 3.140625): Mean +- std dev: 37.7 ns +- 0.2 ns
unpack("e", b"HB"): Mean +- std dev: 46.1 ns +- 0.4 ns
patch:
pack("e", 3.140625): Mean +- std dev: 38.2 ns +- 0.3 ns
unpack("e", b"HB"): Mean +- std dev: 43.6 ns +- 0.5 ns
Interesting. Does the training input for PGO have NaNs in it? If so, maybe it shouldn't.... |
Sorry, something went wrong.
Yes, PGO set of tests lacks test_capi, but test_struct.py is selected (see Lib/test/libregrtest/pgo.py). That one has various tests, including half-float NaNs. You can filter out some tests for PGO by @skip_if_pgo_task. (Usually we do this for expensive tests.) Apparently, CPython runtime overhead dominated in the above benchmark. For C code I got ~2x speedup, like you above. I'll try to repeat that with some benchmarking framework. Anyway, lets reopen this. |
Sorry, something went wrong.
There was a problem hiding this comment.
Ah good, the new code (since my previous review) is way shorter. Its size is now more acceptable to me.
Sorry, something went wrong.
Co-authored-by: Victor Stinner <vstinner@python.org>
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
|
Merged, thanks. |
Sorry, something went wrong.
|
I didn't close #153740 since it seems like more changes are planned. |
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot wasm32-wasi 3.x (tier-2) has failed when building commit e7ef46a. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/#/builders/1046/builds/12907 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/Lib/test/test_zipfile/test_core.py", line 3649, in test_write_filtered_python_package
with TemporaryFile() as t, zipfile.PyZipFile(t, "w") as zipfp:
~~~~~~~~~~~~~~~~~^^^^^^^^
File "/Lib/zipfile/__init__.py", line 2026, in __exit__
self.close()
~~~~~~~~~~^^
File "/Lib/zipfile/__init__.py", line 2667, in close
self.fp.seek(self.start_dir)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^
OSError: [Errno 51] No space left on device
Traceback (most recent call last):
File "/Lib/test/test_zipfile/test_core.py", line 3654, in test_write_filtered_python_package
zipfp.writepy(packagedir)
~~~~~~~~~~~~~^^^^^^^^^^^^
File "/Lib/zipfile/__init__.py", line 2830, in writepy
self.writepy(path, basename,
~~~~~~~~~~~~^^^^^^^^^^^^^^^^
filterfunc=filterfunc) # Recursive call
^^^^^^^^^^^^^^^^^^^^^^
File "/Lib/zipfile/__init__.py", line 2840, in writepy
self.writestr(arcname, bytecode)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
File "/Lib/zipfile/__init__.py", line 2605, in writestr
with self.open(zinfo, mode='w') as dest:
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/Lib/zipfile/__init__.py", line 1423, in close
self._fileobj.seek(self._zinfo.header_offset)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 51] No space left on device
Traceback (most recent call last):
File "/Lib/test/test_zipfile/test_core.py", line 3649, in test_write_filtered_python_package
with TemporaryFile() as t, zipfile.PyZipFile(t, "w") as zipfp:
~~~~~~~~~~~~~^^
OSError: [Errno 51] No space left on device
Traceback (most recent call last):
File "/Lib/test/test_zipfile/test_core.py", line 572, in test_append_to_concatenated_zip_file
f.write(data)
~~~~~~~^^^^^^
OSError: [Errno 51] No space left on device
|
Sorry, something went wrong.
…ython#154796) Co-authored-by: hpkfft.com <paul@hpkfft.com> Co-authored-by: Victor Stinner <vstinner@python.org>
| Back | FazBrowse Home | New Git URL |
Benchmarks: