[logical] Make the estimate_schedule_retry lit tests pass on macOS instead of skipping them
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 66/100
Research direction
Start with PR #5959 and preview/logical/test/lit.cfg.py to see how the system-darwin feature is defined, then read estimate_schedule_retry_max_plus.mlir to see the CHECK lines pinned to full-precision values. Pick one of the three proposed approaches and apply it to all five preview/logical/test/Dialect/Phys/estimate_schedule_retry_*.mlir files, running the logical lit suite locally to confirm the Linux values still match. Done means no UNSUPPORTED: system-darwin line and no libm explanation comment in any of the five headers, with the macOS logical Test job green.
Written by the indexing model from the issue text.
Description
Describe the bug
Five preview/logical lit tests are marked UNSUPPORTED: system-darwin in #5959 because their expected values differ by one ulp on macOS. Make their CHECK lines pass on both Linux and macOS and remove the UNSUPPORTED lines, so macOS runs the same coverage as Linux.
Follow-up requested by @1tnguyen in https://github.com/NVIDIA/cuda-quantum/pull/5959 (review comment on estimate_schedule_retry_max_plus.mlir).
Background
The tests CHECK floating-point results printed to the last digit. Apple's libm differs from glibc by one ulp. For example, it prints 0.43749999999999994 where glibc prints 0.4375.
#5959 skips these tests on macOS with // UNSUPPORTED: system-darwin, using the system-<os> lit feature added in preview/logical/test/lit.cfg.py:
preview/logical/test/Dialect/Phys/estimate_schedule_retry_abort-errors.mlirpreview/logical/test/Dialect/Phys/estimate_schedule_retry_abort_folded.mlirpreview/logical/test/Dialect/Phys/estimate_schedule_retry_call_template_native.mlirpreview/logical/test/Dialect/Phys/estimate_schedule_retry_max_plus.mlirpreview/logical/test/Dialect/Phys/estimate_schedule_retry_native.mlir
The escalation and retry logic these tests exercise runs on macOS wheels, and the macOS job currently skips the tests that check it.
Proposed work
Pick one approach and apply it to all five tests:
- Loosen the
CHECKlines so they match both spellings, for example with a FileCheck regex such as{{0\.4375(0*|[0-9]*)}}, orCHECK-SAMEon the prefix. - Add a macOS-specific prefix with
// RUN: ... --check-prefixes=CHECK,DARWIN, and put the platform-specific values behindsystem-darwin/system-linuxguards. - Change the test fixtures so the printed values are exactly representable, such as powers of two, and need no per-platform handling.
Option 3 is the most robust, since it removes the libm dependency. Option 1 is the smallest change.
Acceptance criteria
- None of the five tests has
UNSUPPORTED: system-darwin. - They pass in the macOS logical Test job and still pass on Linux.
- The comment explaining the libm difference is removed from the test headers.
Notes
- The
system-darwin/system-linuxfeatures can stay inlit.cfg.pyfor tests that are platform-specific for other reasons, such asnative_liveness_write_failure.mlir.
- Dominant language
- C++
- Stars
- 1.2k
- Forks
- 508
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 100
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NVIDIA/cuda-quantum
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
NVIDIA/cuda-quantum#6035 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 77/100
NVIDIA/cuda-quantum#6034 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-quantum#6033 ·
Maintainers usually reply within 1 day
-
Point the CUDA-Q Pulse research preview docs to the released cudaq-pulse packagePossibly taken @fedonman claimed this 2 days ago. Open
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
NVIDIA/cuda-quantum#6031 ·
Maintainers usually reply within 1 day
-
Realtime fnv1a_hash sign-extends char, so a non-ASCII handler name gets a platform-dependent function idPossibly taken @fedonman claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
NVIDIA/cuda-quantum#6029 ·
Maintainers usually reply within 1 day
All issues in NVIDIA/cuda-quantum
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Maintainers usually reply within 2 days
-
bug data-types
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
ClickHouse/clickhouse-cpp#645 ·
Maintainers usually reply within 1 day
-
bug compatibility difficulty:easy prio:normal
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NatronGitHub/openfx-misc#524 ·
Maintainers usually reply within 1 day
-
documentation enhancement help wanted P0
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Awesome-Embedded-Learning-Studio/Tutorial_AwesomeModernCPP#359 ·
Maintainers usually reply within 1 day
-
Type: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
openscad/openscad#7360 · 2 comments ·
Maintainers usually reply within 1 day