Repository navigation
Conversation
`ArrayOps.take` clips indices against a runtime shape. array-api-compat 1.13 implements `clip` through a boolean-mask assignment (`out[mask] = ...`), whose mask length is a data-dependent SymInt under Dynamo's fake tensors, so `torch.compile(fullgraph=True)` raises `PendingUnbackedSymbolNotFound`. 1.14 added a torch-specific `clip` that calls `torch.clamp`. Measured on abb8300 with the lowest-direct resolution (torch 2.15.0, numpy 2.1.0): 1.13.0 fails 8 tests in test_nd_array_field_with_torch_compile.py, 1.14.0/1.15.0/1.16.0 pass.
The torch wheels ship their own `libomp.dylib` (conda's `llvm-openmp` build), while the extension links the Homebrew one. libomp registers itself per process and aborts on a second initialisation with `OMP: Error #15`; every macOS failure in the Daily CI since the torch extra was added is a gtfn or dace test aborting that way. `KMP_DUPLICATE_LIB_OK` is read at exactly that check. The two runtimes keep separate thread pools, so this is not what we would want in a library; it is scoped to CI, where the alternative is not running the torch tests on macOS at all.
|
🤖 Written by an agent on behalf of @havogt |
| ## TEMPORARY: enabled to verify the array-api-compat and macOS OpenMP fixes on | ||
| ## this PR. Remove together with the trimmed matrix before merging. | ||
| ## It only works for PRs to `main` branch from branches in the upstream gt4py repo. | ||
| # pull_request: | ||
| # branches: | ||
| # - main | ||
| pull_request: | ||
| branches: | ||
| - main |
There was a problem hiding this comment.
Temporary changes
Temporary CI changes are still in the diff and must be reverted before merging,
as the in-file comments and the third commit message state. If merged as-is, the
enabled pull_request trigger makes this scheduled Daily CI workflow run on
every PR targeting main, and the trimmed matrix further down in the same file
(next module only, Python 3.12 only, plus the strategy/os excludes) silently
drops nightly coverage for the cartesian, eve and storage modules and for
Python 3.13/3.14. Revert the temporary trigger and restore the full matrix
(e.g., drop the TEMP commit) before merge; the permanent fixes (the
array-api-compat floor bump and the macOS KMP_DUPLICATE_LIB_OK setting) can
then land on their own.
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
⚙️ Agent run details
|
This reverts commit c9b5ee9.
The torch wheels carry their own `libomp.dylib`, which clashes with the Homebrew libomp the extension links: the process aborts with `OMP: Error #15` and xdist reports `KeyError: <workercontroller gwN>`. Every macOS failure in the Daily CI since the torch extra was added is a gtfn or dace test running in an internal-codegen session.
…ert before merge)" This reverts commit a5d8071.
…e merge)" This reverts commit 267bc37.
Without the marker the dace benchmarks were selected by the `not uses_dace` (internal) nox sessions and never by the `uses_dace` (dace) ones.
|
50d4373 is an unrelated finding that came up while debugging the macOS OpenMP clash. It is not needed for the CI fix in this PR. The dace parametrizations in 🤖 Written by an agent on behalf of @havogt |
The gpu sessions select `requires_gpu`, so the unmarked gtfn_gpu and run_dace_gpu benchmark cases ran in no nox session. Also name the compiled extensions in the macOS torch comment in noxfile.py.
The gpu benchmark cases passed host fields to the gpu backends, which the dace gpu backend rejects; they had never run before they got `requires_gpu`.
Fixes two Daily CI regressions.
array-api-compat>=1.14: with 1.13 (thelowest-directfloor),clipuses a boolean-mask assignment that breakstorch.compile, so the 8 tests intest_nd_array_field_with_torch_compile.pyfail. 1.14 implementsclipwithtorch.clamp.libomp.dylib, andimport gt4py.nextloads it. The compiled gtfn/dace extensions link Homebrew's libomp. Two OpenMP runtimes in one process abort withOMP: Error #15, so the macOS nox sessions no longer install the torch extra and skiprequires_torchtests.