-
Notifications
You must be signed in to change notification settings - Fork 25.9k
Description
🐛 Describe the bug
There are a number of unit test failures happening on Arm® Neoverse™-V1 platform. These include, but are not limited to
test_argmax_argmin_with_nan_cpu, test_argmax_argmin_with_duplicates_cpu, test_argmax_argmin3_cpu, test_argmax_argmin_with_nan_cpu, test_argmax_argmin2_cpu
AssertionError: Tensor-likes are not equal!
Mismatched elements: 72 / 144 (50.0%)
Greatest absolute difference: 142 at index (28,)
Greatest relative difference: 1.0 at index (4,)
The failure occurred for item [0]
To execute this test, run the following from the base repo dir:
python test/inductor/test_torchinductor.py CpuTests.test_argmax_argmin2_cpu
This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
Stacktrace
Traceback (most recent call last):
File "/var/lib/jenkins/workspace/test/inductor/test_torchinductor.py", line 11425, in new_test
return value(self)
File "/var/lib/jenkins/workspace/test/inductor/test_torchinductor.py", line 8737, in test_argmax_argmin2
self.common(fn, (torch.randn([144, 144]),))
File "/var/lib/jenkins/workspace/test/inductor/test_torchinductor.py", line 471, in check_model
self.assertEqual(
File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/testing/_internal/common_utils.py", line 3889, in assertEqual
raise error_metas.pop()[0].to_error(
AssertionError: Tensor-likes are not equal!
Mismatched elements: 72 / 144 (50.0%)
Greatest absolute difference: 142 at index (28,)
Greatest relative difference: 1.0 at index (4,)
The failure occurred for item [0]
To execute this test, run the following from the base repo dir:
python test/inductor/test_torchinductor.py CpuTests.test_argmax_argmin2_cpu
analysis
I have already debugged this and determined that this is due to a bug in GCC
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117001
This bug in GCC causes incorrect output for argmin_vec and argmax_vec due to loop vectorization bug in Vectorized::blendv.
I will attach fix in a PR
Versions
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A
OS: Ubuntu 22.04.5 LTS (aarch64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: Could not collect
CMake version: version 3.30.5
Libc version: glibc-2.35
Python version: 3.10.15 | packaged by conda-forge | (main, Sep 30 2024, 17:46:42) [GCC 13.3.0] (64-bit runtime)
Python platform: Linux-6.8.0-1015-aws-aarch64-with-glibc2.35
Is CUDA available: N/A
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A
CPU:
Architecture: aarch64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 48
On-line CPU(s) list: 0-47
Vendor ID: ARM
Model: 1
Thread(s) per core: 1
Core(s) per cluster: 48
Socket(s): -
Cluster(s): 1
Stepping: r1p1
BogoMIPS: 2100.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 ssbs paca pacg dcpodp svei8mm svebf16 i8mm bf16 dgh rng
L1d cache: 3 MiB (48 instances)
L1i cache: 3 MiB (48 instances)
L2 cache: 48 MiB (48 instances)
L3 cache: 32 MiB (1 instance)
NUMA node(s): 1
NUMA node0 CPU(s): 0-47
Vulnerability Gather data sampling: 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 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 Tsx async abort: Not affected
Versions of relevant libraries:
[pip3] mypy==1.11.2
[pip3] mypy-extensions==1.0.0
[pip3] numpy==1.26.2
[pip3] onnx==1.16.1
[pip3] onnxscript==0.1.0.dev20240817
[pip3] optree==0.13.0
[pip3] torch==2.6.0a0+git4cf6de2
[conda] No relevant packages