Repository navigation
[Core] Fix normalization plan caching across CUDA devices - #3969
jberchtold-nvidia wants to merge 2 commits into
Conversation
Partition the per-thread normalization plan cache by CUDA device so cached cuDNN handles and execution plans match the device of the execution stream. Add numerical LayerNorm and RMSNorm forward/backward coverage while switching devices on explicit CUDA streams. The regression fails on the pipeline 82664301 prebuilt core with CUDNN_STATUS_BAD_PARAM_STREAM_MISMATCH and passes on the fixed core. Signed-off-by: Jeremy Berchtold <jberchtold@nvidia.com>
[Medium impact] The PR appears safe to merge; the previous finding is fixed and no new actionable issues were found. SummaryPartitions the per-thread normalization plan cache by CUDA device so each device reuses its own plans.
Reviews (2) · Last reviewed commit: "Query the active CUDA device in normaliz..." · Reviewed by Greptile |
| normalizationPlanMap; | ||
| using PlanMap = | ||
| std::unordered_map<TupleKeyType, std::unique_ptr<NormalizationPlanBase>, TupleHash>; | ||
| std::unordered_map<int, PlanMap> normalizationPlanMaps; |
There was a problem hiding this comment.
To keep the diff small and strictly relevant to the bug fix, I added a nested map instead of extending TupleKeyType as TupleKeyType is used in other places.
If we would instead like to extend TupleKeyType, let me know and I can make that change. The other cases may have similar issues where they assume 1 GPU per process, I'm not sure yet. Regardless of whether it merges in this change or not, looking into the other cases of 1 GPU per process assumptions in TE core is something we should do
|
/te-ci L1 |
Read the active device's properties on each performTest invocation. Use its compute capability for the cuDNN support guard and its SM count for normalization plans, avoiding cached or hard-coded device-0 properties when the device-switch regression runs on heterogeneous GPU hosts. Validation: the cross-device normalization regression and two existing cuDNN and TE normalization cases pass on GB200. Pre-commit and git diff --check pass. Signed-off-by: Jeremy Berchtold <jberchtold@nvidia.com>
|
/te-ci L1 |
Description
Partition the per-thread normalization plan cache by CUDA device so cached cuDNN handles and execution plans match the device of the execution stream. Add numerical LayerNorm and RMSNorm forward/backward coverage while switching devices on explicit CUDA streams.
The regression fails on prebuilt core with CUDNN_STATUS_BAD_PARAM_STREAM_MISMATCH and passes on the fixed core.
Type of change
Changes
Checklist: