[aarch64/GCC] CPU kernel tests fail to compile due to Half narrowing conversions
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 82/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- cmake, cpp
- 领域
- build-system, testing
调研方向
四个 narrowing 错误位于 kernels/test/op_convolution_backward_test.cpp:149、op_min_test.cpp:253、op_scalar_tensor_test.cpp:141 和 op_max_test.cpp:257。先运行 issue 中提到的 cmake 构建目标 optimized_kernels_test 以复现这些错误,然后查看这些行中每个被标记的 Half 值是如何书写的。完成标准是该目标能在 aarch64 上使用 GCC 编译通过,并且这些文件中的测试仍然通过。
由索引模型根据 Issue 内容生成。
描述
🐛 Describe the bug
Building optimized_kernels_test fails on aarch64 with GCC due to narrowing conversions in Half test cases.
Reproduce from the repository root:
cmake -S . -B cmake-out \
-DCMAKE_BUILD_TYPE=Release \
-DPYTHON_EXECUTABLE="$(command -v python)" \
-DEXECUTORCH_BUILD_TESTS=ON \
-DEXECUTORCH_BUILD_KERNELS_OPTIMIZED=ON
cmake --build cmake-out --target optimized_kernels_test -j8 -- -k
Errors (abridged):
kernels/test/op_convolution_backward_test.cpp:149:24: error: narrowing conversion of ‘9246’ from ‘int’ to ‘float16_t’ {aka ‘__fp16’} [-Wnarrowing]
kernels/test/op_min_test.cpp:253:33: error: narrowing conversion of ‘+Inff’ from ‘float’ to ‘float16_t’ {aka ‘__fp16’} [-Wnarrowing]
kernels/test/op_scalar_tensor_test.cpp:141:35: error: narrowing conversion of ‘+Inff’ from ‘float’ to ‘float16_t’ {aka ‘__fp16’} [-Wnarrowing]
kernels/test/op_max_test.cpp:257:33: error: narrowing conversion of ‘-Inff’ from ‘float’ to ‘float16_t’ {aka ‘__fp16’} [-Wnarrowing]
Expected: optimized_kernels_test builds successfully.
Versions
PyTorch version: 2.14.0+cu130
Is debug build: False
CUDA used to build PyTorch: 13.0
ROCm SDK used to build PyTorch: N/A
HIP used to build PyTorch: N/A
OS: Ubuntu 24.04.5 LTS (aarch64)
GCC version: (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
Clang version: Could not collect
CMake version: version 3.31.10
Libc version: glibc-2.39
Python version: 3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0] (64-bit runtime)
Python platform: Linux-7.0.0-1024-nvidia-aarch64-with-glibc2.39
Is CUDA available: True
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to:
GPU models and configuration: GPU 0: NVIDIA GB10
Nvidia driver version: 580.178.04
cuDNN version: Probably one of the following:
/usr/lib/aarch64-linux-gnu/libcudnn.so.9.27.0
/usr/lib/aarch64-linux-gnu/libcudnn_adv.so.9.27.0
/usr/lib/aarch64-linux-gnu/libcudnn_cnn.so.9.27.0
/usr/lib/aarch64-linux-gnu/libcudnn_engines_precompiled.so.9.27.0
/usr/lib/aarch64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.27.0
/usr/lib/aarch64-linux-gnu/libcudnn_engines_tensor_ir.so.9.27.0
/usr/lib/aarch64-linux-gnu/libcudnn_ext.so.9.27.0
/usr/lib/aarch64-linux-gnu/libcudnn_graph.so.9.27.0
/usr/lib/aarch64-linux-gnu/libcudnn_heuristic.so.9.27.0
/usr/lib/aarch64-linux-gnu/libcudnn_ops.so.9.27.0
Is XPU available: False
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: False
Caching allocator config: N/A
CPU:
Architecture: aarch64
CPU op-mode(s): 64-bit
Byte Order: Little Endian
CPU(s): 20
On-line CPU(s) list: 0-19
Vendor ID: ARM
Model name: Cortex-X925
Model: 1
Thread(s) per core: 1
Core(s) per socket: 10
Socket(s): 1
Stepping: r0p1
Frequency boost: disabled
CPU(s) scaling MHz: 100%
CPU max MHz: 3900.0000
CPU min MHz: 1378.0000
BogoMIPS: 2000.00
Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh bti ecv afp wfxt
Model name: Cortex-A725
Model: 1
Thread(s) per core: 1
Core(s) per socket: 10
Socket(s): 1
Stepping: r0p1
CPU(s) scaling MHz: 100%
CPU max MHz: 2808.0000
CPU min MHz: 338.0000
BogoMIPS: 2000.00
Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh bti ecv afp wfxt
L1d cache: 1.3 MiB (20 instances)
L1i cache: 1.3 MiB (20 instances)
L2 cache: 25 MiB (20 instances)
L3 cache: 24 MiB (2 instances)
NUMA node(s): 1
NUMA node0 CPU(s): 0-19
Vulnerability Gather data sampling: Not affected
Vulnerability Ghostwrite: Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Not affected
Vulnerability Old microcode: Not affected
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed: Not affected
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1: Mitigation; __user pointer sanitization
Vulnerability Spectre v2: Mitigation; CSV2, BHB
Vulnerability Srbds: Not affected
Vulnerability Tsa: Not affected
Vulnerability Tsx async abort: Not affected
Vulnerability Vmscape: Not affected
Versions of relevant libraries:
[pip3] executorch==1.6.0+05092c1
[pip3] numpy==2.5.4
[pip3] nvidia-cublas==13.1.1.3
[pip3] nvidia-cuda-cupti==13.0.85
[pip3] nvidia-cuda-nvrtc==13.0.88
[pip3] nvidia-cuda-runtime==13.0.96
[pip3] nvidia-cudnn-cu13==9.24.0.43
[pip3] nvidia-cufft==12.0.0.61
[pip3] nvidia-curand==10.4.0.35
[pip3] nvidia-cusolver==12.0.4.66
[pip3] nvidia-cusparse==12.6.3.3
[pip3] nvidia-cusparselt-cu13==0.8.1
[pip3] nvidia-nccl-cu13==2.30.7
[pip3] nvidia-nvjitlink==13.4.92
[pip3] nvidia-nvtx==13.0.85
[pip3] optimum-executorch==0.2.0.dev0
[pip3] pytorch_tokenizers==1.4.0
[pip3] torch==2.14.0+cu130
[pip3] torchao==0.19.0.dev20260907+cpu
[pip3] torchaudio==2.11.0+cu130
[pip3] torchdata==0.11.0
[pip3] torchsr==1.0.4
[pip3] torchtune==0.0.0
[pip3] torchvision==0.29.0+cu130
[pip3] triton==3.8.0+gitdf3f91dd
[conda] Could not collect
- 主要语言
- Python
- 星标
- 5.2k
- 派生
- 1.2k
- 平均合并
- 1 天 22 小时
- 30 天内合并 PR
- 675
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pytorch/executorch 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
pytorch/executorch#24434 ·
维护者通常 1 天内回复
-
enhancement triaged
难度 2/5 半天 新手友好度 68/100
pytorch/executorch#21640 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
pytorch/executorch#24502 ·
维护者通常 1 天内回复
-
Optimized le.Tensor_out returns b <= a for reverse-argument broadcasts可能已有人在做 @SofianElmotiem 于 2 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 35/100
pytorch/executorch#24485 ·
维护者通常 1 天内回复
-
`install_executorch.sh` fails in a fresh uv virtual environment: `No module named pip`可能已有人在做 @mshr-h 于 3 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 45/100
pytorch/executorch#24417 ·
维护者通常 1 天内回复
查看 pytorch/executorch 的全部 Issue
相似的 Issue
-
bug severity:low
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 2 天内回复
-
curriculum documentation quality
难度 2/5 1-3 小时 新手友好度 77/100
githubnext/gh-aw-workshop#5367 ·
维护者通常 3 天内回复
-
OAuth documentation for GET /api/v2/users/me/ appears inconsistent with required global read scope未关闭
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
Create Noise Latents ignores randomize_seed and produces the same noise every run可能已有人在做 @griptapeops 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
griptape-ai/griptape-nodes-library-diffusers#127 ·
维护者通常 1 天内回复
-
Jenkins capacity report: metrics history is lost when archiving a month fails可能已有人在做 @RaphaelFakhri 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
adoptium/infrastructure#4568 ·
维护者通常 1 天内回复