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

[GSoC 2024] Binding PyElastica with Elastica++ #391

Merged
merged 65 commits into from
Sep 22, 2024

Conversation

ankith26
Copy link

@ankith26 ankith26 commented May 31, 2024

GSoC 2024 Project PR

GSoC experience, learnings and acknowledgements

I'd like to thank all developers of PyElastica, the members at Python Software Foundation, GSoC admins at Google and everyone else who's work has gone behind making my GSoC project possible. This was indeed a great learning opportunity for me. Over the course of the project I got to learn and use various tools, in particular, this project helped me better understand using pybind11 in C++.

I had a great experience contributing to this project. Special thanks to all my mentors, who were very helpful, active and understading during this project. It goes without saying that their guidance and support has been crucial for this project.

Objective

The goal of the project is to implement bindings for C++ based Elastica++ to the python based PyElastica, to achieve speedups. It covers selecting a suitable C++ build system and setting up the compilation architecture, writing binding code using pybind11 or alternative methods, benchmarking against existing Python implementations, expanding unit tests, polishing documentation and typestubs, and updating the CI pipeline for building and testing on multiple Python versions.

Summary of what was done

  • In the community bonding period, I worked on improving the type-hinting across the PyElastica codebase: Typing: Add typehinting for Rod modules #341
  • After that, in the first few weeks, I got the meson based buildsystem set up for handling the building. I set up a script to autoinstall and manage the dependencies that are needed for compilation.
  • I then started experimenting and implementing some math functions (difference_kernel, batch_matmul, batch_matvec, batch_cross, batch_dot, batch_norm).
  • I integrated blaze-based Vector/Matrix/Tensor objects in the elasticapp backend.
  • Then I ported the SO3 operations (rotate and inv_rotate).
  • I then did some work on getting the CosseratRod class usable in my branch. However, this needs more work before it is completely usable.
  • Finally, I added performance benchmarks and unit tests to cover my changes, and also added CI for the same.

I also have a week-wise breakdown of what I did, available here:

Week-wise breakdown (click to expand)

Week 1 (May 27 - June 2)

This week, I'm mostly reading up on and experimenting with build systems.

  • In the first commit, I integrate scikit-build-core (which uses cmake), removing the current setup.py in the process. The metadata from the removed setup.py has been ported to pyproject.toml
  • In the second commit, I add a basic meson-python (which uses meson) based system that also integrates with a pybind11 example, to serve as a POC. This example compiles and is usable from python code.

The goal this week is to experiment and compare both systems side by side in action, and later pick and polish the more suitable option (based on mentor feedback)

Week 2 (June 3 - June 9)

This week I played around with dependency handling. I was keen to look into the "meson wraps" system, but I quickly hit into a couple of issues with this approach.

For one, to install blaze and blaze_tensor, I had to pass custom arguments to the underlying cmake build, which was not possible via the simple meson wraps interface. I also had other troubles/errors while trying to make wraps I had written work for the other dependencies. The only dependencies that worked via wraps were brigand and cxxopts.

To handle blaze, blaze_tensor and sleef I wrote a custom shell script that can clone, build and install them in a deps directory in the source tree. I got the meson buildconfig to work with these dependencies.

Week 3 (June 10 - June 16)

I experimented with and implemented the batch_matmul linalg function in different ways in C++ for testing and benchmarking purposes. Added the elasticapp._linalg submodule for the same.

Also added a simple benchmarking script in the backend/benchmarks folder.

Week 4 (June 17 - June 23)

I wrapped 6 linalg functions that were in Utilities/Math/BlazeDetail/BlazeLinearAlgebra.hpp in the python elasticapp._linalg module and also added tests and basic docs for the same.

I spent a while trying to find out more optimal ways to do the wrapping, and I could not figure out a way to improve upon my current naive approach (which involves a lot of copying in input/output arrays).

Week 5 (June 24 - June 30) and Week 6 (July 1 - July 7)

I first integrated the Vector/Matrix/Tensor object wrapping implemented in Utilities/Math/Python (with a couple of minor fixes done to get it compiling) in the python _PyArrays submodule. I then updated the linalg wrappings to make use of these objects directly. This lead to the expected performance enhancement, as the problem of performance hits due to unneeded array copying was solved.
Updated the benchmarks and tests accordingly to measure the performance enhancement and test correctness of the new approach, respectively.
Finally, to wrap up the first half of my project, I documented the setup implemented so far (with installation, testing and benchmarking instructions)

Week 7 (July 8 - July 14)

  • Added a simple benchmarking script for the batch_cross operation.
  • Fixed an issue where the meson build wasn't passing some compiler defines that helps optimize blaze usage.
  • Added a basic CI for the backend, to ensure the project compiles as expected in the isolated runner, and also verifies that the tests keep passing.
  • Brigand dependency handling was broken on CI. The wrap system had some issues in handling the headers correctly so I switched it to follow the same buildscript strategy blaze/blaze_tensor/sleef already use to fix it.
  • I exported the inv_rotate rotation functionality (both SIMD and scalar variants) while handling the span_vector argument as an optional overload. Also added the corresponding tests and benchmarking (observed a consistent improvement here).

Week 8 (July 15 - July 21)

I binded the rotate functionality in elasticapp._rotations along with the corresponding benchmarking and testing.

I also started looking into the CosseratRod bindings.

Week 9 (July 22 - July 28) and Week 10 (July 29 - August 4)

I continued experimenting with CosseratRod bindings, but this turned out to be a fairly involved task. With tens of thousands of lines of rod related code available, I'll admit I couldn't make much sense of it.

But I could fix the compilation by commenting out the problematic code and then applying a few minor patches. At this point, a CosseratRod class is importable in python but not very usable (I couldn't figure out a constructor for the class)

Week 11 (August 5 - August 11)

After I got stuck on issues last week, @skim0119 implemented the _CosseratRodBlock bindings. I fixed a couple of failing unit tests as a result of the new changes, by fixing _PyTags link-time issues.

I also added a test script to test the construction and attributes of the _CosseratRodBlock on the python side.

Week 12 (August 12 - August 18) and the Final week (August 19 - August 26)

In these weeks I'm focusing on cleanups, documentation and other general minor enhancements to wrap up my project.

What's next

Elastica++ is a large codebase and there are many more submodules that can be integrated into the backend. Many of the submodules were out of scope for this project. The buildsystem can be expanded to handle more dependencies like oneTBB that can be used to add threading/parallelism to further speed up the operations at the C++ level.

@skim0119 skim0119 marked this pull request as draft June 2, 2024 12:13
Copy link

codecov bot commented Jun 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.98%. Comparing base (581672c) to head (70a073b).
Report is 3 commits behind head on elasticapp-integration.

Additional details and impacted files
@@                   Coverage Diff                   @@
##           elasticapp-integration     #391   +/-   ##
=======================================================
  Coverage                   93.98%   93.98%           
=======================================================
  Files                          51       51           
  Lines                        3193     3193           
  Branches                      347      347           
=======================================================
  Hits                         3001     3001           
  Misses                        142      142           
  Partials                       50       50           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ankith26
Copy link
Author

ankith26 commented Jul 3, 2024

Errors I'm getting when trying to compile Utilities/Math/Python

(click to expand) C++ compiler error log
      FAILED: src/_PyArrays.cpython-312-x86_64-linux-gnu.so.p/Utilities_Math_Python_BlazeMatrix.cpp.o
      c++ -Isrc/_PyArrays.cpython-312-x86_64-linux-gnu.so.p -Isrc -I../src -I/tmp/pip-build-env-bf59qldc/overlay/lib/python3.12/site-packages/pybind11/include -I/usr/include/python3.12 -I/usr/include/x86_64-linux-gnu/python3.12 -I/home/ankith/mount/gitstuff/personal/ankith26/PyElastica/deps/blaze -I/home/ankith/mount/gitstuff/personal/ankith26/PyElastica/deps/blaze_tensor -fvisibility=hidden -fvisibility-inlines-hidden -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -fPIC -MD -MQ src/_PyArrays.cpython-312-x86_64-linux-gnu.so.p/Utilities_Math_Python_BlazeMatrix.cpp.o -MF src/_PyArrays.cpython-312-x86_64-linux-gnu.so.p/Utilities_Math_Python_BlazeMatrix.cpp.o.d -o src/_PyArrays.cpython-312-x86_64-linux-gnu.so.p/Utilities_Math_Python_BlazeMatrix.cpp.o -c ../src/Utilities/Math/Python/BlazeMatrix.cpp
      In file included from ../src/Utilities/Math/Python/BlazeMatrix.cpp:11:
      ../src/Utilities/Math/Python/SliceHelpers.hpp: In function ‘auto py_bindings::check_slice(std::size_t, pybind11::slice)’:
      ../src/Utilities/Math/Python/SliceHelpers.hpp:43:46: error: invalid operands of types ‘const char [33]’ and ‘long unsigned int’ to binary ‘operator<<’
         43 |           "step !=1 unsupported along axis " << Axis));
            |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
      ../src/Utilities/Math/Python/BlazeMatrix.cpp: In lambda function:
      ../src/Utilities/Math/Python/BlazeMatrix.cpp:95:56: error: ‘MakeString’ was not declared in this scope
         95 |             +[](const type& self) { return std::string(MakeString{} << self); })
            |                                                        ^~~~~~~~~~
      ../src/Utilities/Math/Python/BlazeMatrix.cpp: In function ‘void py_bindings::bind_blaze_matrix(pybind11::module&)’:
      ../src/Utilities/Math/Python/BlazeMatrix.cpp:95:13: error: no match for ‘operator+’ (operand type is ‘py_bindings::bind_blaze_matrix(pybind11::module&)::<lambda(const type&)>’)
         95 |             +[](const type& self) { return std::string(MakeString{} << self); })
            |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      [5/9] Compiling C++ object src/_PyArrays.cpython-312-x86_64-linux-gnu.so.p/Utilities_Math_Python_BlazeTensor.cpp.o
      FAILED: src/_PyArrays.cpython-312-x86_64-linux-gnu.so.p/Utilities_Math_Python_BlazeTensor.cpp.o
      c++ -Isrc/_PyArrays.cpython-312-x86_64-linux-gnu.so.p -Isrc -I../src -I/tmp/pip-build-env-bf59qldc/overlay/lib/python3.12/site-packages/pybind11/include -I/usr/include/python3.12 -I/usr/include/x86_64-linux-gnu/python3.12 -I/home/ankith/mount/gitstuff/personal/ankith26/PyElastica/deps/blaze -I/home/ankith/mount/gitstuff/personal/ankith26/PyElastica/deps/blaze_tensor -fvisibility=hidden -fvisibility-inlines-hidden -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -fPIC -MD -MQ src/_PyArrays.cpython-312-x86_64-linux-gnu.so.p/Utilities_Math_Python_BlazeTensor.cpp.o -MF src/_PyArrays.cpython-312-x86_64-linux-gnu.so.p/Utilities_Math_Python_BlazeTensor.cpp.o.d -o src/_PyArrays.cpython-312-x86_64-linux-gnu.so.p/Utilities_Math_Python_BlazeTensor.cpp.o -c ../src/Utilities/Math/Python/BlazeTensor.cpp
      In file included from ../src/Utilities/Math/Python/BlazeTensor.cpp:11:
      ../src/Utilities/Math/Python/SliceHelpers.hpp: In function ‘auto py_bindings::check_slice(std::size_t, pybind11::slice)’:
      ../src/Utilities/Math/Python/SliceHelpers.hpp:43:46: error: invalid operands of types ‘const char [33]’ and ‘long unsigned int’ to binary ‘operator<<’
         43 |           "step !=1 unsupported along axis " << Axis));
            |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
      ../src/Utilities/Math/Python/BlazeTensor.cpp: In lambda function:
      ../src/Utilities/Math/Python/BlazeTensor.cpp:86:49: error: expected ‘;’ before ‘)’ token
         86 |                                   std::get<2>(x));
            |                                                 ^
            |                                                 ;
      ../src/Utilities/Math/Python/BlazeTensor.cpp: In lambda function:
      ../src/Utilities/Math/Python/BlazeTensor.cpp:100:49: error: expected ‘;’ before ‘)’ token
        100 |                                   std::get<2>(x));
            |                                                 ^
            |                                                 ;
      ../src/Utilities/Math/Python/BlazeTensor.cpp: In lambda function:
      ../src/Utilities/Math/Python/BlazeTensor.cpp:106:34: error: ‘MakeString’ was not declared in this scope
        106 |               return std::string(MakeString{} << self);
            |                                  ^~~~~~~~~~
      ../src/Utilities/Math/Python/BlazeTensor.cpp: In function ‘void py_bindings::bind_blaze_tensor(pybind11::module&)’:
      ../src/Utilities/Math/Python/BlazeTensor.cpp:105:24: error: no match for ‘operator+’ (operand type is ‘py_bindings::bind_blaze_tensor(pybind11::module&)::<lambda(const type&)>’)
        105 |             "__str__", +[](const type& self) {
            |                        ^~~~~~~~~~~~~~~~~~~~~~~
        106 |               return std::string(MakeString{} << self);
            |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        107 |             });
            |             ~
      [6/9] Compiling C++ object src/_PyArrays.cpython-312-x86_64-linux-gnu.so.p/Utilities_Math_Python_BlazeVector.cpp.o
      FAILED: src/_PyArrays.cpython-312-x86_64-linux-gnu.so.p/Utilities_Math_Python_BlazeVector.cpp.o
      c++ -Isrc/_PyArrays.cpython-312-x86_64-linux-gnu.so.p -Isrc -I../src -I/tmp/pip-build-env-bf59qldc/overlay/lib/python3.12/site-packages/pybind11/include -I/usr/include/python3.12 -I/usr/include/x86_64-linux-gnu/python3.12 -I/home/ankith/mount/gitstuff/personal/ankith26/PyElastica/deps/blaze -I/home/ankith/mount/gitstuff/personal/ankith26/PyElastica/deps/blaze_tensor -fvisibility=hidden -fvisibility-inlines-hidden -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -fPIC -MD -MQ src/_PyArrays.cpython-312-x86_64-linux-gnu.so.p/Utilities_Math_Python_BlazeVector.cpp.o -MF src/_PyArrays.cpython-312-x86_64-linux-gnu.so.p/Utilities_Math_Python_BlazeVector.cpp.o.d -o src/_PyArrays.cpython-312-x86_64-linux-gnu.so.p/Utilities_Math_Python_BlazeVector.cpp.o -c ../src/Utilities/Math/Python/BlazeVector.cpp
      In file included from ../src/Utilities/Math/Python/BlazeVector.cpp:9:
      ../src/Utilities/Math/Python/SliceHelpers.hpp: In function ‘auto py_bindings::check_slice(std::size_t, pybind11::slice)’:
      ../src/Utilities/Math/Python/SliceHelpers.hpp:43:46: error: invalid operands of types ‘const char [33]’ and ‘long unsigned int’ to binary ‘operator<<’
         43 |           "step !=1 unsupported along axis " << Axis));
            |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
      ../src/Utilities/Math/Python/BlazeVector.cpp: In function ‘void py_bindings::bind_blaze_vector(pybind11::module&)’:
      ../src/Utilities/Math/Python/BlazeVector.cpp:115:13: error: no matching function for call to ‘pybind11::class_<blaze::DynamicVector<double, false, blaze::AlignedAllocator<double> > >::def(const char [8])’
        114 |     py_vector
            |     ~~~~~~~~~
        115 |         .def("__str__")
            |         ~~~~^~~~~~~~~~~
      In file included from ../src/Utilities/Math/Python/SliceHelpers.hpp:16:
      /tmp/pip-build-env-bf59qldc/overlay/lib/python3.12/site-packages/pybind11/include/pybind11/pybind11.h:1668:13: note: candidate: ‘template<class Func, class ... Extra> pybind11::class_<type_, options>& pybind11::class_<type_, options>::def(const char*, Func&&, const Extra& ...) [with Extra = Func; type_ = blaze::DynamicVector<double, false, blaze::AlignedAllocator<double> >; options = {}]’
       1668 |     class_ &def(const char *name_, Func &&f, const Extra &...extra) {
            |             ^~~
      /tmp/pip-build-env-bf59qldc/overlay/lib/python3.12/site-packages/pybind11/include/pybind11/pybind11.h:1668:13: note:   template argument deduction/substitution failed:
      ../src/Utilities/Math/Python/BlazeVector.cpp:115:13: note:   candidate expects at least 2 arguments, 1 provided
        114 |     py_vector
            |     ~~~~~~~~~
        115 |         .def("__str__")
            |         ~~~~^~~~~~~~~~~
      /tmp/pip-build-env-bf59qldc/overlay/lib/python3.12/site-packages/pybind11/include/pybind11/pybind11.h:1693:13: note: candidate: ‘template<class T, class ... Extra, typename std::enable_if<T::op_enable_if_hook, int>::type <anonymous> > pybind11::class_<type_, options>& pybind11::class_<type_, options>::def(const T&, const Extra& ...) [with Extra = T; typename std::enable_if<T::op_enable_if_hook, int>::type <anonymous> = {Extra ...}; type_ = blaze::DynamicVector<double, false, blaze::AlignedAllocator<double> >; options = {}]’
       1693 |     class_ &def(const T &op, const Extra &...extra) {
            |             ^~~
      /tmp/pip-build-env-bf59qldc/overlay/lib/python3.12/site-packages/pybind11/include/pybind11/pybind11.h:1693:13: note:   template argument deduction/substitution failed:
      /tmp/pip-build-env-bf59qldc/overlay/lib/python3.12/site-packages/pybind11/include/pybind11/pybind11.h:1692:95: error: ‘op_enable_if_hook’ is not a member of ‘char [8]’
       1692 |     template <typename T, typename... Extra, detail::enable_if_t<T::op_enable_if_hook, int> = 0>
            |                                                                                               ^
      /tmp/pip-build-env-bf59qldc/overlay/lib/python3.12/site-packages/pybind11/include/pybind11/pybind11.h:1705:13: note: candidate: ‘template<class ... Args, class ... Extra> pybind11::class_<type_, options>& pybind11::class_<type_, options>::def(const pybind11::detail::initimpl::constructor<Args ...>&, const Extra& ...) [with Args = {Args ...}; Extra = {Extra ...}; type_ = blaze::DynamicVector<double, false, blaze::AlignedAllocator<double> >; options = {}]’
       1705 |     class_ &def(const detail::initimpl::constructor<Args...> &init, const Extra &...extra) {
            |             ^~~
      /tmp/pip-build-env-bf59qldc/overlay/lib/python3.12/site-packages/pybind11/include/pybind11/pybind11.h:1705:13: note:   template argument deduction/substitution failed:
      ../src/Utilities/Math/Python/BlazeVector.cpp:115:13: note:   mismatched types ‘const pybind11::detail::initimpl::constructor<Args ...>’ and ‘const char [8]’
        114 |     py_vector
            |     ~~~~~~~~~
        115 |         .def("__str__")
            |         ~~~~^~~~~~~~~~~
      /tmp/pip-build-env-bf59qldc/overlay/lib/python3.12/site-packages/pybind11/include/pybind11/pybind11.h:1712:13: note: candidate: ‘template<class ... Args, class ... Extra> pybind11::class_<type_, options>& pybind11::class_<type_, options>::def(const pybind11::detail::initimpl::alias_constructor<Args ...>&, const Extra& ...) [with Args = {Args ...}; Extra = {Extra ...}; type_ = blaze::DynamicVector<double, false, blaze::AlignedAllocator<double> >; options = {}]’
       1712 |     class_ &def(const detail::initimpl::alias_constructor<Args...> &init, const Extra &...extra) {
            |             ^~~
      /tmp/pip-build-env-bf59qldc/overlay/lib/python3.12/site-packages/pybind11/include/pybind11/pybind11.h:1712:13: note:   template argument deduction/substitution failed:
      ../src/Utilities/Math/Python/BlazeVector.cpp:115:13: note:   mismatched types ‘const pybind11::detail::initimpl::alias_constructor<Args ...>’ and ‘const char [8]’
        114 |     py_vector
            |     ~~~~~~~~~
        115 |         .def("__str__")
            |         ~~~~^~~~~~~~~~~
      /tmp/pip-build-env-bf59qldc/overlay/lib/python3.12/site-packages/pybind11/include/pybind11/pybind11.h:1719:13: note: candidate: ‘template<class ... Args, class ... Extra> pybind11::class_<type_, options>& pybind11::class_<type_, options>::def(pybind11::detail::initimpl::factory<Args ...>&&, const Extra& ...) [with Args = {Args ...}; Extra = {Extra ...}; type_ = blaze::DynamicVector<double, false, blaze::AlignedAllocator<double> >; options = {}]’
       1719 |     class_ &def(detail::initimpl::factory<Args...> &&init, const Extra &...extra) {
            |             ^~~
      /tmp/pip-build-env-bf59qldc/overlay/lib/python3.12/site-packages/pybind11/include/pybind11/pybind11.h:1719:13: note:   template argument deduction/substitution failed:
      ../src/Utilities/Math/Python/BlazeVector.cpp:115:13: note:   mismatched types ‘pybind11::detail::initimpl::factory<Args ...>’ and ‘const char [8]’
        114 |     py_vector
            |     ~~~~~~~~~
        115 |         .def("__str__")
            |         ~~~~^~~~~~~~~~~
      /tmp/pip-build-env-bf59qldc/overlay/lib/python3.12/site-packages/pybind11/include/pybind11/pybind11.h:1725:13: note: candidate: ‘template<class ... Args, class ... Extra> pybind11::class_<type_, options>& pybind11::class_<type_, options>::def(pybind11::detail::initimpl::pickle_factory<Args ...>&&, const Extra& ...) [with Args = {Args ...}; Extra = {Extra ...}; type_ = blaze::DynamicVector<double, false, blaze::AlignedAllocator<double> >; options = {}]’
       1725 |     class_ &def(detail::initimpl::pickle_factory<Args...> &&pf, const Extra &...extra) {
            |             ^~~
      /tmp/pip-build-env-bf59qldc/overlay/lib/python3.12/site-packages/pybind11/include/pybind11/pybind11.h:1725:13: note:   template argument deduction/substitution failed:
      ../src/Utilities/Math/Python/BlazeVector.cpp:115:13: note:   mismatched types ‘pybind11::detail::initimpl::pickle_factory<Args ...>’ and ‘const char [8]’
        114 |     py_vector
            |     ~~~~~~~~~
        115 |         .def("__str__")
            |         ~~~~^~~~~~~~~~~
      [7/9] Compiling C++ object src/_linalg.cpython-312-x86_64-linux-gnu.so.p/_linalg.cpp.o
      In file included from ../src/_linalg.cpp:5:
      ../src/Utilities/Math/BlazeDetail/BlazeLinearAlgebra.hpp: In instantiation of ‘auto elastica::batch_dot(const MT1&, const MT2&) [with MT1 = blaze::DynamicMatrix<double>; MT2 = blaze::DynamicMatrix<double>]’:
      ../src/_linalg.cpp:271:44:   required from here
      ../src/Utilities/Math/BlazeDetail/BlazeLinearAlgebra.hpp:206:27: warning: unused variable ‘dimension’ [-Wunused-variable]
        206 |     constexpr std::size_t dimension(3UL);
            |                           ^~~~~~~~~
      ../src/Utilities/Math/BlazeDetail/BlazeLinearAlgebra.hpp:207:23: warning: unused variable ‘n_elems’ [-Wunused-variable]
        207 |     const std::size_t n_elems = first_vector_batch.columns();
            |                       ^~~~~~~
      ../src/Utilities/Math/BlazeDetail/BlazeLinearAlgebra.hpp: In instantiation of ‘auto elastica::batch_norm(const MT&) [with MT = blaze::DynamicMatrix<double>]’:
      ../src/_linalg.cpp:301:45:   required from here
      ../src/Utilities/Math/BlazeDetail/BlazeLinearAlgebra.hpp:238:27: warning: unused variable ‘dimension’ [-Wunused-variable]
        238 |     constexpr std::size_t dimension(3UL);
            |                           ^~~~~~~~~
      ../src/Utilities/Math/BlazeDetail/BlazeLinearAlgebra.hpp: In instantiation of ‘void elastica::batch_matmul(TT1&, const TT2&, const TT3&) [with TT1 = blaze::DynamicTensor<double>; TT2 = blaze::DynamicTensor<double>; TT3 = blaze::DynamicTensor<double>]’:
      ../src/_linalg.cpp:190:27:   required from here
      ../src/Utilities/Math/BlazeDetail/BlazeLinearAlgebra.hpp:113:23: warning: unused variable ‘n_elems’ [-Wunused-variable]
        113 |     const std::size_t n_elems = first_matrix_batch.columns();
            |                       ^~~~~~~
      ninja: build stopped: subcommand failed.
      [end of output]

UPDATE: this issue has been fixed now

@skim0119 skim0119 marked this pull request as ready for review September 22, 2024 01:44
@skim0119
Copy link
Collaborator

We'll merge this gsoc -> elasticapp-integration, and continue polishing in the other branch. Thanks @ankith26

@skim0119 skim0119 merged commit 85ddf84 into GazzolaLab:elasticapp-integration Sep 22, 2024
8 checks passed
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