composable_kernel icon indicating copy to clipboard operation
composable_kernel copied to clipboard

assert() failure in tests without macro NDEBUG

Open rosenrodt opened this issue 2 years ago • 0 comments

Some test cases fail due to mismatch between tensor's rank and accessor's rank. The trick here is to not specify CMAKE_BUILD_TYPE so the resulting compiler flag will not include -DNDEBUG. These are the test failures after running standard CI command cmake --build <build_dir> -t check

Test project /mnt/composable_kernel/build
    Start  59: example_gemm_bias_e_permute_g1m3n2k1_xdl_fp16
1/7 Test  #59: example_gemm_bias_e_permute_g1m3n2k1_xdl_fp16 ...Subprocess aborted***Exception:   0.39 sec
a_gs_ms_ks: dim 5, lengths {1, 4, 8, 256, 1024}, strides {8388608, 2097152, 262144, 1024, 1}
b_gs_ns_ks: dim 4, lengths {1, 32, 128, 1024}, strides {4194304, 131072, 1024, 1}
d_gs_ms_ns: dim 6, lengths {1, 4, 8, 256, 32, 128}, strides {4096, 0, 0, 0, 128, 1}
e_gs_ms_ns: dim 6, lengths {1, 4, 8, 256, 32, 128}, strides {33554432, 32768, 128, 131072, 1024, 1}
example_gemm_bias_e_permute_g1m3n2k1_xdl_fp16: /mnt/composable_kernel/library/include/ck/library/utility/host_tensor.hpp:125: std::size_t HostTensorDescriptor::GetOffsetFromMultiIndex(Is...) const [Is = <unsigned long, unsigned long, unsigned long, unsigned long, unsigned long>]: Assertion `sizeof...(Is) == this->GetNumOfDimension()' failed.

    Start  60: example_gemm_bias_e_permute_g1m2n3k1_xdl_fp16
2/7 Test  #60: example_gemm_bias_e_permute_g1m2n3k1_xdl_fp16 ...Subprocess aborted***Exception:   0.15 sec
a_gs_ms_ks: dim 4, lengths {1, 4, 256, 256}, strides {262144, 65536, 256, 1}
b_gs_ns_ks: dim 5, lengths {1, 4, 16, 32, 256}, strides {524288, 131072, 8192, 256, 1}
d_gs_ms_ns: dim 6, lengths {1, 4, 256, 4, 16, 32}, strides {2048, 0, 0, 512, 32, 1}
e_gs_ms_ns: dim 6, lengths {1, 4, 256, 4, 16, 32}, strides {2097152, 131072, 32, 524288, 8192, 1}
example_gemm_bias_e_permute_g1m2n3k1_xdl_fp16: /mnt/composable_kernel/library/include/ck/library/utility/host_tensor.hpp:125: std::size_t HostTensorDescriptor::GetOffsetFromMultiIndex(Is...) const [Is = <unsigned long, unsigned long, unsigned long, unsigned long, unsigned long>]: Assertion `sizeof...(Is) == this->GetNumOfDimension()' failed.

    Start  65: example_batched_gemm_bias_e_permute_xdl_fp16
3/7 Test  #65: example_batched_gemm_bias_e_permute_xdl_fp16 ....Subprocess aborted***Exception:   0.14 sec
a_gs_ms_ks: dim 5, lengths {1, 2, 4, 256, 64}, strides {131072, 65536, 16384, 64, 1}
b_gs_ns_ks: dim 5, lengths {1, 2, 16, 128, 64}, strides {262144, 131072, 8192, 64, 1}
d_gs_ms_ns: dim 6, lengths {1, 2, 4, 256, 16, 128}, strides {4096, 2048, 0, 0, 128, 1}
e_gs_ms_ns: dim 6, lengths {1, 2, 4, 256, 16, 128}, strides {4194304, 2097152, 524288, 128, 32768, 1}
example_batched_gemm_bias_e_permute_xdl_fp16: /mnt/composable_kernel/library/include/ck/library/utility/host_tensor.hpp:125: std::size_t HostTensorDescriptor::GetOffsetFromMultiIndex(Is...) const [Is = <unsigned long, unsigned long, unsigned long, unsigned long, unsigned long>]: Assertion `sizeof...(Is) == this->GetNumOfDimension()' failed.

    Start 146: TestConvndFwd.Conv3dFwd
4/7 Test #146: TestConvndFwd.Conv3dFwd .........................Subprocess aborted***Exception:   0.14 sec
Running main() from /mnt/composable_kernel/build/_deps/googletest-src/googletest/src/gtest_main.cc
Note: Google Test filter = TestConvndFwd.Conv3dFwd
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from TestConvndFwd
[ RUN      ] TestConvndFwd.Conv3dFwd
input: dim 6, lengths {1, 128, 256, 7, 7, 7}, strides {11239424, 87808, 1, 12544, 1792, 256}
weight: dim 6, lengths {1, 128, 256, 1, 1, 1}, strides {32768, 256, 1, 256, 256, 256}
output: dim 6, lengths {1, 128, 128, 4, 4, 4}, strides {1048576, 8192, 1, 2048, 512, 128}
test_convnd_fwd: /mnt/composable_kernel/library/include/ck/library/utility/host_tensor.hpp:125: std::size_t HostTensorDescriptor::GetOffsetFromMultiIndex(Is...) const [Is = <unsigned long, unsigned long, unsigned long, unsigned long, unsigned long>]: Assertion `sizeof...(Is) == this->GetNumOfDimension()' failed.

    Start 149: TestConvndBwdWeight.Conv3dBwdWeight
5/7 Test #149: TestConvndBwdWeight.Conv3dBwdWeight .............Subprocess aborted***Exception:   0.14 sec
Running main() from /mnt/composable_kernel/build/_deps/googletest-src/googletest/src/gtest_main.cc
Note: Google Test filter = TestConvndBwdWeight.Conv3dBwdWeight
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from TestConvndBwdWeight
[ RUN      ] TestConvndBwdWeight.Conv3dBwdWeight
input: dim 6, lengths {1, 128, 256, 7, 7, 7}, strides {11239424, 87808, 1, 12544, 1792, 256}
weight: dim 6, lengths {1, 128, 256, 1, 1, 1}, strides {32768, 256, 1, 256, 256, 256}
output: dim 6, lengths {1, 128, 128, 4, 4, 4}, strides {1048576, 8192, 1, 2048, 512, 128}
test_convnd_bwd_weight: /mnt/composable_kernel/library/include/ck/library/utility/host_tensor.hpp:125: std::size_t HostTensorDescriptor::GetOffsetFromMultiIndex(Is...) const [Is = <unsigned long, unsigned long, unsigned long, unsigned long, unsigned long>]: Assertion `sizeof...(Is) == this->GetNumOfDimension()' failed.

    Start 152: TestConvndBwdData.Conv3dBwdData
6/7 Test #152: TestConvndBwdData.Conv3dBwdData .................Subprocess aborted***Exception:   0.16 sec
Running main() from /mnt/composable_kernel/build/_deps/googletest-src/googletest/src/gtest_main.cc
Note: Google Test filter = TestConvndBwdData.Conv3dBwdData
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from TestConvndBwdData
[ RUN      ] TestConvndBwdData.Conv3dBwdData
input: dim 6, lengths {1, 128, 256, 7, 7, 7}, strides {11239424, 87808, 1, 12544, 1792, 256}
weight: dim 6, lengths {1, 128, 256, 1, 1, 1}, strides {32768, 256, 1, 256, 256, 256}
output: dim 6, lengths {1, 128, 128, 4, 4, 4}, strides {1048576, 8192, 1, 2048, 512, 128}
test_convnd_bwd_data: /mnt/composable_kernel/library/include/ck/library/utility/host_tensor.hpp:125: std::size_t HostTensorDescriptor::GetOffsetFromMultiIndex(Is...) const [Is = <unsigned long, unsigned long, unsigned long, unsigned long, unsigned long>]: Assertion `sizeof...(Is) == this->GetNumOfDimension()' failed.

    Start 155: TestGroupedConvNdFwd.GroupedConv3dFwdGNDHWC
7/7 Test #155: TestGroupedConvNdFwd.GroupedConv3dFwdGNDHWC .....Subprocess aborted***Exception:   0.16 sec
Running main() from /mnt/composable_kernel/build/_deps/googletest-src/googletest/src/gtest_main.cc
Note: Google Test filter = TestGroupedConvNdFwd.GroupedConv3dFwdGNDHWC
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from TestGroupedConvNdFwd
[ RUN      ] TestGroupedConvNdFwd.GroupedConv3dFwdGNDHWC
input: dim 6, lengths {2, 128, 256, 7, 7, 7}, strides {11239424, 87808, 1, 12544, 1792, 256}
weight: dim 6, lengths {2, 128, 256, 1, 1, 1}, strides {32768, 256, 1, 256, 256, 256}
output: dim 6, lengths {2, 128, 128, 4, 4, 4}, strides {1048576, 8192, 1, 2048, 512, 128}
test_grouped_convnd_fwd: /mnt/composable_kernel/library/include/ck/library/utility/host_tensor.hpp:125: std::size_t HostTensorDescriptor::GetOffsetFromMultiIndex(Is...) const [Is = <unsigned long, unsigned long, unsigned long, unsigned long, unsigned long>]: Assertion `sizeof...(Is) == this->GetNumOfDimension()' failed.


0% tests passed, 7 tests failed out of 7

Total Test time (real) =   1.29 sec

The following tests FAILED:
         59 - example_gemm_bias_e_permute_g1m3n2k1_xdl_fp16 (Subprocess aborted)
         60 - example_gemm_bias_e_permute_g1m2n3k1_xdl_fp16 (Subprocess aborted)
         65 - example_batched_gemm_bias_e_permute_xdl_fp16 (Subprocess aborted)
        146 - TestConvndFwd.Conv3dFwd (Subprocess aborted)
        149 - TestConvndBwdWeight.Conv3dBwdWeight (Subprocess aborted)
        152 - TestConvndBwdData.Conv3dBwdData (Subprocess aborted)
        155 - TestGroupedConvNdFwd.GroupedConv3dFwdGNDHWC (Subprocess aborted)

rosenrodt avatar Sep 13 '22 01:09 rosenrodt