Skip to content
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

[BUG] Unit tests fault when CUB Cache Disablement is Disabled #773

Open
tmartin-gh opened this issue Oct 18, 2024 · 1 comment
Open

[BUG] Unit tests fault when CUB Cache Disablement is Disabled #773

tmartin-gh opened this issue Oct 18, 2024 · 1 comment

Comments

@tmartin-gh
Copy link
Collaborator

tmartin-gh commented Oct 18, 2024

Describe the Bug
Unit tests throw an instance of std::bad_any_cast when compiling with MATX_DISABLE_CUB_CACHE=OFF

Note: Google Test filter = ReductionTestsNumericNoHalfAllExecs/0.Sum*
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from ReductionTestsNumericNoHalfAllExecs/0, where TypeParam = cuda::std::__4::tuple<unsigned int, matx::cudaExecutor>
[ RUN      ] ReductionTestsNumericNoHalfAllExecs/0.Sum
terminate called after throwing an instance of 'std::bad_any_cast'

To Reproduce

cmake -DCMAKE_CUDA_ARCHITECTURES=80 -DCMAKE_BUILD_TYPE=Debug -DMATX_BUILD_EXAMPLES=ON -DMATX_BUILD_TESTS=ON /nfs/scratch.timothym_ate_1/MatX3 -DMATX_DISABLE_CUB_CACHE=OFF

make -j matx_test

./test/matx_test --gtest_filter="ReductionTestsNumericNoHalfAllExecs/0.Sum*"

Tested with

commit 4528b945a493b9c245cf602cc109a0f185bfed3f (HEAD -> main, origin/main, origin/HEAD)
Author: Cliff Burdick <[email protected]>
Date:   Thu Oct 17 08:41:12 2024 -0700

    Cleaning up non-const operator() to avoid code duplication (#769)

Expected Behavior
Unit tests should all pass.

Code Snippets
N/A

System Details (please complete the following information):

  • OS: Ubuntu 22.04
  • CUDA version: 12.5.1
  • g++ version: 11.4.0
  • nvcc version: 12.5.82

Additional Context
N/A

@tmartin-gh
Copy link
Collaborator Author

Note, even compiling with MATX_DISABLE_CUB_CACHE=OFF fails at the moment. The reproducer above has all .cu files in test/CMakeLists.txt commented out except for main.cu and ReductionTests.cu. If all .cu files are included, then we see many compiler errors such as

Consolidate compiler generated dependencies of target matx_test
[  7%] Building CUDA object test/CMakeFiles/matx_test.dir/00_solver/SVD.cu.o                                                                     MatX3/include/matx/core/tensor_desc.h: In function 'void matx::svdpi_impl(UType&, SType&, VTType&, AType&, X0Type&, int, const matx::cudaExecutor&, matx::index_t) [with UType = matx::detail::tensor_impl_t<cuda::std::__4::complex<double>, 3, matx::tensor_desc_t<c
uda::std::__4::array<long long int, 3>, cuda::std::__4::array<long long int, 3>, 3> >; SType = matx::detail::tensor_impl_t<double, 2, matx::tenso
r_desc_t<cuda::std::__4::array<long long int, 2>, cuda::std::__4::array<long long int, 2>, 2> >; VTType = matx::detail::tensor_impl_t<cuda::std::
__4::complex<double>, 3, matx::tensor_desc_t<cuda::std::__4::array<long long int, 3>, cuda::std::__4::array<long long int, 3>, 3> >; AType = matx
::detail::tensor_impl_t<cuda::std::__4::complex<double>, 3, matx::tensor_desc_t<cuda::std::__4::array<long long int, 3>, cuda::std::__4::array<lo
ng long int, 3>, 3> >; X0Type = matx::detail::RandomOp<double, cuda::std::__4::array<long long int, 2> >]':
MatX3/include/matx/core/tensor_desc.h:318:33: error: array subscript 3 is outside array bounds of 'matx::detail::tensor_impl_t<double, 1, matx::tensor_desc_t<cuda::std::__4::array<long long int, 1>, cuda::std::__4::array<long long int, 1>, 1> > [1]' [-Werror=array-bounds]
  318 |     return *(stride_.begin() + dim);
      |                                 ^
MatX3/include/matx/transforms/svd/svd_cuda.h:215:6: note: while referencing 's'
  215 |     auto s = slice<RANK-2>(S,sShapeB, sShapeE);
      |      ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant