Skip to content

Promote -Wzero-as-null-pointer-constant (#6336) - #6336

Open
q10 wants to merge 10 commits into
pytorch:mainfrom
q10:export-D120862978
Open

q10 wants to merge 10 commits into
pytorch:mainfrom
q10:export-D120862978

Conversation

@q10

@q10 q10 commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Summary:

Remove the OSS CMake demotion for -Wzero-as-null-pointer-constant. Third-party headers are now treated as system includes, and the full OSS CPU library builds cleanly with the warning fatal, matching internal enforcement.

Reviewed By: r-barnes

Differential Revision: D120862978

@meta-codesync

meta-codesync Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

@q10 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D120862978.

q10 added a commit to q10/FBGEMM that referenced this pull request Sep 21, 2026
Summary:

Remove the OSS CMake demotion for `-Wzero-as-null-pointer-constant`. Third-party headers are now treated as system includes, and the full OSS CPU library builds cleanly with the warning fatal, matching internal enforcement.

Differential Revision: D120862978
q10 added a commit to q10/FBGEMM that referenced this pull request Sep 21, 2026
Summary:

Remove the OSS CMake demotion for `-Wzero-as-null-pointer-constant`. Third-party headers are now treated as system includes, and the full OSS CPU library builds cleanly with the warning fatal, matching internal enforcement.

Differential Revision: D120862978
@meta-codesync meta-codesync Bot changed the title Promote -Wzero-as-null-pointer-constant Promote -Wzero-as-null-pointer-constant (#6336) Sep 21, 2026
q10 added a commit to q10/FBGEMM that referenced this pull request Sep 21, 2026
Summary:

Remove the OSS CMake demotion for `-Wzero-as-null-pointer-constant`. Third-party headers are now treated as system includes, and the full OSS CPU library builds cleanly with the warning fatal, matching internal enforcement.

Differential Revision: D120862978
@q10
q10 force-pushed the export-D120862978 branch from f0f23a0 to 3aa4175 Compare September 21, 2026 02:05
q10 added a commit to q10/FBGEMM that referenced this pull request Sep 21, 2026
Summary:

Remove the OSS CMake demotion for `-Wzero-as-null-pointer-constant`. Third-party headers are now treated as system includes, and the full OSS CPU library builds cleanly with the warning fatal, matching internal enforcement.

Differential Revision: D120862978
q10 added a commit to q10/FBGEMM that referenced this pull request Sep 21, 2026
Summary:

Remove the OSS CMake demotion for `-Wzero-as-null-pointer-constant`. Third-party headers are now treated as system includes, and the full OSS CPU library builds cleanly with the warning fatal, matching internal enforcement.

Differential Revision: D120862978
q10 added a commit to q10/FBGEMM that referenced this pull request Sep 21, 2026
Summary:

Remove the OSS CMake demotion for `-Wzero-as-null-pointer-constant`. Third-party headers are now treated as system includes, and the full OSS CPU library builds cleanly with the warning fatal, matching internal enforcement.

Differential Revision: D120862978
q10 added a commit to q10/FBGEMM that referenced this pull request Sep 21, 2026
Summary:

Remove the OSS CMake demotion for `-Wzero-as-null-pointer-constant`. Third-party headers are now treated as system includes, and the full OSS CPU library builds cleanly with the warning fatal, matching internal enforcement.

Differential Revision: D120862978
q10 added a commit to q10/FBGEMM that referenced this pull request Sep 21, 2026
Summary:

Remove the OSS CMake demotion for `-Wzero-as-null-pointer-constant`. Third-party headers are now treated as system includes, and the full OSS CPU library builds cleanly with the warning fatal, matching internal enforcement.

Differential Revision: D120862978
q10 added a commit to q10/FBGEMM that referenced this pull request Sep 21, 2026
Summary:
Pull Request resolved: pytorch#6336

Remove the OSS CMake demotion for `-Wzero-as-null-pointer-constant`. Third-party headers are now treated as system includes, and the full OSS CPU library builds cleanly with the warning fatal, matching internal enforcement.

Differential Revision: D120862978
@q10
q10 force-pushed the export-D120862978 branch from 3aa4175 to 017b8e6 Compare September 21, 2026 02:09
q10 added a commit to q10/FBGEMM that referenced this pull request Sep 21, 2026
Summary:

Remove the OSS CMake demotion for `-Wzero-as-null-pointer-constant`. Third-party headers are now treated as system includes, and the full OSS CPU library builds cleanly with the warning fatal, matching internal enforcement.

Differential Revision: D120862978
@q10
q10 force-pushed the export-D120862978 branch from 017b8e6 to c95b3ae Compare September 21, 2026 02:11
q10 added a commit to q10/FBGEMM that referenced this pull request Sep 21, 2026
Summary:

Remove the OSS CMake demotion for `-Wzero-as-null-pointer-constant`. Third-party headers are now treated as system includes, and the full OSS CPU library builds cleanly with the warning fatal, matching internal enforcement.

Differential Revision: D120862978
q10 added a commit to q10/FBGEMM that referenced this pull request Sep 21, 2026
Summary:

Remove the OSS CMake demotion for `-Wzero-as-null-pointer-constant`. Third-party headers are now treated as system includes, and the full OSS CPU library builds cleanly with the warning fatal, matching internal enforcement.

Differential Revision: D120862978
q10 added a commit to q10/FBGEMM that referenced this pull request Sep 21, 2026
Summary:

Remove the OSS CMake demotion for `-Wzero-as-null-pointer-constant`. Third-party headers are now treated as system includes, and the full OSS CPU library builds cleanly with the warning fatal, matching internal enforcement.

Differential Revision: D120862978
q10 added a commit to q10/FBGEMM that referenced this pull request Sep 21, 2026
Summary:

Remove the OSS CMake demotion for `-Wzero-as-null-pointer-constant`. Third-party headers are now treated as system includes, and the full OSS CPU library builds cleanly with the warning fatal, matching internal enforcement.

Differential Revision: D120862978
q10 added a commit to q10/FBGEMM that referenced this pull request Sep 21, 2026
Summary:

Remove the OSS CMake demotion for `-Wzero-as-null-pointer-constant`. Third-party headers are now treated as system includes, and the full OSS CPU library builds cleanly with the warning fatal, matching internal enforcement.

Differential Revision: D120862978
q10 added a commit to q10/FBGEMM that referenced this pull request Sep 21, 2026
Summary:
Pull Request resolved: pytorch#6336

Remove the OSS CMake demotion for `-Wzero-as-null-pointer-constant`. Third-party headers are now treated as system includes, and the full OSS CPU library builds cleanly with the warning fatal, matching internal enforcement.

Differential Revision: D120862978
@q10
q10 force-pushed the export-D120862978 branch from c95b3ae to ae79b84 Compare September 21, 2026 02:13
q10 added a commit to q10/FBGEMM that referenced this pull request Sep 21, 2026
Summary:
Pull Request resolved: pytorch#6336

Remove the OSS CMake demotion for `-Wzero-as-null-pointer-constant`. Third-party headers are now treated as system includes, and the full OSS CPU library builds cleanly with the warning fatal, matching internal enforcement.

Differential Revision: D120862978
@q10
q10 force-pushed the export-D120862978 branch from ae79b84 to 50589c3 Compare September 21, 2026 02:28
q10 added a commit to q10/FBGEMM that referenced this pull request Sep 21, 2026
Summary:
Pull Request resolved: pytorch#6336

Remove the OSS CMake demotion for `-Wzero-as-null-pointer-constant`. Third-party headers are now treated as system includes, and the full OSS CPU library builds cleanly with the warning fatal, matching internal enforcement.

Differential Revision: D120862978
@q10
q10 force-pushed the export-D120862978 branch from 50589c3 to c8e7ed3 Compare September 21, 2026 07:48
q10 added a commit to q10/FBGEMM that referenced this pull request Sep 22, 2026
Summary:

Remove the OSS CMake demotion for `-Wzero-as-null-pointer-constant`. Third-party headers are now treated as system includes, and the full OSS CPU library builds cleanly with the warning fatal, matching internal enforcement.

Differential Revision: D120862978
@q10
q10 force-pushed the export-D120862978 branch from c8e7ed3 to c661e8d Compare September 22, 2026 20:25
q10 added a commit to q10/FBGEMM that referenced this pull request Sep 22, 2026
Summary:
Pull Request resolved: pytorch#6336

Remove the OSS CMake demotion for `-Wzero-as-null-pointer-constant`. Third-party headers are now treated as system includes, and the full OSS CPU library builds cleanly with the warning fatal, matching internal enforcement.

Differential Revision: D120862978
q10 added a commit to q10/FBGEMM that referenced this pull request Sep 22, 2026
Summary:
Pull Request resolved: pytorch#6336

Remove the OSS CMake demotion for `-Wzero-as-null-pointer-constant`. Third-party headers are now treated as system includes, and the full OSS CPU library builds cleanly with the warning fatal, matching internal enforcement.

Differential Revision: D120862978
@q10
q10 force-pushed the export-D120862978 branch from c661e8d to 785288e Compare September 22, 2026 20:29
q10 added 9 commits September 22, 2026 13:56
Summary:
Mark contract-required parameters unused in TBE vector and stochastic-rounding helpers.

The affected overloads are unsupported-operation stubs or CUDA/ROCm-specific helpers whose uniform signatures intentionally retain parameters that some configurations do not read. Use unnamed parameters (`/* param */`) where values are never read, and retain `[[maybe_unused]]` for the shuffle mask that is used by CUDA but not ROCm. Make unsupported `Vec4AccT` assertions carry an actionable message without changing supported behavior.

Differential Revision: D121257626
Summary:
Mark parameters unused where TBE portability helpers consume them only on selected GPU platforms or architectures.

The affected embedding, ROCm split-embedding, and warp primitive helpers keep uniform interfaces across CUDA and ROCm. Use unnamed parameters (`/* param */`) for unsupported stubs and values never read, and retain `[[maybe_unused]]` for arguments used only by a platform- or architecture-specific branch.

Differential Revision: D121257627
Summary:
Mark contract-required parameters unused in generated TBE update helpers, cache insertion, and input transposition.

The generated rowwise-Adagrad table-update helper receives optimizer placement and offset arrays through the uniform `split_ref_kernel_args` contract but consumes separately derived scalar values. Silence those helper-local diagnostics in the owning template, while retaining the arrays for the outer GPU kernel that genuinely reads them. Also annotate configuration-specific cache and transpose parameters.

Differential Revision: D121257628
Summary:
Mark contract-required parameters unused in GenAI attention and KV-cache implementations.

The affected parameters belong to architecture-gated attention kernels, Meta implementations, and an intentionally unimplemented paged-cache kernel. Preserve their public and kernel signatures while making the configuration-specific unusedness explicit.

Differential Revision: D121257629
Summary:
Mark contract-required parameters unused across GenAI quantization backends and CK extensions.

The affected Meta functions, version-gated CUDA fallbacks, HIP kernels, and CK wrappers retain stable public signatures across implementations. Add `[[maybe_unused]]` where a particular backend or toolchain configuration intentionally does not consume an argument.

Differential Revision: D121257631
Summary:
Mark API-compatibility parameters unused in GenAI communication and MoE operators.

CAR retains `world_size` and `comm_idx` across backend-compatible entry points even where the current implementation does not consume them. The index-shuffling Meta implementation similarly preserves optional runtime arguments while deriving only output shapes.

Differential Revision: D121257633
Summary:
X-link: https://github.com/facebookresearch/FBGEMM/pull/3205

Pull Request resolved: pytorch#6339

Remove the mirrored OSS `-Wno-error=unused-parameter` escapes after the configuration-specific source cleanup in prerequisite diffs D121257626, D121257627, D121257628, D121257629, D121257631, and D121257633.

This final diff changes only the two `CppLibrary.cmake` copies, making unused parameters fatal across CXX, nvcc host, and hipcc while keeping the enforcement change independently reviewable.

Differential Revision: D120859871
Summary:
Pull Request resolved: pytorch#6338

Rename three constructor parameters that shadow their destination members: the convolution `transposed` flag and the embedding-statistics batch and bag sizes. This removes the complete `-Wshadow` output observed in the local OSS CPU build without changing initialized values or public argument ordering.

Differential Revision: D120862976
Summary:
Pull Request resolved: pytorch#6337

Remove the CMake, Buck, and Apple-specific shadow-warning demotions from both FBGEMM mirrors. The preceding constructor cleanup eliminates the measured OSS shadow diagnostics, so all supported build paths now enforce `-Wshadow` instead of merely reporting or suppressing it.

Differential Revision: D120862977
q10 added a commit to q10/FBGEMM that referenced this pull request Sep 22, 2026
Summary:

Remove the OSS CMake demotion for `-Wzero-as-null-pointer-constant`. Third-party headers are now treated as system includes, and the full OSS CPU library builds cleanly with the warning fatal, matching internal enforcement.

Reviewed By: r-barnes

Differential Revision: D120862978
q10 added a commit to q10/FBGEMM that referenced this pull request Sep 22, 2026
Summary:

Remove the OSS CMake demotion for `-Wzero-as-null-pointer-constant`. Third-party headers are now treated as system includes, and the full OSS CPU library builds cleanly with the warning fatal, matching internal enforcement.

Reviewed By: r-barnes

Differential Revision: D120862978
q10 added a commit to q10/FBGEMM that referenced this pull request Sep 22, 2026
Summary:

Remove the OSS CMake demotion for `-Wzero-as-null-pointer-constant`. Third-party headers are now treated as system includes, and the full OSS CPU library builds cleanly with the warning fatal, matching internal enforcement.

Reviewed By: r-barnes

Differential Revision: D120862978
q10 added a commit to q10/FBGEMM that referenced this pull request Sep 22, 2026
Summary:

Remove the OSS CMake demotion for `-Wzero-as-null-pointer-constant`. Third-party headers are now treated as system includes, and the full OSS CPU library builds cleanly with the warning fatal, matching internal enforcement.

Reviewed By: r-barnes

Differential Revision: D120862978
@q10
q10 force-pushed the export-D120862978 branch from 785288e to 026c000 Compare September 22, 2026 21:02
q10 added a commit to q10/FBGEMM that referenced this pull request Sep 22, 2026
Summary:
Pull Request resolved: pytorch#6336

Remove the OSS CMake demotion for `-Wzero-as-null-pointer-constant`. Third-party headers are now treated as system includes, and the full OSS CPU library builds cleanly with the warning fatal, matching internal enforcement.

Differential Revision: D120862978
Summary:
Pull Request resolved: pytorch#6336

Remove the OSS CMake demotion for `-Wzero-as-null-pointer-constant`. Third-party headers are now treated as system includes, and the full OSS CPU library builds cleanly with the warning fatal, matching internal enforcement.

Reviewed By: r-barnes

Differential Revision: D120862978
@q10
q10 force-pushed the export-D120862978 branch from 026c000 to 380801e Compare September 22, 2026 21:06

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant