Fix MSAN failures.

This commit is contained in:
Antonio Sánchez 2023-12-22 03:18:46 +00:00 committed by Charles Schlosser
parent 9697d481c8
commit fee5d60b50
2 changed files with 5 additions and 3 deletions

View File

@ -13,9 +13,9 @@
void test_parallelize_gemm() {
constexpr int n = 1024;
constexpr int num_threads = 4;
MatrixXf a(n, n);
MatrixXf b(n, n);
MatrixXf c(n, n);
MatrixXf a = MatrixXf::Random(n, n);
MatrixXf b = MatrixXf::Random(n, n);
MatrixXf c = MatrixXf::Random(n, n);
c.noalias() = a * b;
ThreadPool pool(num_threads);

View File

@ -36,6 +36,8 @@ template <int DataLayout>
static void test_static_dimension_failure() {
Tensor<int, 2, DataLayout> left(2, 3);
Tensor<int, 3, DataLayout> right(2, 3, 1);
left.setRandom();
right.setRandom();
#ifdef CXX11_TENSOR_CONCATENATION_STATIC_DIMENSION_FAILURE
// Technically compatible, but we static assert that the inputs have same