Skip to content

[Build] error: array index 4 is past the end of the array (that has type '__m256[4]') [-Werror,-Warray-bounds] #23410

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
yurivict opened this issue Jan 17, 2025 · 1 comment
Labels
build build issues; typically submitted using template

Comments

@yurivict
Copy link
Contributor

Describe the issue

Build fails:

In file included from /usr/ports/misc/onnxruntime/work/onnxruntime-1.20.1/onnxruntime/core/mlas/lib/sqnbitgemm_kernel_avx512.cpp:25:
In file included from /usr/ports/misc/onnxruntime/work/onnxruntime-1.20.1/onnxruntime/core/mlas/lib/sqnbitgemm_kernel_avx512_int8_blklen16.h:9:
In file included from /usr/ports/misc/onnxruntime/work/onnxruntime-1.20.1/onnxruntime/core/mlas/lib/sqnbitgemm_kernel_avx512_int8_blklen32.h:8:
/usr/ports/misc/onnxruntime/work/onnxruntime-1.20.1/onnxruntime/core/mlas/lib/sqnbitgemm_kernel_avx2_int8_blklen32.h:954:49: error: array index 4 is past the end of the array (that has type '__m256[4]') [-Werror,-Warray-bounds]
  954 |                 __m128 acc_1 = FoldAccumulators(acc[4], acc[5], acc[6], acc[7]);
      |                                                 ^   ~
/usr/ports/misc/onnxruntime/work/onnxruntime-1.20.1/onnxruntime/core/mlas/lib/sqnbitgemm_kernel_avx2_int8_blklen32.h:822:13: note: array 'acc' declared here
  822 |             __m256 acc[NCols4];
      |             ^
/usr/ports/misc/onnxruntime/work/onnxruntime-1.20.1/onnxruntime/core/mlas/lib/sqnbitgemm_kernel_avx2_int8_blklen32.h:954:57: error: array index 5 is past the end of the array (that has type '__m256[4]') [-Werror,-Warray-bounds]
  954 |                 __m128 acc_1 = FoldAccumulators(acc[4], acc[5], acc[6], acc[7]);
      |                                                         ^   ~
/usr/ports/misc/onnxruntime/work/onnxruntime-1.20.1/onnxruntime/core/mlas/lib/sqnbitgemm_kernel_avx2_int8_blklen32.h:822:13: note: array 'acc' declared here
  822 |             __m256 acc[NCols4];
      |             ^
/usr/ports/misc/onnxruntime/work/onnxruntime-1.20.1/onnxruntime/core/mlas/lib/sqnbitgemm_kernel_avx2_int8_blklen32.h:954:65: error: array index 6 is past the end of the array (that has type '__m256[4]') [-Werror,-Warray-bounds]
  954 |                 __m128 acc_1 = FoldAccumulators(acc[4], acc[5], acc[6], acc[7]);
      |                                                                 ^   ~
/usr/ports/misc/onnxruntime/work/onnxruntime-1.20.1/onnxruntime/core/mlas/lib/sqnbitgemm_kernel_avx2_int8_blklen32.h:822:13: note: array 'acc' declared here
  822 |             __m256 acc[NCols4];
      |             ^
/usr/ports/misc/onnxruntime/work/onnxruntime-1.20.1/onnxruntime/core/mlas/lib/sqnbitgemm_kernel_avx2_int8_blklen32.h:954:73: error: array index 7 is past the end of the array (that has type '__m256[4]') [-Werror,-Warray-bounds]
  954 |                 __m128 acc_1 = FoldAccumulators(acc[4], acc[5], acc[6], acc[7]);
      |                                                                         ^   ~
/usr/ports/misc/onnxruntime/work/onnxruntime-1.20.1/onnxruntime/core/mlas/lib/sqnbitgemm_kernel_avx2_int8_blklen32.h:822:13: note: array 'acc' declared here
  822 |             __m256 acc[NCols4];
      |             ^
4 errors generated.

Version: 1.20.1

Urgency

No response

Target platform

FreeBSD 14.2

Build script

Regular cmake invocation.

Error / output

See above.

Visual Studio Version

No response

GCC / Compiler Version

clang-18

@yurivict yurivict added the build build issues; typically submitted using template label Jan 17, 2025
@yurivict
Copy link
Contributor Author

Duplicate of #23180

@yurivict yurivict closed this as not planned Won't fix, can't repro, duplicate, stale Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build issues; typically submitted using template
Projects
None yet
Development

No branches or pull requests

1 participant