Repository navigation
Name the raw_hash base classes explicitly so nvcc 13.4 can compile the hash containers on Windows - #118
Conversation
<details><summary>Claude's draft</summary> Follow-up to conda-forge#117. With only the two friend-declaration lines from patch 0004 applied, CUDA translation units on Windows that include an abseil hash container still fail under nvcc 13.4 + MSVC: absl/container/flat_hash_map.h(141): error C2248: 'raw_hash_map<T>::Hash': cannot access private typedef declared in class 'raw_hash_map<T>' https://github.com/conda-forge/onnxruntime-feedstock/actions/runs/37306309009/job/111750712123 Add patch 0005, which spells out the InstantiateRawHashMap / InstantiateRawHashSet base type in flat_hash_map, flat_hash_set, node_hash_map and node_hash_set instead of going through the injected-class-name, and renames their Hash/Eq template parameters so the base's private typedefs of the same names no longer hide them. Header-only; no behaviour or ABI change. Bump the build number to 2. onnxruntime-feedstock applies the same two changes to the installed 20260526.0 headers and its win-64 CUDA 13.4 builds pass with them. This patch was regenerated against the 20260817.0 source, where it applies after 0004; it was not built locally. Resume this Claude session: ``` cd /home/mark/git/feedstock/onnxruntime-feedstock claude --resume c16b7120-814d-4a38-9b1f-2afd9f75d054 ``` </details> Claude-Session: https://claude.ai/code/session_01XZa8BwzZpVJtREiCoVo1k6
|
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( I do have some suggestions for making it better though... For recipe/meta.yaml:
This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/37558789847. Examine the logs at this URL for more detail. |
|
CI is failing here |
<details><summary>Claude's draft</summary>
The first version of patch 0005 broke abseil's own Windows build:
absl/container/node_hash_map.h(139): error C2248:
'raw_hash_map<T>::Alloc': cannot access private typedef declared
in class 'raw_hash_map<T>'
raw_hash_map and raw_hash_set declare three private typedefs, Hash, Eq
and Alloc. The patch renamed the containers' Hash and Eq template
parameters but not Alloc, which node_hash_map and node_hash_set use for
their allocator parameter (flat_hash_map and flat_hash_set call it
Allocator, so they were fine). MSVC looks unqualified names up in
dependent bases, so the spelled-out base type picked up the private
typedef instead of the template parameter. gcc and clang do not, which
is why only win_64 and win_arm64 failed.
Rename Alloc to AbslAllocT in both node containers and say so in the
patch header. Checked that the patch applies after 0004 and that all
four containers still parse and instantiate with g++; MSVC is only
exercised by CI.
Resume this Claude session:
```
cd /home/mark/git/feedstock/onnxruntime-feedstock
claude --resume c16b7120-814d-4a38-9b1f-2afd9f75d054
```
</details>
Claude-Session: https://claude.ai/code/session_01XZa8BwzZpVJtREiCoVo1k6
|
thanks for the ping, hopefully it is fixed, i still need to review this, i kinda just skimmed it. |
|
Thank you! |
|
I dislike distilling proper commit messages from claude's very verbose "drafts". In future PRs (this goes for all feedstocks I maintain, and I recommend it in general), please provide either:
Footnotes
|
|
Thank you this is fair critcism, i'll work on that. I think nobody likes to read somebody else's AI output. |
|
I can't really promise to do that in "draft" mode, but once I mark things as "not draft" i'll give a once over to the commit history. |
…ed branch that targets the current global pin of abseil for conda-forge as of Oct 10, 2026. <details><summary>Claude's draft</summary> Backport of conda-forge#117 and conda-forge#118 from main (20260817.0) to the 20260526.x branch, because 20260526 is still the conda-forge global pin and the protobuf/grpc/re2 stack is built against it. Consumers that compile CUDA code on Windows against the pinned abseil, such as onnxruntime-feedstock, do not get the fix from 20260817.0. - 0004 names HashStateBase directly in the two friend declarations in absl/hash (fixes error C3856 under nvcc 13.4 + MSVC). - 0005 spells out the raw_hash_map / raw_hash_set base type in the four hash containers and renames their Hash, Eq and (node containers) Alloc template parameters (fixes error C2248). Both patches are the ones on main, regenerated against the 20260526.0 source so they apply without offsets. Header-only; no behaviour or ABI change. Build number 2 -> 3. Verified: both apply after 0001-0003 with git apply and patch; the patched headers are byte-identical to the ones onnxruntime-feedstock's win-64 CUDA 13.4 CI passes with, plus the Alloc rename that main's own Windows CI validated in conda-forge#118; the four containers parse and instantiate with g++. Not built locally. Not re-rendered: only the patch list and build number change, and the existing 20211102.x maintenance branch also leaves conda-forge.yml pointing at main. Resume this Claude session: ``` cd /home/mark/git/feedstock/onnxruntime-feedstock claude --resume c16b7120-814d-4a38-9b1f-2afd9f75d054 ``` </details> Claude-Session: https://claude.ai/code/session_01XZa8BwzZpVJtREiCoVo1k6
…ed branch that targets the current global pin of abseil for conda-forge as of Oct 10, 2026. <details><summary>Claude's draft</summary> Backport of conda-forge#117 and conda-forge#118 from main (20260817.0) to the 20260526.x branch, because 20260526 is still the conda-forge global pin and the protobuf/grpc/re2 stack is built against it. Consumers that compile CUDA code on Windows against the pinned abseil, such as onnxruntime-feedstock, do not get the fix from 20260817.0. - 0004 names HashStateBase directly in the two friend declarations in absl/hash (fixes error C3856 under nvcc 13.4 + MSVC). - 0005 spells out the raw_hash_map / raw_hash_set base type in the four hash containers and renames their Hash, Eq and (node containers) Alloc template parameters (fixes error C2248). Both patches are the ones on main, regenerated against the 20260526.0 source so they apply without offsets. Header-only; no behaviour or ABI change. Build number 2 -> 3. Verified: both apply after 0001-0003 with git apply and patch; the patched headers are byte-identical to the ones onnxruntime-feedstock's win-64 CUDA 13.4 CI passes with, plus the Alloc rename that main's own Windows CI validated in conda-forge#118; the four containers parse and instantiate with g++. Not built locally. Not re-rendered: only the patch list and build number change, and the existing 20211102.x maintenance branch also leaves conda-forge.yml pointing at main. Resume this Claude session: ``` cd /home/mark/git/feedstock/onnxruntime-feedstock claude --resume c16b7120-814d-4a38-9b1f-2afd9f75d054 ``` </details> Claude-Session: https://claude.ai/code/session_01XZa8BwzZpVJtREiCoVo1k6
<details><summary>Claude's draft</summary> Keep libabseil-0005 in step with the corrected patch proposed in conda-forge/abseil-cpp-feedstock#118. raw_hash_map and raw_hash_set have a private Alloc typedef as well as Hash and Eq. node_hash_map and node_hash_set name their allocator template parameter Alloc, so under MSVC the spelled-out base type picked up the private typedef and failed with C2248 as soon as either container was instantiated; abseil's own Windows build hit that in conda-forge#118. onnxruntime never instantiates the node containers, which is why the win-64 CUDA 13.4 builds here passed with the incomplete patch. Rename Alloc to AbslAllocT in both, and point the patch header at conda-forge#118. 0004 plus this patch still apply cleanly to the libabseil 20260526.0 headers. Resume this Claude session: ``` cd /home/mark/git/feedstock/onnxruntime-feedstock claude --resume c16b7120-814d-4a38-9b1f-2afd9f75d054 ``` </details> Claude-Session: https://claude.ai/code/session_01XZa8BwzZpVJtREiCoVo1k6
<details><summary>Claude's draft</summary> Keep libabseil-0005 in step with the corrected patch proposed in conda-forge/abseil-cpp-feedstock#118. raw_hash_map and raw_hash_set have a private Alloc typedef as well as Hash and Eq. node_hash_map and node_hash_set name their allocator template parameter Alloc, so under MSVC the spelled-out base type picked up the private typedef and failed with C2248 as soon as either container was instantiated; abseil's own Windows build hit that in conda-forge#118. onnxruntime never instantiates the node containers, which is why the win-64 CUDA 13.4 builds here passed with the incomplete patch. Rename Alloc to AbslAllocT in both, and point the patch header at conda-forge#118. 0004 plus this patch still apply cleanly to the libabseil 20260526.0 headers. Resume this Claude session: ``` cd /home/mark/git/feedstock/onnxruntime-feedstock claude --resume c16b7120-814d-4a38-9b1f-2afd9f75d054 ``` </details> Claude-Session: https://claude.ai/code/session_01XZa8BwzZpVJtREiCoVo1k6
Seems like there are other small patches necessary
claude
Draft. Follow-up to #117, which turned out to be only half of the fix.
What still fails
#117 fixed the
friend class X::HashStateBase;declarations. With exactly those two lines applied, CUDA translation units on Windows that include an abseil hash container still fail under nvcc 13.4 + MSVC, now on the containers' base-class alias:48
C2248errors in total, none of the earlierC3856.Evidence (all from conda-forge/onnxruntime-feedstock#183,
win_64_cuda_compiler_version13.4python3.12)libabseil 20260526.0 cxx17_h04e5de1_2C3856inhash.handC2248inflat_hash_map.hC2248onlyToolchain in all three:
cuda-nvcc 13.4.92,vs2022_win-64 19.44.35207, C++20, abseil consumed as an installed package withABSL_CONSUME_DLL. In those runs the patches are applied to the installed headers by the onnxruntime recipe, since it is pinned to 20260526.Change
Patch
0005spells the base type out inflat_hash_map,flat_hash_set,node_hash_mapandnode_hash_set, and renames theirHash/Eqtemplate parameters toAbslHashT/AbslEqT:The rename is needed because
raw_hash_map/raw_hash_setdeclare private typedefs namedHash,EqandAlloc, which under MSVC hide template parameters of the same name inside the derived class body; without it the spelled-out base hits the sameC2248. For the same reasonnode_hash_mapandnode_hash_setalso get theirAllocparameter renamed toAbslAllocT(the flat containers call theirsAllocator, which does not collide).Update: the first push of this PR missed the
Allocrename, which broke abseil's own win_64 and win_arm64 builds withnode_hash_map.h(139): error C2248: 'raw_hash_map<T>::Alloc'. onnxruntime never instantiates the node containers, so its CI did not catch it. Fixed in 6e20276. The parameters are not used anywhere else in those class bodies. Header-only, no behaviour or ABI change (template parameter names are not mangled).Build number bumped to 2.
Open points
0004(git apply --checkandpatch --dry-run). The CI evidence above is for the same change on the 20260526.0 headers.libabseil 20260526) are not helped until a backport or the migration.Checklist
https://claude.ai/code/session_01XZa8BwzZpVJtREiCoVo1k6