| commit | 50df8d3d6d7595dc062ee18868978d466c3c43fe | [log] [tgz] |
|---|---|---|
| author | Ben Barsdell <bbarsdell@nvidia.com> | Mon Oct 18 20:58:14 2021 +1100 |
| committer | Ben Barsdell <bbarsdell@nvidia.com> | Fri Nov 05 16:39:37 2021 +1100 |
| tree | e8a3ba297c9b09e678386ca1692baf0a6cc35591 | |
| parent | 55e3ae02ac1f13fbcc7a83f5e37a39fd2b142db1 [diff] |
Avoid integer overflow in EigenMetaKernel indexing - The current implementation computes `size + total_threads`, which can overflow and cause CUDA_ERROR_ILLEGAL_ADDRESS when size is close to the maximum representable value. - The num_blocks calculation can also overflow due to the implementation of divup(). - This patch prevents these overflows and allows the kernel to work correctly for the full representable range of tensor sizes. - Also adds relevant tests.
Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.
For more information go to http://eigen.tuxfamily.org/.
For pull request, bug reports, and feature requests, go to https://gitlab.com/libeigen/eigen.