[BUG] Norm doesn't work with more than 2^32/2 elements
@christophe-murphy is already working on this.
Since Jul 16, 2024.
Assessment
This issue has not been assessed yet.
Description
If one-dimensional array has more than 2^32/2 elements, norm doesn't work. For OpenCL, computing the norm leads to a crash while CPU just gives 0. Haven't been able to try CUDA backend. CPU backend though seems to give wrong results even for the working one.
Description
- Norm fails when computed with more than 2 147 483 648 elements
- CPU and OpenCL backends at least
- Official AF installer on Windows 10
Reproducible Code and/or Steps
#include <arrayfire.h>
using namespace af;
int main(int argc, char* argv[]) {
// Works
array vec1 = constant(1.f, 2107483648);
const double norm1 = af::norm(vec1);
printf("%f\n", norm1);
// Doesn't work
array vec2 = constant(1.f, 4294867296);
const double norm2 = af::norm(vec2);
printf("%f\n", norm2);
return 0;
}
System Information
ArrayFire v3.9.0 (OpenCL, 64-bit Windows, build b59a1ae53)
[0] AMD: gfx1036, 24568 MB
-1- AMD: gfx1100, 20464 MB
-2- INTEL: AMD Ryzen 5 7600X 6-Core Processor , 64662 MB
-3- INTEL: AMD Ryzen 5 7600X 6-Core Processor , 64662 MB
Checklist
- Using the latest available ArrayFire release
- GPU drivers are up to date
- Dominant language
- C++
- Stars
- 4.9k
- Forks
- 555
- Avg merge
- 1h 24m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from arrayfire/arrayfire
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
All issues in arrayfire/arrayfire
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
duckdb/duckdb-wasm#2258 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
objectionary/eo-graphs#75 ·
-
Coarray integration tests carry no LABELS, so run_tests.py silently skips them under every backend Opencoarray
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
FISCO-BCOS/FISCO-BCOS#5642 ·