Skip to content

test(hw-oracle): probe v_rcp_f32 zeros, infinities and NaN - #1174

Open
Thimo188 wants to merge 1 commit into
mainfrom
upstream-pr/25005
Open

Thimo188 wants to merge 1 commit into
mainfrom
upstream-pr/25005

Conversation

@Thimo188

@Thimo188 Thimo188 commented Dec 2, 2026 •

Copy link
Copy Markdown
Owner

Imported from boykopovar/AnyPS5#25005, originally opened by AgudoCore.

Source commit: 2eaa09cd421dfff21043ce1cdcaafc1309ea4615. The import branch preserves this fetched upstream PR snapshot. The description and validation below are copied from upstream; no new code changes or test runs were made for this import. Original reviews, discussions, and attachments remain at the linked upstream PR.


What

A new v_rcp_f32 probe for the hw-oracle catalog. It covers +0.0 and -0.0, both infinities, a quiet NaN, the smallest normal (2^-126) and 2.0. No row has a denormal input or result, so it does not overlap with boykopovar#22309.

Tested

python tools/hw-oracle/test_probe_catalog.py: OK. python tools/check_conventions.py --base upstream/main: passed.

Measured the probe with probe_catalog.py run on an AMD Radeon RX 6600 (gfx1032), AMD Windows driver 32.0.21045.16010, Windows 11, HIP runtime, and ran it through the shader recompiler on the same GPU with HW_ORACLE_RUNTIME=vulkan and agc_oracle_runner built from main at 2d8f713. compare_results.py reports 0 differing words.

v-rcp-f32-specials: 7f800000 ff800000 00000000 80000000 7fc12345 7e800000 3f000000

The zeros give infinities of the same sign and the infinities give zeros of the same sign. The input NaN comes back unchanged. 2^-126 gives 2^126 (7e800000) and 2.0 gives 0.5.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt and the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a (probe catalog only; measured on the RX 6600 above)
  • AI-assisted: yes

Collaborated with Claude Code.

https://claude.ai/code/session_01AXa9xcGFXzjZYtnjkUUJM6

Summary by CodeRabbit

  • Tests
    • Added coverage for 32-bit reciprocal calculations involving positive and negative zero, positive and negative infinity, quiet NaN, the smallest normal value, and two.
    • The probe runs with denormal and IEEE modes disabled and DX10 clamping enabled.

@coderabbitai

coderabbitai Bot commented Dec 2, 2026

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Changes: Reciprocal Special-Value Probe

Layer / File(s) Summary
Define reciprocal probe
tools/hw-oracle/probes.catalog
Adds the v-rcp-f32-specials probe. It uses seven special and boundary inputs, disables ieee and denorm32, sets denorm16 to 3 and dx10_clamp to 1, and sets the other rounding and overflow modes to 0.

Suggested reviewers: marczx10, agudocore

Change: Other

Merge Risk: Minimal · up to 2eaa0

This adds a hardware-oracle probe for reciprocal special values to the test catalog. It does not change runtime behavior and is low risk to merge.

Architecture risk: Low · up to 2eaa0

The probe catalog’s declared scenarios expand to include a v_rcp_f32 special-value case without changing the catalog validation contract.

Changed areas: tools

Review details

Systems and components

  • observed — 1 changed file mapped to tools.
Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Usage-based review receipt

  • Mode: Continue automatically
  • Reviewed files: 1
  • Waived: $0.25 (charged $0.00)
  • View usage details

Note

This review exceeded your plan’s limits and used usage-based reviews—free during trial, billed after paid activation unless disabled. Manage usage-based reviews.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 809f4057-ff4e-4fa5-84aa-f9ab395493ad
Commits

Reviewing files that changed from the base of the PR and between 4131f51 and 2eaa09c.

Files selected for processing: 1

  • tools/hw-oracle/probes.catalog

Limit details: You’ve used all 10 included reviews currently available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants