Skip to content

fix(libc): compute log with FreeBSD msun's algorithm, as titles' libc.prx does - #10245

Merged
oneandonlydean merged 11 commits into
boykopovar:mainfrom
JJenkx:windows/libc-log-msun
Nov 5, 2026
Merged

oneandonlydean merged 11 commits into
boykopovar:mainfrom
JJenkx:windows/libc-log-msun

Conversation

@JJenkx

@JJenkx JJenkx commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

What

log returned the host's log, so its last bit and its errno depended on the host. On Windows (UCRT) it differs from the libc.prx that titles ship on 3,020,553 of 320 million random arguments. For example, log(0x3fcbf0cfff3ac077) is 0xbff859e4e1f045dc in the bundled libc.prx and 0xbff859e4e1f045db here, and log(0x3f08b0c25bca18b0) is 0xc023ed400c16d9ee there and 0xc023ed400c16d9ed here.

The titles' copy (NID rtV7-jWC6Yg) is FreeBSD msun's e_log.c. log now computes it:

  • the subnormal scaling by 2^54;
  • the normalisation of the significand into [√2/2, √2);
  • the |f| < 2^-20 shortcut;
  • the Lg1–Lg7 polynomial, with its two evaluation forms chosen by i | j.

errno: msun sets none, but the titles' copy sets it at exactly msun's two error returns:

  • ERANGE for ±0, which returns -inf;
  • EDOM for every argument with the sign bit set, which returns NaN. This covers the negative numbers, -inf and negative NaNs; a positive NaN or +inf leaves errno alone.

This port sets them there, and keeps the NaN payloads msun's x + x and (x - x) / 0 give. _Log with base 0 calls log, so it gets the same bits and errno; its existing test still passes (log(8) is the same in the bundled libc.prx, here and in UCRT).

Tested

Current-main conflict refresh — 2026-11-04. Head 6d7538e4350f903b4765feed2885a0f11511d407 merges main 9ab6a281ea61c9e62a7eb07eb4cef8f19ede1c5c while retaining the existing public history. The conflict resolution preserves main’s new pow regression functions and calls alongside this PR’s original log checks; both debt entries remain. The production log function is byte-for-byte identical to the previous public head.

Linux x86-64 Release, GCC 16.2.1: built actual libc through its CMake owner and rebuilt guest_math, guest_math_exact, and guest_dinkumware_internals in an isolated scoped harness. Each suite passes three consecutive runs on main and on the change (9 passes per arm, zero skips). Public-header audits and conventions pass. Existing ZArchive/zstd static providers were frozen and reused; this is not a full-project build. The only diff --check warning is the preserved original licence notice’s trailing-space line. No new Windows, bundled-module, physical-console, title, GPU or performance measurement is claimed.

Source preservation proofs, exact pins, build and test logs/JUnit, hashes and scoped CMake recipe, SHA-256 cf1061d3162f13522d79694acfcc9f52fbfcf987f81c3962f329931c0fa80c28 (download verified). AI-assisted: yes (Codex).

Current-main integration — 2026-11-03. Head cf81449bcba54cb715af54fcda9b0bcdc7c8cb3d includes main 4f41f4c375f5abb487dbd184fbc150f31994d762 and retains the prior public history and attribution/licence notices. Main’s newer math implementations and fixtures remain alongside this topic.

Linux x86-64 Release, GCC 16.2.1, Ninja, BUILD_TESTING=ON: rebuilt actual libc and math executables. guest_math, guest_math_exact, and guest_dinkumware_internals each pass 3/3 (9 passes, zero skips); public_headers and conventions pass. The same three groups pass 3/3 plus headers on pinned main. All 34 recursive dependency trees and 31,551 tracked blobs verify with zero errors; the update=none QuickJS test262 corpus is excluded from these library inputs. git diff --check reports the preserved verbatim licence trailing-space line; no other whitespace warnings occur.

Source/parent/gitlink proofs, exact library/test hashes, raw logs/JUnit, and head-leased push receipts: qualification archive, SHA-256 e6a50522bc28e30871fdc2c12a88d2537515914239e8166f6237f48895126a06 (download verified). Older platform/reference reports retain their original pins; no new Windows/macOS, SDK-module, console, title/GPU or performance claim. AI-assisted: yes (Codex).

Earlier dated qualifications below retain their recorded source/platform pins.

Current-main integration (2026-11-02): 8ef7026499044b4a212edcfa770bc65656c7d5b0 includes main a4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8 and retains the existing public commits. Conflicts preserve main’s math implementations, regression checks and debt entries alongside this topic. Linux x86-64 Release, GCC 16.2.1: rebuilt libc and the three math executables; guest_math, guest_math_exact and guest_dinkumware_internals each pass three times (9 passes, zero skips), and public_headers passes. The same baseline groups pass on main; conventions and whitespace pass. Source and dependency blobs, executable/library hashes, raw logs and JUnit are retained. This refresh adds no new console, Windows, title, GPU or numerical-reference measurement. Qualification evidence, SHA-256 22866bd2a060ba69cd4387d471605afe20ed644e3257174b2d1488635f8c9b52 (download verified).

Current Linux refresh: 9184f18ca7fdefc52c014cb7c08e1105acc8d702 on main 6c52b649e7b1592f28db0cb8fe9ac604f0a242e7. Fresh isolated libc/math build passed; guest_math and guest_dinkumware_internals each passed three consecutive runs. Diff and conventions checks pass; Math.cpp and GuestMath.cpp topic changes remain unchanged after rebase. Linux logs and rebase checks.

The Windows module comparisons and negative control below are historical evidence from original head 3a2e66d95d4f001f15adb0875bf5d3d377b2134c; Windows was not rerun on the refreshed commit. Results described as console results mean supplied titles' bundled libraries executed on the Windows host, not measurements on a physical console.

Windows 11 Enterprise 10.0.22621, Ryzen 9 5950X, WinLibs GCC 15.2.0 UCRT r7, Ninja, Release, BUILD_TESTING=ON, main 4997726.

  • Comparison: a scratch loader runs the decrypted libc.prx of PPSA07923, PPSA05916 and PPSA13934 natively and supplies __error. It compared their log with this PR's code, checking result bits (NaN payloads included) and errno, on:

    • 320 million random arguments per title (half random bit patterns, half random significands with exponents 2^-32 to 2^31, plus ±0, -inf and subnormals);
    • 20,159 structured arguments: the integers 1 to 1024 and their reciprocals, the 4,000 floats on each side of ±1, every power of two from 2^-1074 to 2^1023, and the special values.

    Results:

    • PPSA07923 and PPSA05916: identical bits and errno on all of them.
    • PPSA13934: identical errno. The bits differ on 262,780 random arguments, because that copy is an FMA-contracted build.
  • guest_math: the new CheckLogConsoleBits has 26 cases with the bundled library's results and errno: ±0, subnormals, the smallest normal, 1 and its neighbours, both sides of the |f| < 2^-20 and normalisation edges, DBL_MAX, ±inf, −1, −0.5, NaN payloads of both signs, and six arguments where UCRT differs.

    guest_math and guest_dinkumware_internals pass in three runs out of three on the exact head.

  • Negative control: with main's Math.cpp and these tests, guest_math aborts in a Require, while guest_dinkumware_internals still passes.

  • python tools/check_conventions.py --base origin/main and git diff --check pass.

  • Overlap and order: Refreshed as a standalone log topic on main 6c52b649e7b1592f28db0cb8fe9ac604f0a242e7. The old dependencies described series order and shared source/test/debt anchors, rather than required function implementations. This branch contains only its log implementation and tests. The log algorithm is self-contained and does not call the exp port.

  • Not tested: macOS, a physical console, floating-point exception flags, and logl. Original module comparison and negative control were Windows-only; the new Linux build and regression checks are scoped separately above.

Current Linux qualification (2026-10-28)

Rebased onto main 2227f1366188cda5699dd20e2e756a18006a5d4b. Linux CPU validation on 2026-10-28 at 679d90503c143804315cf712b06460140f9fc1e9 (Arch Linux 7.2.9, AMD Ryzen 9 7950X, GCC 16.2.1, Ninja Release, BUILD_TESTING=ON).

libc, guest_math_tests and guest_math_exact_tests rebuilt from this exact source. guest_math and guest_math_exact each passed three consecutive runs (6/6, no skips); the same two suites each passed three runs on the pinned main (6/6). Conventions and whitespace checks pass.

Exact source pins, preservation proofs, dependency checks, build logs and JUnit, SHA-256 1176269c9e6948b5252a5db9e660978d7f978fb2d9f4ed6c68bc050b10b5ae68. This is focused Linux CPU qualification; earlier Windows/title/reference measurements retain their original pins. No new title or performance result is claimed.

Canonical declaration cleanup (2026-10-28)

At c45208322cbd, removed 93 duplicate local export declarations from GuestMath.cpp; its included Api.hpp supplies them. Production code and numeric test bodies are unchanged. Original fails the actual header audit; candidate passes. Per-branch affected-test syntax compilation and conventions/whitespace pass; full standalone-header compilation passed once for the byte-identical header tree shared by the four affected PRs. Source/proofs/logs, SHA256 44f560018e4f6b52e8dda4158383f64fc3059fcdb6444840fe5c04fb2c884f11. No new numerical-runtime/platform claim; earlier runs retain original pins. Normal fast-forward only, no rebase. AI-assisted: Codex.

Current Linux qualification — 2026-10-29

Refreshed against main 5454cd2e455994d992aca39335ce60507eeda1eb.

Linux qualification at 911827abb1f536098649cb5f6e1ec199cd48e93d (Arch Linux 7.2.9, Ryzen 9 7950X, GCC 16.2.1, Ninja Release, BUILD_TESTING=ON): guest_math, guest_math_exact, guest_dinkumware_internals each pass three consecutive runs (9/9, no skips). The public_headers audit passes at this exact head. All tracked public-header files match the pinned main; the affected test targets rebuild against those headers. Conventions and whitespace checks pass. The same focused groups passed three times on the pinned main.

The integrated asinh debt entry now reflects the msun log dependency and the previously reported 100,000-input PPSA07923 comparison. It retains exception-flag/system-module and sampling limits. This documentation correction adds no new measurement claim.

Evidence: immutable Linux qualification bundle. Its SHA-256 is 53b095da2f67f55b8aa56ba273681e0330fb39739be844458038dde410fb8cc4. No fresh Windows runtime execution is claimed; older measurements retain their recorded source pins.

AI-assisted: yes (Codex).

Checklist

AI-assisted (Claude Code).

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 5021 docs/dev/debt/libc.md
PR 5303 docs/dev/debt/libc.md
PR 6295 core/libs/prx/libc/src/Math.cpp
core/libs/tests/GuestMath.cpp
PR 6819 docs/dev/debt/libc.md
PR 7081 docs/dev/debt/libc.md
PR 7386 docs/dev/debt/libc.md
PR 7447 docs/dev/debt/libc.md
PR 7715 docs/dev/debt/libc.md
PR 7851 docs/dev/debt/libc.md
PR 8150 docs/dev/debt/libc.md
PR 8965 docs/dev/debt/libc.md
PR 9340 docs/dev/debt/libc.md
PR 9371 docs/dev/debt/libc.md
PR 9447 docs/dev/debt/libc.md
PR 9526 docs/dev/debt/libc.md
PR 10397 docs/dev/debt/libc.md
PR 10405 docs/dev/debt/libc.md
PR 10780 docs/dev/debt/libc.md
PR 11172 docs/dev/debt/libc.md
PR 11260 core/libs/prx/libc/src/Math.cpp
core/libs/tests/GuestMath.cpp
docs/dev/debt/libc.md
PR 11262 core/libs/prx/libc/src/Math.cpp
core/libs/tests/GuestMath.cpp
docs/dev/debt/libc.md
PR 11266 core/libs/prx/libc/src/Math.cpp
core/libs/tests/GuestMath.cpp
docs/dev/debt/libc.md
PR 11332 docs/dev/debt/libc.md
PR 11724 docs/dev/debt/libc.md
PR 11726 docs/dev/debt/libc.md
PR 11831 docs/dev/debt/libc.md
PR 12849 docs/dev/debt/libc.md
PR 13449 docs/dev/debt/libc.md
PR 13486 core/libs/prx/libc/src/Math.cpp
docs/dev/debt/libc.md
PR 13794 docs/dev/debt/libc.md
PR 13804 docs/dev/debt/libc.md
PR 13809 docs/dev/debt/libc.md
PR 14212 docs/dev/debt/libc.md

@JJenkx

JJenkx commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

Linux run at this PR's exact head 3a2e66d95d (3a2e66d95d4f001f15adb0875bf5d3d377b2134c), not merged onto anything else; its base on main is 4997726a5f.

Arch Linux, kernel 7.2.9, Ryzen 9 7950X, g++ (GCC) 16.2.1 20260810, glibc 2.44, x86-64. Release, BUILD_TESTING=ON.

  • guest_math: passed in each of 3 runs, exit code 0 each time, with no failed, skipped or not-run tests.

This is the focused test only; no title, console or floating-point exception flags were checked.

AI-assisted: yes (Claude Code).

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 24, 2026
@JJenkx
JJenkx force-pushed the windows/libc-log-msun branch from 3a2e66d to 9184f18 Compare October 24, 2026 04:59
@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Oct 24, 2026
JJenkx pushed a commit to JJenkx/AnyPS5 that referenced this pull request Oct 24, 2026
Additive conflicts with main's newer libc math changes: the debt list keeps
both sides' entries (per entry), the GuestMath.cpp test functions and calls
from both sides are kept, and Math.cpp keeps both sides' independent changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JJenkx

JJenkx commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

Merged current main 1e20650e84 into this branch as 7f4171802d (was 9184f18ca7), a merge commit rather than a rebase. Done on Linux while the Windows session is paused.

  • The conflicts were additive, next to main's newer libc math changes.
  • The docs/dev/debt/libc.md entry list keeps both sides' entries, checked per entry: this PR's entries keep their exact text, and so do main's.
  • GuestMath.cpp keeps both sides' test functions and calls.
  • New head, Linux only: guest_math and guest_math_exact pass (Arch Linux, kernel 7.2.9, GCC 16.2.1, glibc 2.44, Release, BUILD_TESTING=ON). tools/check_conventions.py --base origin/main reports no errors.
  • Earlier Windows and comparison evidence in this thread stays pinned to the heads it was measured on.

AI-assisted: yes (Claude Code)

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 24, 2026

@harisibrar1 harisibrar1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked against main 99feaf0 and FreeBSD release/11.4.0 lib/msun/src/e_log.c:

  • The port matches e_log.c branch for branch, including re-reading the words after the 2^54 subnormal scaling. All 10 constants match msun's hex comments bit for bit.
  • An independent Python version of msun's algorithm reproduces all 26 CheckLogConsoleBits expectations, bits (NaN payloads included) and errno.
  • It still merges cleanly into current main. Main's log is still std::log, and _Log picks this up through log_nid_postfix.
  • FYI: this PR and #10234 add their test, declaration, main() call and debt entry at the same places, so the second one to land will need a trivial additive conflict fix.

Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.

@ycbuzi

ycbuzi commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Windows run of 7f41718 merged onto main fa515de (f8cf21f7a6, clean), since Windows was not run on this head. Windows 11 Home 10.0.26200, MinGW-w64 GCC 15.2.0 (ucrt-posix-seh r7), Release, BUILD_TESTING=ON.

Built libc, guest_math_tests and guest_dinkumware_internals_tests with no errors or warnings. ctest --repeat until-fail:2 on guest_math and guest_dinkumware_internals: both pass on both repeats. Negative control: with src/Math.cpp taken from main and the rest of this head, guest_math aborts (exit code 0xc0000409) and guest_dinkumware_internals still passes. Not run: a title.

@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Oct 24, 2026
@JJenkx

JJenkx commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

Integrated current main a4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8 as 8ef7026499044b4a212edcfa770bc65656c7d5b0, preserving the existing public history. Kept main’s newly merged math ports and tests alongside this topic; prerequisite ancestry is recorded in the description.

Linux Release: rebuilt libc and all three math executables; guest_math, guest_math_exact, guest_dinkumware_internals each pass 3/3 (9 passes, zero skips); public_headers, conventions and whitespace pass. The same baseline groups pass on main. Historical Windows/reference results keep their original pins; no new title/GPU or reference measurement is claimed.

Per-head logs, JUnit, hashes, source/dependency pins and patches · SHA-256 22866bd2a060ba69cd4387d471605afe20ed644e3257174b2d1488635f8c9b52 (download verified). AI-assisted: yes (Codex).

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 2, 2026
log carries over FreeBSD msun's lib/msun/src/e_log.c at release/11.4.0. Name that source above the port, in the form the exp port uses, followed by the file's Sun copyright and permission notice copied verbatim from that revision. No code changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JJenkx

JJenkx commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Added the source note and licence notice this port was missing (05928fc82a, on top of 8ef7026499): above log_nid_postfix a line in the exp port's form naming lib/msun/src/e_log.c at release/11.4.0, followed by that file's Sun copyright and permission notice copied verbatim from that revision, the same correction oneandonlydean asked for on #10321. No code changes. check_conventions.py --base origin/main passes. git diff --check reports the notice's trailing space, which is in the original and which main keeps for the other SunSoft notices in this file.

AI-assisted: yes.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 3, 2026
@JJenkx

JJenkx commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Current-main integration — 2026-11-03. Head cf81449bcba54cb715af54fcda9b0bcdc7c8cb3d includes main 4f41f4c375f5abb487dbd184fbc150f31994d762 and retains the prior public history and attribution/licence notices. Main’s newer math implementations and fixtures remain alongside this topic.

Linux x86-64 Release, GCC 16.2.1, Ninja, BUILD_TESTING=ON: rebuilt actual libc and math executables. guest_math, guest_math_exact, and guest_dinkumware_internals each pass 3/3 (9 passes, zero skips); public_headers and conventions pass. The same three groups pass 3/3 plus headers on pinned main. All 34 recursive dependency trees and 31,551 tracked blobs verify with zero errors; the update=none QuickJS test262 corpus is excluded from these library inputs. git diff --check reports the preserved verbatim licence trailing-space line; no other whitespace warnings occur.

Source/parent/gitlink proofs, exact library/test hashes, raw logs/JUnit, and head-leased push receipts: qualification archive, SHA-256 e6a50522bc28e30871fdc2c12a88d2537515914239e8166f6237f48895126a06 (download verified). Older platform/reference reports retain their original pins; no new Windows/macOS, SDK-module, console, title/GPU or performance claim. AI-assisted: yes (Codex).

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 3, 2026
@JJenkx

JJenkx commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

Refreshed in 6d7538e4350f903b4765feed2885a0f11511d407 against main 9ab6a281ea61c9e62a7eb07eb4cef8f19ede1c5c. The merge retains both the new main pow tests and this PR’s unchanged log implementation/tests. Main and change each pass three runs of all three math groups (9 passes per arm, zero skips), plus public-header audits; conventions pass. The description now links the verified evidence and states the scoped-build limits. Earlier Windows/module results retain their original pins.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head 6d7538e merged onto main b611e63 · tested 2026-11-05 03:58 UTC · 33 min

GPU AMD Radeon RX 6300 (RADV NAVI24), driver Mesa 25.2.8-0ubuntu0.24.04.4, Vulkan 1.4.318
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 3,751 passed · 21 failed (0 new, 14 also fail on main, 7 unstable on main) · 125 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 3,897 of 3,946 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (1456 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 124.9 s, ⚠️ agc_driver_graphics_maps_fallback 120.4 s, ⚠️ agc_driver_graphics 120.2 s, ⚠️ public_headers 90.2 s, ⚠️ agc_driver_bda_device 86.2 s
Unstable on main (7, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_array_layer_target_cpu: failed in 3 of the last 10 main runs
agc_driver_dithered_alpha_to_coverage: failed in 1 of the last 10 main runs
agc_driver_graphics: failed in 3 of the last 10 main runs
agc_driver_graphics_maps_fallback: failed in 2 of the last 10 main runs
agc_driver_pipeline_journal: failed in 9 of the last 10 main runs
agc_driver_two_sample_alpha_to_coverage_sample_mask_export: failed in 4 of the last 10 main runs
trace_digest_TraceDigestTests_test_cli_rejects_invalid_event_fields_without_partial_output: failed in 2 of the last 10 main runs
Failing on main too (14, not counted against this PR)
agc_driver_alpha_to_coverage_sample_mask_export
agc_driver_guest_memory_lifetime_direct
agc_driver_image_gather_volume
agc_driver_image_table
agc_driver_job_manager_compute_capacity
agc_driver_native_depth_bda_clear
agc_driver_native_depth_buffer_clear
agc_driver_native_depth_clears
agc_driver_native_multisample_depth
agc_driver_submit_progress
agc_submit_progress
agc_submit_progress_no_timeline
guest_mmap_executable
guest_socket_options_multicast
Passed on retry (4, failed in the parallel run, passed when re-run with a 360 s timeout; not counted against this PR)
agc_driver_emulated_color_compare_srgb_decode: Timeout in the parallel run; also passed only on retry in 37 other runs in the last 7 days
agc_driver_gated_dispatch_capture_draw_pipeline: Failed in the parallel run; also passed only on retry in 3 other runs in the last 7 days
agc_driver_recorder: Timeout in the parallel run; also passed only on retry in 27 other runs in the last 7 days
public_headers: Timeout in the parallel run; also passed only on retry in 20 other runs in the last 7 days
Validated but not compared (64, not in the main baseline's validation pass)
public_headers
public_headers_compile_0
public_headers_compile_1
public_headers_compile_10
public_headers_compile_11
public_headers_compile_12
public_headers_compile_13
public_headers_compile_14
public_headers_compile_15
public_headers_compile_16
public_headers_compile_17
public_headers_compile_18
public_headers_compile_19
public_headers_compile_2
public_headers_compile_21
public_headers_compile_22
public_headers_compile_23
public_headers_compile_24
public_headers_compile_25
public_headers_compile_26
public_headers_compile_27
public_headers_compile_28
public_headers_compile_29
public_headers_compile_3
public_headers_compile_30
public_headers_compile_31
public_headers_compile_32
public_headers_compile_33
public_headers_compile_34
public_headers_compile_35
public_headers_compile_36
public_headers_compile_37
public_headers_compile_38
public_headers_compile_39
public_headers_compile_4
public_headers_compile_40
public_headers_compile_41
public_headers_compile_42
public_headers_compile_43
public_headers_compile_44
public_headers_compile_45
public_headers_compile_46
public_headers_compile_47
public_headers_compile_48
public_headers_compile_49
public_headers_compile_5
public_headers_compile_50
public_headers_compile_51
public_headers_compile_52
public_headers_compile_53
public_headers_compile_54
public_headers_compile_55
public_headers_compile_56
public_headers_compile_57
public_headers_compile_58
public_headers_compile_59
public_headers_compile_6
public_headers_compile_60
public_headers_compile_61
public_headers_compile_62
public_headers_compile_63
public_headers_compile_7
public_headers_compile_8
public_headers_compile_9
Validation IDs already present on main (4 IDs in 802 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (802 tests): agc_compute_pipeline_replay, agc_driver, agc_driver_address_draw_space_reuse, agc_driver_address_draw_space_reuse_held, agc_driver_address_draw_space_reuse_off, agc_driver_address_draw_space_reuse_transitions, agc_driver_address_draw_space_reuse_verify, agc_driver_address_passes, and 794 more
VUID-vkCmdCopyImage-srcImage-01548 (11 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store_image_copy, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_plane_partially_unmapped_plane, agc_driver_depth_plane_unmapped_plane, and 3 more
VUID-vkCmdCopyImage-srcImage-01551 (11 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store_image_copy, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_plane_partially_unmapped_plane, agc_driver_depth_plane_unmapped_plane, and 3 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
Skipped (125)
usage: check_skips.py [-h] [--job {linux,windows}] [--list] [--require-tests]
                      junit
check_skips.py: error: /home/ben/anyps5-gpu-ci/data/runs/pr-10245/6d7538e4350f-b611e634f7fc/ctest.xml: testcase 'public_headers_compile_0' is notrun and was not run
Reproduce
git fetch origin 6d7538e4350f903b4765feed2885a0f11511d407 b611e634f7fc024f0c13e342d96de744448ef1d9
git checkout b611e634f7fc024f0c13e342d96de744448ef1d9 && git merge --no-ff 6d7538e4350f903b4765feed2885a0f11511d407
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 12 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 16 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 5, 2026
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 5, 2026
@JJenkx

JJenkx commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Linux check of exact head 2a9f4bad32. Arch Linux 7.2.11, GCC 16.2.1, Release, BUILD_TESTING=ON.

guest_math, guest_math_exact, guest_math_elementary, guest_dinkumware_internals and public_headers pass in 3 of 3 runs each (ctest --repeat until-fail:3), none skipped. These are the tests the Windows refresh ran.

AI-assisted: yes

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 5, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

Hi @JJenkx, I merged main fc23faa40a into this branch (merge 44835f00a6) so it can go in next. The only conflict was in docs/dev/debt/libc.md: this PR adds the log entry and main added the atanh entry at the same spot. I kept both, yours first; nothing else changed. Math.cpp and GuestMath.cpp merged cleanly.

Linux check of the merge head (Release, BUILD_TESTING=ON): guest_math, guest_math_exact and guest_math_elementary pass.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 5, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

Hi @JJenkx, one more merge of main (fec0b3f3c5, merge 8166cadfe3): after #10250 landed, Math.cpp conflicted where this PR replaces the log stub, because #10250 removed the old tan stub beside it (its msun tan lives further down). I kept your msun log and dropped the stale tan line; nothing else changed.

Linux check of the merge head (Release, BUILD_TESTING=ON): guest_math, guest_math_exact and guest_math_elementary pass.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head 2a9f4ba merged onto main e772fb2 · tested 2026-11-05 18:05 UTC · 18 min

GPU AMD Radeon RX 6300 (RADV NAVI24), driver Mesa 25.2.8-0ubuntu0.24.04.4, Vulkan 1.4.318
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 3,938 passed · 15 failed (0 new, 10 also fail on main, 5 unstable on main) · 71 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 4,024 of 4,074 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (1403 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.4 s, ⚠️ agc_driver_graphics_maps_fallback 106.6 s, ⚠️ agc_driver_graphics 93.6 s, ⚠️ public_headers 65.3 s, ⚠️ agc_graphics_profile_draw 60.2 s
Unstable on main (5, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_job_manager_compute_capacity: failed in 8 of the last 10 main runs
agc_driver_pipeline_journal: failed in 9 of the last 10 main runs
agc_driver_two_sample_alpha_to_coverage_sample_mask_export: failed in 5 of the last 10 main runs
agc_submit_progress: failed in 9 of the last 10 main runs
agc_submit_progress_no_timeline: failed in 9 of the last 10 main runs
Failing on main too (10, not counted against this PR)
agc_driver_alpha_to_coverage_sample_mask_export
agc_driver_guest_memory_lifetime_direct
agc_driver_image_table
agc_driver_native_depth_bda_clear
agc_driver_native_depth_buffer_clear
agc_driver_native_depth_clears
agc_driver_native_multisample_depth
agc_driver_submit_progress
guest_mmap_executable
guest_socket_options_multicast
Passed on retry (1, failed in the parallel run, passed when re-run with a 360 s timeout; not counted against this PR)
agc_graphics_profile_draw: Timeout in the parallel run; also passed only on retry in 15 other runs in the last 7 days
Validated but not compared (1, not in the main baseline's validation pass)
guest_job_manager_worker_spin_scale_0.1
Validation IDs already present on main (4 IDs in 805 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (805 tests): agc_compute_pipeline_replay, agc_driver, agc_driver_address_draw_space_reuse, agc_driver_address_draw_space_reuse_held, agc_driver_address_draw_space_reuse_off, agc_driver_address_draw_space_reuse_transitions, agc_driver_address_draw_space_reuse_verify, agc_driver_address_passes, and 797 more
VUID-vkCmdCopyImage-srcImage-01548 (11 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store_image_copy, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_plane_partially_unmapped_plane, agc_driver_depth_plane_unmapped_plane, and 3 more
VUID-vkCmdCopyImage-srcImage-01551 (11 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store_image_copy, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_plane_partially_unmapped_plane, agc_driver_depth_plane_unmapped_plane, and 3 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
Skipped (71)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_copied_writer_label_order: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_copied_writer_label_order_drain: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_float16_unused_nan_payloads: skipped, the device has no native f16 conversions with RTE rounding and kept f16 denormals
agc_driver_gcn_display_present: skipped, no display: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
agc_driver_image_table_vouched_lookups: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a watched imported table cannot be vouched for
agc_driver_linear_target_direct_write_completion: skipped, the device does not keep host imports write-watched, so no completion stamp over the target is tracked
agc_driver_ngg_vertex_wave_reduction: skipped, s3 describes a 32-lane wave only on 32-lane subgroups, and the device has 64 lanes
agc_driver_recorded_draw_staging: skipped, the device does not keep host imports write-watched, so the target is never resident
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_driver_unit_shadow_budget: skipped, the device does not import watched host memory for unit shadows
agc_driver_vertex_elected_atomic_max: skipped, the device runs vertex programs in subgroups, so they keep their cross-lane reductions
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_idle_publish_wait: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a forced watch of the import reads its submissions as CPU stores
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_shadowed_key_stores: skipped, the device imports no watched host memory under a unit shadow
agc_small_tiled_shadow_label: skipped, host imports are unavailable: the test block is not imported and watched
agc_storage_clear_hand_over: skipped, the device imports no watched host memory for the clear-key hand-over
agc_storage_pending_key_refresh: skipped, refreshes over a pending key store are not testable here
agc_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_net_ctl_disconnected: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_device_capability: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_disabled: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROL
Reproduce
git fetch origin 2a9f4bad3269d3d87bb084a17f339020eb2dfe44 e772fb25cc72ee5faf77847f06bbc69533016e82
git checkout e772fb25cc72ee5faf77847f06bbc69533016e82 && git merge --no-ff 2a9f4bad3269d3d87bb084a17f339020eb2dfe44
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 12 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 16 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@oneandonlydean
oneandonlydean merged commit 54d4201 into boykopovar:main Nov 5, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants