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

Add dense_asymm GEMM test for complex value tensors. #396

Closed
wants to merge 1 commit into from

Conversation

tyzhang1993
Copy link

This PR adds complex-value GEMM test in ta_dense_asymm.cpp for benchmark purpose.

@tyzhang1993
Copy link
Author

@evaleev I am trying to make this change of code for benchmark purpose. However, it does not compile with error message:

[ 98%] Building CXX object _deps/tiledarray-build/examples/dgemm/CMakeFiles/ta_dense_asymm.dir/ta_dense_asymm.cpp.o
In file included from /Users/zty/Source/chronusq_dev_github/build/_deps/tiledarray-src/examples/dgemm/ta_dense_asymm.cpp:21:
In file included from /Users/zty/Source/chronusq_dev_github/build/_deps/tiledarray-src/src/tiledarray.h:29:
In file included from /Users/zty/Source/chronusq_dev_github/build/_deps/tiledarray-src/src/TiledArray/tensor.h:33:
/Users/zty/Source/chronusq_dev_github/build/_deps/tiledarray-src/src/TiledArray/tensor/tensor_interface.h:1046:12: error: no viable conversion from returned value of type 'TiledArray::detail::TensorInterface<const std::complex<double>, TiledArray::Range, btas::Tensor<std::complex<double>, TiledArray::Range>>::numeric_type' (aka 'std::complex<double>') to function return type 'TiledArray::detail::TensorInterface<const std::complex<double>, TiledArray::Range, btas::Tensor<std::complex<double>, TiledArray::Range>>::scalar_type' (aka 'double')
    return reduce(square_op, sum_op, numeric_type(0));
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/zty/Source/chronusq_dev_github/build/_deps/tiledarray-src/src/TiledArray/external/btas.h:742:23: note: in instantiation of member function 'TiledArray::detail::TensorInterface<const std::complex<double>, TiledArray::Range, btas::Tensor<std::complex<double>, TiledArray::Range>>::squared_norm' requested here
  return make_ti(arg).squared_norm();
                      ^
/Users/zty/Source/chronusq_dev_github/build/_deps/tiledarray-src/src/TiledArray/tile.h:1515:10: note: in instantiation of function template specialization 'btas::squared_norm<std::complex<double>, TiledArray::Range, std::vector<std::complex<double>>>' requested here
  return squared_norm(arg.tensor());
         ^

Could you please help me with this? Thanks!

@evaleev
Copy link
Member

evaleev commented Mar 21, 2023

subsumed by #397 ... TA::Tile<btas::Tensor<complex>> had some uses of numeric_type in place of scalar_type

@evaleev evaleev closed this Mar 21, 2023
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

Successfully merging this pull request may close these issues.

2 participants