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

Allow Put/Get functions to accept Kokkos Views #3254

Closed
wants to merge 6 commits into from

Conversation

anagainaru
Copy link
Contributor

@anagainaru anagainaru commented Jun 20, 2022

Allow ADIOS2 Put/Get functions to accept Kokkos::View objects.

Kokkos::View<float*, Kokkos::CudaSpace> gpuSimData("gpuBuffer", N);
Kokkos::View<float*, Kokkos::HostSpace> hostSimData("simBuffer", N);

bpWriter.Put(data, hostSimData);
bpWriter.Put(data, gpuSimData);

Optionally data.SetMemorySpace(adios2::MemorySpace::CUDA); can be used to set the ADIOS2 memory space to CUDA

All changes are in the CXX bindings.

@anagainaru anagainaru changed the title Allow Put/Get functions to accept Kokkos Views [WIP] Allow Put/Get functions to accept Kokkos Views Jun 21, 2022
@anagainaru anagainaru changed the title [WIP] Allow Put/Get functions to accept Kokkos Views Allow Put/Get functions to accept Kokkos Views Jun 28, 2022
@anagainaru
Copy link
Contributor Author

anagainaru commented Jun 28, 2022

Kokkos creates Views for different memory spaces at compile time so I had to instantiate Put/Get functions for HostSpace and CudaSpace. It will be similar when we run with Sycl or HIP.

If anyone has a cleaner solution for this let me know (maybe @vicentebolea). Otherwise I will merge so I can start testing the next step

@vicentebolea
Copy link
Collaborator

@anagainaru great work with this

If anyone has a cleaner solution for this let me know (maybe @vicentebolea)

I would avoid populating the ADIOS2 namespace with Kokkos symbols. I would suggest to create a new ADIOS2 class that is called ADIOS2::View that encapsulate the Kokkos::View. This class could possibly use the PIMPL pattern to relegate to its cpp the Kokkos include. You do not want includes to other libraries in headers/tcc.

On another topic I think that this change warrants a new unit test to check this.

For future myself, I would propose to equip our next CUDA build with Kokkos as well

@anagainaru
Copy link
Contributor Author

anagainaru commented Jun 29, 2022

Thanks for the comments @vicentebolea !

I would avoid populating the ADIOS2 namespace with Kokkos symbols. I would suggest to create a new ADIOS2 class that is called ADIOS2::View that encapsulate the Kokkos::View. This class could possibly use the PIMPL pattern to relegate to its cpp the Kokkos include. You do not want includes to other libraries in headers/tcc.

For internal functions I agree it will be better to create some ADIOS class, but for the interface I really think it would be more confusing to users. If their application is already using Kokkos it's easier to just feed the Kokkos View to the Put/Get functions. The only reason Kokkos is included in the header of the ADIOS source code is because I needed to define all the functions to instantiate.

What I propose is to leave the CXX bindings with Kokkos and keep the main source code of ADIOS clean, by moving the instantiation list in the CXX bindings.

On another topic I think that this change warrants a new unit test to check this.
For future myself, I would propose to equip our next CUDA build with Kokkos as well

Completely agree with this, I can help create some tests with different backends. We can discuss this more.

@eisenhauer
Copy link
Member

So, I'm trying to think through the situation where, for example, an ADIOS module on some machine was built with Kokkos (and maybe whatever other package we might change our API to support). It looks like applications that use ADIOS but don't use Kokkos still just have to #include ADIOS.h, is that right? And presumably Chuck's magic takes care of linking all the appropriate libraries behind the scenes, as long as applications build with CMake. It'd be nice if having Kokkos in the build, bindings or otherwise, doesn't overly complicate the lives of users who don't use it...

@anagainaru
Copy link
Contributor Author

So, I'm trying to think through the situation where, for example, an ADIOS module on some machine was built with Kokkos (and maybe whatever other package we might change our API to support). It looks like applications that use ADIOS but don't use Kokkos still just have to #include ADIOS.h, is that right? And presumably Chuck's magic takes care of linking all the appropriate libraries behind the scenes, as long as applications build with CMake. It'd be nice if having Kokkos in the build, bindings or otherwise, doesn't overly complicate the lives of users who don't use it...

You only have to include ADIOS.h if you don't use Kokkos in your app regardless if you build ADIOS with Kokkos or not. The only difference is that if you build it with Kokkos, there will pe Put/Get interfaces in CXX that allow you to pass a Kokkos view

@williamfgc
Copy link
Contributor

In a way what @anagainaru is describing is what we do with MPI as another public dependency (something like ifdef #ADIOS2_USE_KOKKOS) although less optional than Kokkos. In the past we asked C++ users (e.g. @ax3l) to provide feedback for public facing APIs. Seeing code side-by-side might be helpful as well.

@vicentebolea
Copy link
Collaborator

What I propose is to leave the CXX bindings with Kokkos and keep the main source code of ADIOS clean, by moving the instantiation list in the CXX bindings.

I understand this, it is in fact a great idea so you use ADIOS main source code as a black box where you just store the View pointer.

My concern is that since you only need the Kokkos::View it is overkill to include all of its namespace in on of ADIOS main headers. Even if this is only enabled when Kokkos is enabled one reason might be that the user wants to pass an Kokkos View pointer but he himself does not want to include Kokkos. The solution of having a class that represent this will also help us not to change the the adios engine template (API) if we decide to support another framework of its kind, maybe SYCL/oneapi?

class AdiosView {
   virtual void* GetNativeView()
}

// in adiosviewkokkosheader

include AdiosView
include kokkos
template <class T, class MemSpace>
class AdiosViewKokkos: public AdiosView
{
   AdiosView(Kokkos::View<T, Memspace>);
   virtual void* GetNativeView() { return reintepreter_cast<void*>(ptr); }
   Kokkos::View<T, Memspace>* ptr;
}

Instantiate all templates

// In user code
// this 3 lines can be in this file or in another one.
include  adiosviewkokkosheader
Kokkos::View<10,10> v(10);
AdiosView = new AdiosViewKokkos(v);

engine.put(myvar, v);

We can use smart pointers and factory methods to make avoid the new usage and calling constructors directly.

@vicentebolea
Copy link
Collaborator

In a way what @anagainaru is describing is what we do with MPI as another public dependency

@williamfgc MPI is a different order of library type, it is expected to be found with a stable API just about in any machine, Kokkos is a still young project and very optional, plus our support to it is very limited.

@anagainaru
Copy link
Contributor Author

@vicentebolea I understand your point and I agree that Kokkos is a young, optional project. However, I am sure that the only time ADIOS will be build with Kokkos is when the application is using Kokkos in which case it's so much more intuitive to just pass the Kokkos View.

Agree also that for now it is an overkill to include the entire namespace, but we plan to use Kokkos internally to compute the metadata and copying the data in our buffer (I have a draft code already for it, I'll add it once I have time to do more testing).

For now, I would leave this PR the way it is and once I finish the other PR we can discuss what our strategy should be.

@ax3l
Copy link
Contributor

ax3l commented Jun 29, 2022

I have a similar design philosophy as Vicente is proposing.

Here is a longer writeup why I would also prefer a separate header for extended functionality:
betterscientificsoftware/bssw.io#1362

@eisenhauer
Copy link
Member

I would also tend to agree with @vicentebolea . Yes, if individual users are building ADIOS specifically customized to their use cases, then an ADIOS build with Kokkos is likely to only used by Kokkos applications. But we'd like to be a standard system library/module that users don't have to build a custom version of themselves.

@anagainaru
Copy link
Contributor Author

@ax3l completely agree, there is a Kokkos header that only has forward declaration so I am using that in the h files.

Is this acceptable?

@williamfgc
Copy link
Contributor

williamfgc commented Jun 30, 2022

A few things:

  • Kokkos has been very stable for a while, and it's a well-established ECP funded project.
  • MPI has int/void API differences between MPICH and OpenMPI (there is a workaround in ADIOS constructors). Not to mention than vendor-specific MPI have subtle differences in the toolchain (e.g. libmpi_cray.so , but that's a CMake problem)

Sounds like a larger discussion. In general, I wouldn't add to the API a new class for minimal functionality when overloading might do the job. C++17 is much better at this with things like template auto-deduction or std::any for safety.

I might be missing something, but for simplicity why not just overloading Put/Get at compile-time and make Kokkos an optional dependency (just like MPI is)?

#ifdef ADIOS2_HAVE_KOKKOS
Put<T>( Variable<T>, Kokkos::View<>... );
#endif

we do this for std::vector
Get<T>(Variable<T>, std::vector<T>...);

How is ADIOSView saving maintenance costs, seems like it might be adding more.

@anagainaru
Copy link
Contributor Author

anagainaru commented Jun 30, 2022

@williamfgc I agree, this is what I am doing now, overloading Put/Get with Kokkos an optional dependency. And at this point we are only loading the function declarations when building ADIOS with Kokkos because I am not including the Kokkos_Core in any of our h files.

Let's move this discussion at one of the ADIOS meetings.

@germasch
Copy link
Contributor

Let me also put in my two cents:

An alternative is to think of this in generic programming terms. That is, instead of having a specific overload for Kokkos views, and std::vector, and maybe xtensor and Eigen multi-d arrays, an alternative is the "if it quacks like a duck, treat it like duck" approach.

That is, one can have a generic templated interface and std::enable_if to say, e.g., if the object has a .data() method and a .size() methods, that's all we need and we'll take it -- and if it's not it'll not be considered in overload resolution.

If that turns out to not be enough at some point, one could have a traits-based approach that would allow to transparently add support for datastructures that aren't known to adios2 and that don't have .data() and .size() but can be adapted.

I think the advantages of this approach are:

  • doesn't required any build system interaction, inclusion of additional headers, etc.
  • it's more generic than just supporting Kokkos specifically

The disadvantage that I can see is that it might falsely make adios2 accept some data structure which does have .data() and .size(), but doesn't follow the required semantics.

@williamfgc
Copy link
Contributor

I agree with @germasch . The first step is to agree that overloading Put/Get will be the user's life much easier (no extra lass to learn about, just pass an object with an accessible contiguous memory region). There still need to be a compile-time conditional as these are optional dependencies (Kokkos, eigen, etc.), std::vector is standard so gets better treatment.

@vicentebolea
Copy link
Collaborator

I agree that overloading put/get is the easier for the user, but as any sounded API design we need to decouple our codebase from our dependencies when possible. This is not a dealbreaker but the best dependency in your software is the one that you do not have, the second best is the one at compile time, next is the one that its contained in its own independent header and the last one is at core code base header (we are a lib afterall).

Since we only need a few API components of Kokkos::View I really like the @germasch idea, we really depends on type traits of the Kokkos::View thus we can just program against those trait without really including it. Furthermore, we can extend this template methods for other frameworks such as Kokkos by adding adapters that makes them fit in our type traits. Lastly C++17/20 brings better ways to express this (no SFINAE enable_if needed).

From a build point of view this is best since we do not need Kokkos at build time.

@williamfgc
Copy link
Contributor

From a build point of view this is best since we do not need Kokkos at build time.

That's the part I'm having trouble understanding, how does ADIOS know how to interpret Kokkos::View internals? At some point, a compile-time handshake is needed to interpret and access the underlying memory contiguous pointer. It would be nice to see a working proof-of-concept.

but as any sounded API design we need to decouple our codebase from our dependencies when possible

My worry is to add more boilerplate for something so lightweight that Put/Get can handle. We do this for adios2::Operator , but that's 'cause it's far from being lightweight and dependencies (e.g. zfp, blosc compression, etc.) are private in the CMake sense. As for public dependencies like MPI, and potentially Kokkos, I don't see how we can escape some sort of #ifdef handshake in the public facing region. Just my two cents as we went through this in the past, adios2 value has been on performance, functionality and interoperability with (hopefully) a relatively small API footprint for applications. As a library consumer it's good that the public interface is clear in what can be used, what's optional and what's not, etc.

@vicentebolea
Copy link
Collaborator

@williamfgc in my last comment I was advocating for the @germasch template solution.

@germasch
Copy link
Contributor

So I looked at this PR in some more detail now, and really all it needs from a Kokkos::View is the .data() method. I still think it'd be good for a .size() method if it isn't used -- it could be used for sanity checking at some point in the future, but more importantly, it'll help to avoid making the match to broad and match not just container-like classes.

It does look that right now in this PR the memory space, while it's known as a template type, isn't actually used to set the adios2 memory space. As such, it'd be fairly easily possible to just do SFINAE (std::enable_if -- I think ADIOS2 is still C++14, right?) on .data(), .size() and making sure that the return type of .data() matches the T from Variable<T>. (BTW, I think there's a possible issue with handling const T in the current approach, too).

The more general approach would be not to access methods from the passed type directly at all, but use adios2_view_traits or something. There could still be a default provided that'll work for kokkos or anything that has .data() or .size(), but it'd allow for adapting other containers that may not follow this pretty standard pattern of .data() and .size(). More importantly, though, the traits approach would allow for translating between kokkos memory space and adios2 memory space, and other future extensions (there's a lot I can think of, e.g., taking the dimensionality and local extents directly from the array, rather than having to set them in separate SetShape()/SetSelection() beforehand.)

When it comes to honoring memory space, I do not see a way that avoids kokkos-specific knowledge, ie., the Kokkos::XYZSpacemacros. But this could still be kept separate pretty easily, ie.,#include <adios2/kokkos.h>` would set those traits, and obviously depend on the kokkos symbols being available, while everything else remains agnostic to whether kokkos is available or not.

For people who aren't familiar with the kind of C++ pattern I'm talking about, https://en.cppreference.com/w/cpp/memory/allocator_traits or https://en.cppreference.com/w/cpp/iterator/iterator_traits are examples how traits are used to make it possible to use custom classes with the standard library, without requiring the standard library to know about them -- all the user has to do is to specialize the corresponding traits to tell the standard library how to interface with them.

@williamfgc
Copy link
Contributor

  • all the user has to do is to specialize the corresponding traits to tell the standard library how to interface with them.

The translation unit needs to know when linking where Kokkos::View::data() is defined (declaration can be forwarded) since templates become regular functions at compile-time and need to resolve all the types. It would become simpler for users to pass the raw pointer from data(). Users shouldn't specialize adios2 APIs. At the end performance, functionality and simple APIs are the main drivers.

This is why I am advocating for a working proof of concept. Adios2 is C++11 (not 14 or 17) and the boilerplate can get pretty messy, pretty quickly without added safety or simple APIs. I think we have done successful proof of concept PRs in the past like unifying MPI and non-MPI builds.

@williamfgc
Copy link
Contributor

@williamfgc in my last comment I was advocating for the @germasch template solution

@vicentebolea that's fair. Since @anagainaru went through the effort to make this PR available, I think is also fair to ask for a PR showing the proposed alternatives. A working proof of concept would help the discussion tremendously.

@vicentebolea
Copy link
Collaborator

At the end performance, functionality and simple APIs are the main drivers.

@williamfgc we all agree on this, consider this scenario.

What if in next kokkos release they move to c++17 (actually they are planning to). What do we do with ADIOS2 if we include them in our core headers? Now when we enabled kokkos we need to build using c++17, what if they include a c++17 feature that is not supported with c++14, since our code is now highly coupled with Kokkos we would have to migrate our full codebase to be C++17 compatible or add a myriad of ifdef to maintain compatibilty with c++17 and without for previous distros/compiler versions. Maybe this highlight the case of the "worse is better".

I would say that this approach does not scale with other future libraries that we intent to support as Kokkos.

Users shouldn't specialize adios2 APIs

Why not?

@williamfgc
Copy link
Contributor

Why not?

Users come to adios 'cause they want to do their science at scale. Adding more overhead is a turn off for an already highly specialized library and niche for HPC workflows. You mention that support is limited, that's also the case for users.

The "what if" and "what about" scenarios you mentioned can be understood better with a proof of concept and see the pros and cons and be clear on what we are advocating for. In any scenario you need a handshake with Kokkos or any public facing library.

germasch pushed a commit to germasch/ADIOS2 that referenced this pull request Jul 1, 2022
Code extracted from:

    https://github.com/pybind/pybind11.git

at commit 42d8593ad4225a634b481cd573f7aeb94de72418 (master).

Upstream Shortlog
-----------------

Aaron Gokaslan (45):
      cd4b49a2 Update py::kwargs examples to pass by reference (ornladios#3038)
      b4b67f02 Fix typos (ornladios#3044)
      af6218ff fix(clang-tidy): Apply performance fixes from clang-tidy (ornladios#3046)
      e0b5cbd4 chore(clang-tidy): add more modernize clang-tidy checks (ornladios#3049)
      3b30b0a5 fix(clang-tidy): clang-tidy readability and misc fixes, like adding const (ornladios#3052)
      dac74ebd fix(clang-tidy): performance fixes applied in tests and CI (ornladios#3051)
      b5357d1f fix(clang-tidy): Enable clang-tidy else-after-return and redundant void checks (ornladios#3080)
      25e470c5 fix(clang-tidy): Add cppcoreguidelines-init-vars,slicing, and throw-by-value-catch-by-reference checks (ornladios#3094)
      c4b0dc7c Add shellcheck style checking (ornladios#3114)
      9beaa925 maint(clang-tidy): Improve code readability with explicit boolean casts (ornladios#3148)
      0ac4c8af maint(clang-tidy): Improve code readability with explicit boolean casts (ornladios#3148)
      c0756ccd fix: func_handle for rule of two (ornladios#3169)
      9f204a18 fix: func_handle for rule of two (ornladios#3169)
      3893f37b maint(clang-tidy): Bugprone enable checks (ornladios#3166)
      ff590c12 maint(perf): Optimize Numpy constructor to remove copies by value. (ornladios#3183)
      9df2f1ff maint(precommit): Apply isort (ornladios#3195)
      617cb653 [Bugfix] Fix errant const methods (ornladios#3194)
      6cbabc4b maint(clang-tidy): Enable cpp-coreguideline slicing checks (ornladios#3210)
      d71ba0cb (perf): Add a missing noexcept to a pytype constructor (ornladios#3236)
      4c6bee35 fix: Set __file__ constant when using eval_file (ornladios#1300) (ornladios#3233)
      ae07d4c6 maint(Clang-Tidy): readability-const-return (ornladios#3254)
      9978ed58 Fix capsule bug (ornladios#3261)
      d0f3c51f Enable defining custom __new__ (ornladios#3265)
      6e6975e2 Fix test case with __new__ (ornladios#3285)
      0fb981b2 Add blacken-docs and pycln pre-commit hooks (ornladios#3292)
      ad966556 fix: replace free() with std::free() (ornladios#3321)
      f4c81e08 maint: Add additional linter-related pre-commit hooks (ornladios#3337)
      78ee782b feat: Add C++ binding to throw AttributeError (ornladios#3387)
      ef070f77 Add additional info to TypeError when C++->Python casting fails (ornladios#3605)
      d434b5f3 (chore): Remove deprecated c-headers (ornladios#3610)
      f8d4aa47 Add clang-tidy readability checks for sus args (ornladios#3611)
      d2ec8367 Add support for nested C++11 exceptions (ornladios#3608)
      3a8d9230 Fix caster optimization regression introduced in ornladios#3650 (ornladios#3659)
      978617f6 fix issue 3668 by removing bool casts in numpy.h (ornladios#3669)
      ce18721d Ensure TypeError use raise_from for C++->Python overload res. (ornladios#3671)
      1b841883 Minor change to improve readability (ornladios#3695)
      7f975816 chore(clang-tidy): Enable static downcast and decl naming check (ornladios#3709)
      dc9803ce Add missing clang-tidy fixes (ornladios#3715)
      d6c66d25 chore(clang-tidy): Add clang-tidy rules: prefer-member-initializer and optin.performance.Padding (ornladios#3716)
      42a8e312 Improve Python 3.11 support (ornladios#3694)
      af08a95b fix: potential memory leak in pypy (ornladios#3774)
      2dd52544 fix: missing move in eval.h (ornladios#3775)
      47079b9e (perf): Add missing move in sp matrix caster and microopt char concats (ornladios#3823)
      146695a9 fix: better exception and error handling for capsules (ornladios#3825)
      3a183d4b fix: improve str exceptions and consistency with python (ornladios#3826)

Akira Kawata (1):
      417fd120 Fix: fix typo of WITHOUT_SOABI (ornladios#2992)

Andy Maloney (3):
      14b37512 docs: fix example code in Exceptions section (match vs. matches) (ornladios#2781)
      df8494dc fix: a clang warning [-Wshadow-field-in-constructor-modified] (ornladios#2780)
      40931961 docs: fix spelling in some comments/docs (ornladios#2777)

Antony Lee (6):
      d068ab28 docs: pybind11/numpy.h does not require numpy at build time. (ornladios#2720)
      6b4297fd fix: don't trigger -Wunused-parameter in flagcheck.cpp. (ornladios#2735)
      e8c4f543 fix: prepend Pybind11Extension flags rather than appending them. (ornladios#2808)
      5bcaaa04 Add a std::filesystem::path <-> os.PathLike caster. (ornladios#2730)
      1be0a0a6 Add helper to build in-tree extensions. (ornladios#2831)
      b11ff912 fix(setup =_helpers): don't add -g0 CFLAGS sets -g (ornladios#3436)

Axel Huebl (5):
      0b3df7f9 ci: Intel icc/icpc via oneAPI (ornladios#2573)
      c78dfb69 MSVC but not Clang: /MP (ornladios#2824)
      55f6f6e9 Fix: RTD Docutils Build (ornladios#3119)
      d75b3536 CI: MSVC Debug Build (ornladios#3784)
      a7e7a6e8 Docs: No Strip in Debug (ornladios#3779)

Bertrand MICHEL (1):
      74a767d4 Dtype kind vs char  (ornladios#2864)

Bjorn (1):
      32d11c96 fix typo in pickle example (ornladios#2669)

Bobby Impollonia (1):
      75168113 fix(setup_helpers): ensure ThreadPool is closed (ornladios#3548)

Boris Rasin (2):
      01f938e7 fix: add missing std::forward calls (ornladios#3443)
      a224d0cc fix: vs2022 compilation, issue ornladios#3477 (ornladios#3497)

Boris Staletic (4):
      06b673a0 Allow NULL value in pybind11_meta_setattro (ornladios#2629)
      8adef2c7 fix: workaround for ornladios#2682 and ornladios#2422 by simply clearing the TypeError (ornladios#2685)
      f110889d Use correct duration representation when casting from datetime.timdelta to std::chrono::duration (ornladios#2870)
      5cd37507 Enable -Wstrict-aliasing warning (ornladios#2816)

Bruce Merry (4):
      ee0c5ee4 Add make_value_iterator (ornladios#3271)
      b3573ac9 feat: add `.keys` and `.values` to bind_map (ornladios#3310)
      47ed124f Fix some formatting in the v2.8.0 changelog (ornladios#3339)
      8a7c266d Fix make_key_iterator/make_value_iterator for prvalue iterators (ornladios#3348)

Chad B. Hovey (1):
      dd2d1272 Correct "which" versus "that" error. (ornladios#3430)

Changming Sun (1):
      210c8c21 fix: a warning found by static code analyzer (ornladios#2783)

Chris Ohk (1):
      1a432b42 docs: Correct minor typos (ornladios#3721)

Cris Luengo (1):
      93e69191 fix: enable py::implicitly_convertible<py::none, ...> for py::class_-wrapped types (ornladios#3059)

Dan (1):
      930bb16c Call PySys_SetArgv when initializing interpreter. (ornladios#2341)

David Hewitt (2):
      a0b97596 Allow python builtins to be used as callbacks (ornladios#1413)
      fd71bd48 Allow python builtins to be used as callbacks (ornladios#1413)

Dmitry Yershov (1):
      076c89fc tests: test recursive dispatch using visitor pattern (#3365)

Dustin Spicuzza (4):
      c0fbb02c Extract gil management functions to separate header (ornladios#2845)
      6d440946 Check dict item accesses where it isn't already checked (ornladios#2863)
      ec81e8e7 Propagate py::multiple_inheritance to all children (ornladios#3650)
      17792884 Document how to bind templates (ornladios#3665)

Edward Lockhart (1):
      23c3edcf When determining if a shared_ptr already exists, use a test on the we… (ornladios#2819)

Eric Cousineau (6):
      635e3fc9 CONTRIBUTING: Add suggestion about passing pytest flags (ornladios#2738)
      2110d2d8 enum: add missing Enum.value property (ornladios#2739)
      f676782b env: Add surrogate for pytest.deprecated_call for ptyest<3.9 (ornladios#2923)
      b6ec0e95 functions: Add doc on incorrect argument index (ornladios#2979)
      6ac8efe5 test_eval: Show example of working closure (ornladios#2743)
      f495dfc4 cast: Qualify symbol usage in PYBIND11_TYPE_CASTER (ornladios#3758)

Frank (1):
      f8b8107b fix: make FindPython2 and FindPython3 work (ornladios#2662)

Geoffrey Gunter (1):
      2d6014e4 docs: fix minor typo (ornladios#3390)

Guillaume Jacquenot (2):
      e450eb62 Removed duplicated word in docs/advanced/cast/eigen.rst (ornladios#3458)
      1eb59963 Removed duplicated word in docs/advanced/exceptions.rst (ornladios#3476)

Henry Fredrick Schreiner (5):
      5b43ac42 docs: fix missing line from ornladios#2310
      dff9b3b4 chore: add pytest-timeout, mypy
      732bf88d fix: avoid changing class outside of GIL
      4a5b81b1 chore: get back to work
      87954e7a fix: corrected dev versioning

Henry Schreiner (111):
      b8dc60ec fix: Python include directory was missing from DIRS (ornladios#2636)
      6cc233cc ci: label PRs when merged only for now
      6d4854a5 ci: correct types statement
      3e4d54bc fix: match new extension discovery with changes to classic discovery (ornladios#2640)
      ebd5c5b4 feat: way to only recompile changed files (ornladios#2643)
      f1abf5d9 docs: changelog update (ornladios#2652)
      b7c741b5 docs: back to work after 2.6.1
      02746cb6 docs: add a little more information for releases
      de78bddd docs: better badges (ornladios#2656)
      17c22b9e docs: mention branch update in checklist (ornladios#2670)
      499fcd54 ci: drop pypy2 linux, PGI 20.7, add Python 10 dev (ornladios#2724)
      ffb113d1 fix: regression with installed pybind11 overriding local one (ornladios#2716)
      d5af536f ci: update cmake action (ornladios#2734)
      5bd766bf docs: update changelog and add script to help generate it (ornladios#2733)
      79b0e2c0 docs: fix pdf build, simpler start page (ornladios#2736)
      b7dfe5cc chore: changelog update (ornladios#2750)
      5abce7fc ci: use fixed action (ornladios#2791)
      230fa53f fix: Don't override global settings for VISIBILITY if set (ornladios#2793)
      0df11d85 docs: update build description slightly (ornladios#2794)
      87f5aff4 ci: update to setup-cmake v1.6 (ornladios#2805)
      eb83feef style: avoid using unintialized variables (ornladios#2806)
      130c9954 fix: support basic dual includes (ornladios#2804)
      2db0264a style: add clang-format file (ornladios#2310)
      44105ca1 docs: mention that the changelog block in PR is special
      08bca374 docs: update changelog, nicer output for script (ornladios#2811)
      8e5d3d23 docs: prepare for 2.6.2 (ornladios#2820)
      8de7772c chore: prepare for the 2.6.2 release (ornladios#2821)
      721834b4 chore: get PyPy 3.7 wheels using NumPy 1.20 (ornladios#2837)
      e0c1dadb chore: add myself to CODEOWNERS (ornladios#2940)
      114be7f4 docs: remove recommonmark (ornladios#2955)
      5e4804bb tests: use master commit for pytest on 3.10 (ornladios#2967)
      54430436 ci: install Boost for boost checks (ornladios#2968)
      7a64b8ad docs: fix script issues for changelog compilation (ornladios#3100)
      f0a65c89 docs(fix): spelling mistake in recent commit
      ddf0efb9 chore: add nox support (ornladios#3101)
      84fdadfb chore: update pre-commit hooks
      11e12fe4 chore: move some config to pyproject.toml
      0e2e0035 style: add pyupgrade check, 2.7+
      6a644c8f docs: update changelog (ornladios#3099)
      cd061aee style: pre-commit cleanup (ornladios#3111)
      31843d45 docs: reduce visibility of 3.9.0 warning (ornladios#3105)
      2415c094 feat(package): support pipx run (ornladios#3117)
      1b10292c chore: support PDF from nox (ornladios#3121)
      6642f389 docs: update changelog (ornladios#3122)
      65e95ea8 chore: bump to 2.7.0 (ornladios#3123)
      74935f8d chore: post-release (ornladios#3128)
      7cc0ebb4 fix: the CMake config in Python package had a hard coded path (ornladios#3144)
      c14b1933 chore: increase CMake upper limit (ornladios#3124)
      5c6bdb72 fix: the CMake config in Python package had a hard coded path (ornladios#3144)
      b1fdbe69 chore: add discussions link (ornladios#3159)
      a2b78a8c chore: changelog update (ornladios#3163)
      90959848 chore: changelog update (ornladios#3163)
      078c1167 chore: bump to version 2.7.1
      5f34c42d chore: bump to version 2.7.1
      82adacb3 fix: include hex version in bump
      787d2c88 fix: include hex version in bump
      c30f57d2 chore: start development for 2.8.0
      5f4d7259 fix: version number hex
      1fafd1b4 fix: apply simpler expression with fewer workarounds
      089328f7 Revert "fix: apply simpler expression with fewer workarounds"
      fdac5fbf chore: support targeting different Python versions with nox (ornladios#3214)
      db44afa3 tests: fix pytest usage on Python 3.10 (ornladios#3221)
      04dd3262 docs: update CHANGELOG (ornladios#3276)
      b06a6f4f feat: Slice allowing None with py::object or std::optional (ornladios#1101)
      2fa3fcfd Revert "Add make_value_iterator (ornladios#3271)"
      5f46e47d tests: check simple iteration of pairs (ornladios#3296)
      21282e64 feat: reapply fixed version of ornladios#3271 (ornladios#3293)
      6ad3f874 fix(build): avoid a possible warning about shadowed variables and changing behaviors (ornladios#3220)
      d58699c9 fix(cmake): reduce chance for variable collision (ornladios#3302)
      6bce3bd7 docs: update CHANGELOG (ornladios#3304)
      a1830d5e docs: mention title conventions in PR template (ornladios#3313)
      d7a7edc1 tests: support Eigen configuration
      591db0b9 docs: update CHANGELOG for 2.8
      20aae3e6 ci: disable Eigen due to Cert issue on CentOS
      c9a319c6 chore: version 2.8.0 final
      3747dc2c Revert "All `-DDOWNLOAD_EIGEN=OFF` (to work around gitlab eigen outage)." (ornladios#3326)
      ba9f919b chore: get back to work after 2.8.0
      931f6644 ci: cancel in-progress on repeated pushes (ornladios#3370)
      f791dc86 fix: deprecate make_simple_namespace, fix Python 3.11 (ornladios#3374)
      606f81a9 style: drop pycln (ornladios#3397)
      9379b399 fix: MSVC 2017 C++17 on Python 3 regression (ornladios#3407)
      e7e2c79f fix: improve support for Python 3.11-dev (ornladios#3368)
      90707b46 fix(build): support conan's multiple includes of all files (ornladios#3420)
      f1594cb9 docs: changelog update for 2.8.1 (ornladios#3416)
      a61e354e docs: touch up manual release suggestion (ornladios#3422)
      aebd21b5 docs: rework CI a bit, more modern skipping (ornladios#3424)
      270b11d5 Revert "style: drop pycln" (ornladios#3466)
      72282f75 ci: support development releases of Python (ornladios#3419)
      ff51fcb7 docs: fix broken link (again)
      15f8d7c1 fix(build): cleaner CMake printouts & IDE folders (ornladios#3479)
      cd176cee chore: update changelog with recent PRs (ornladios#3524)
      39fbc799 fix: avoiding usage of _ if already defined (ornladios#3423)
      e50f841d fix: do not use LTS on mips64 and ppc64le (ornladios#3557)
      d4b9f347 docs: update changelog (ornladios#3556)
      cb302305 fix: restore full range of _ functions (ornladios#3571)
      45f792ef chore: prepare for 2.9
      9b4f71d1 docs: remove duplication in changelog for 2.9.0
      bf7e5f92 fix(setup): support overriding CMake args (ornladios#3577)
      21e10945 ci: move centos 8 to stream (ornladios#3675)
      0f6ad910 docs: update changelog for 2.9.1 (ornladios#3670)
      ffa34686 chore: bump to 2.9.1
      36813cfa chore: back to work
      af056b65 fix: __index__ on Enum should always be present. (ornladios#3700)
      46dcd9bc fix: minor CMake warning fix for unused variable (ornladios#3718)
      522c59ce chore: drop Python 3.5 (ornladios#3719)
      a25d40c7 tests: use 'build' in tests instead of running setup.py (ornladios#3734)
      4b42c371 style: pylint (ornladios#3720)
      5f9b090a ci: fix PyPy (ornladios#3768)
      461937d3 ci: test pypy 3.9 (ornladios#3789)
      7742be02 Revert "ci: test pypy 3.9" (ornladios#3828)
      42d8593a style: bump black (ornladios#3831)

Ivor Wanders (1):
      21911e12 A way to register additional test targets and support .py only tests. (ornladios#3590)

JYX (1):
      3df0ee6f docs: typo in classes.rst (ornladios#2926)

Jack S. Hale (1):
      4c7697db Add const T to docstring generation. (ornladios#3020)

James Foster (1):
      d57c1fab docs: update installing.rst (ornladios#2691)

Jan Iwaszkiewicz (1):
      cf006af2 Fix typos and docs style (ornladios#3088)

Jason Rhinelander (3):
      e7c9753f feat: allow kw-only args after a py::args (ornladios#3402)
      673b4be3 Fix py::kw_only when used before the first arg of a method (ornladios#3488)
      b4939fcb Expand std::string_view support to str, bytes, memoryview (ornladios#3521)

Jean-Baptiste Lespiau (1):
      af8849f4 docs: list all pybind11 exceptions (ornladios#2671)

Jeremy Maitin-Shepard (4):
      4d5ad03e Avoid use of temporary `bytes` object in string_caster for UTF-8 (ornladios#3257)
      14976c85 Eliminate duplicate TLS keys for loader_life_support stack (ornladios#3275)
      2a78abff Ensure PYBIND11_TLS_REPLACE_VALUE evaluates its arguments only once (ornladios#3290)
      62c4909c Add `custom_type_setup` attribute (ornladios#3287)

Jerome Robert (4):
      1259db6f Fix Pybind11Extension on mingw64 (ornladios#2921)
      9e8a741b fix: Mingw64 corrected and add a CI job to test it (ornladios#3132)
      c80e0593 fix: Mingw64 corrected and add a CI job to test it (ornladios#3132)
      56b49c2b ci: fix mingw checks by pinning (ornladios#3375)

JonTriebenbach (1):
      8b1944d3 Remove idioms in code comments (ornladios#3809)

Jouke Witteveen (1):
      031a700d Add make_simple_namespace function and tests (ornladios#2840)

Karthik Nishanth (1):
      e791ec4e fix: add null pointer check with std::localtime (ornladios#2846)

Kumar Aditya (1):
      948d09d6 test: Test against Python 3.10 (ornladios#2848)

Laramie Leavitt (4):
      5469c238 Adjusting `type_caster<std::reference_wrapper<T>>` to support const/non-const propagation in `cast_op`. (ornladios#2705)
      0e599589 Fix thread safety for pybind11 loader_life_support (ornladios#3237)
      b3a43d13 Use rvalue reference for std::variant cast_op<T> (ornladios#3811)
      b22ee64c Add type_caster<std::monostate> (ornladios#3818)

Liam Keegan (2):
      4f29b8a4 ci: extend msys2 mingw CI (ornladios#3207)
      bcb6d63c fix msys ci python issue (ornladios#3651)

Lishen1 (1):
      5d067e87 fix: remove redundant copy operation to fix warning (ornladios#3486)

Matthias Köppe (1):
      e0031bfc include/pybind11/numpy.h: gcc 4.8.4 does not have is_trivially_copyable (ornladios#3270)

Mattia Basaglia (2):
      07103d65 Remove extra semicolon (ornladios#3666)
      dc4717ba fix: module extension detection for python 3.10 (ornladios#3663)

Michael Kuron (1):
      48534089 fix: Intel ICC C++17 compatibility (ornladios#2729)

Michał Górny (2):
      1d3b04e8 test: Strip whitespace when comparing numpy dtypes for 1.22 compat (ornladios#3682)
      96b943be tests: update catch to 2.13.5 to fix glibc 2.34 failures (ornladios#3679)

NaDDu (1):
      750e38dc Update eval.h (ornladios#3344)

Nick Cullen (2):
      59ad1e7d reshape for numpy arrays (ornladios#984)
      503ff2a6 view for numpy arrays (ornladios#987)

Nikita Shulga (1):
      79cb013f fix: allow users to avoid thread termination in scoped_released (ornladios#2657)

Nimrod (1):
      9ec1128c Fix typo in doc (ornladios#3628)

Oleksandr Pavlyk (1):
      91a6e129 PYBIND11_OBJECT_CVT should use namespace for error_already_set() (ornladios#3797)

OnlineCop (1):
      cbae6d55 docs: fix CMake status for DOWNLOAD_EIGEN (ornladios#2857)

Peter Hawkins (1):
      44596bc4 Fix exception handling when pybind11::weakref() fails. (ornladios#3739)

Philipp Bucher (3):
      62976cfc fix: using -Werror-all for Intel (ornladios#2948)
      71fd5241 docs: fix minor typo (ornladios#3311)
      c9bbf8d2 docs: fix minor typo (ornladios#3311)

Pieter P (1):
      0c93a0f3 Fix Unicode support for ostream redirects (ornladios#2982)

Qifan Lu (1):
      d587a2fd fix: do not set docstring for function when empty (ornladios#2745)

Ralf W. Grosse-Kunstleve (78):
      cecdfadc minor cleanup: fixing or silencing flake8 errors (ornladios#2731)
      9b7bfef8 Factoring out find_registered_python_instance() from type_caster_generic::cast. (ornladios#2822)
      0432ae7c Changing pybind11::str to exclusively hold PyUnicodeObject (ornladios#2409)
      932769b0 Adding holder_caster `typename SFINAE = void` hooks to help work around the current lack of smart-pointer interoperability (ornladios#2833)
      0c42250a Splitting out detail/type_caster_base.h from cast.h, with iwyu cleanup. (ornladios#2841)
      e2e819b2 Shuffling code in test_smart_ptr.cpp to separate struct/class definitions from bindings code. Back-porting from smart_holder branch, to minimize diffs and potential for merge conflicts. (ornladios#2875)
      44678e54 Shuffling code in test_multiple_inheritance.cpp to separate struct/class definitions from bindings code. (ornladios#2890)
      0e01c243 Generalizing suppression for pypocketfft. (ornladios#2896)
      ad6bf5cd Adding PyGILState_Check() in object_api<>::operator(). (ornladios#2919)
      e25b1505 Adjusting valgrind suppression for pypocketfft to resolve systematic failures that started to appear on 2020-05-27. (ornladios#3022)
      19d99a87 Working around Centos 8 failure. (ornladios#3030)
      484b0f04 Updating and slightly enhancing instructions for running clang-tidy. (ornladios#3055)
      fbae8f31 pickle setstate: setattr __dict__ only if not empty (ornladios#2972)
      cad79c11 tests: remove very minor oversight in PR ornladios#3059. (ornladios#3066)
      795e3c4c Removing `AlignConsecutiveAssignments: true`. (ornladios#3067)
      0ad116d3 Adding codespell to .pre-commit-config.yaml (follow-on to PR ornladios#3075). (ornladios#3076)
      6d1b197b Splitting out pybind11/stl/filesystem.h. (ornladios#3077)
      bac5a0c3 Go all the way fixing clang-tidy issues to avoid the NOLINTNEXTLINE clutter and clang-format issues. This was really meant to be part of PR ornladios#3051 but was held back either out of an abundance of caution, or because of confusion caused by stray semicolons. (ornladios#3086)
      0f4761b4 Rollback of DOWNLOAD_CATCH=OFF change merged via PR ornladios#3059. (ornladios#3092)
      2d468697 NOLINT reduction (ornladios#3096)
      7472d37a Adding iostream.h thread-safety documentation. (ornladios#2995)
      9f11951b Fixing spelling errors that went undetected because the pre-commit spell check was added after the CI for PR ornladios#2995 last ran. (ornladios#3103)
      75090647 More precise return_value_policy::automatic documentation. (ornladios#2920)
      aca6c3ba * Removing stray semicolons (discovered by running clang-format v12 followed by tools/check-style.sh). (ornladios#3087)
      4359e00b Introducing PYBIND11_VERSION_HEX (ornladios#3120)
      34f587dd Removing all warning pragmas that have not effect. (ornladios#3127)
      ff97f101 Removing MSVC C4996 from pragma block at the top of pybind11.h (ornladios#3129)
      7904ba1a Adding pragma warning(disable: 4522) for MSVC <= 2017. (ornladios#3142)
      a0f862d4 Removing MSVC C4800 from pragma block at the top of pybind11.h (ornladios#3141)
      2164c2e0 Removing __INTEL_COMPILER section from pragma block at the top of pybind11.h (ornladios#3135)
      f4721a7b Accommodating environments that define __STDC_WANT_LIB_EXT1__ even if __STDC_LIB_EXT1__ is not defined by the implementation. (ornladios#3151)
      b72ca7d1 Removing MSVC C4100 from pragma block at the top of pybind11.h (ornladios#3150)
      b193d42c Removing MSVC C4996 from pragma block at the top of pybind11.h (ornladios#3129)
      85b38c69 Adding pragma warning(disable: 4522) for MSVC <= 2017. (ornladios#3142)
      e93d9459 Removing MSVC C4800 from pragma block at the top of pybind11.h (ornladios#3141)
      ed5fb66b Removing __INTEL_COMPILER section from pragma block at the top of pybind11.h (ornladios#3135)
      05852fb6 Accommodating environments that define __STDC_WANT_LIB_EXT1__ even if __STDC_LIB_EXT1__ is not defined by the implementation. (ornladios#3151)
      b4259729 Limiting pragma for ignoring GCC 7 -Wnoexcept-type to the scope of pybind11.h. (ornladios#3161)
      e2573dc9 Moving pragma for MSVC warning C4505 from pybind11.h to existing list in detail/common.h (ornladios#3160)
      46c51fc0 Limiting pragma for ignoring GCC 7 -Wnoexcept-type to the scope of pybind11.h. (ornladios#3161)
      b961ac64 Moving pragma for MSVC warning C4505 from pybind11.h to existing list in detail/common.h (ornladios#3160)
      dcbda8d7 Removing MSVC C4127 from pragma block at the top of pybind11.h (ornladios#3152)
      af700733 Removing GCC -Wunused-but-set-parameter from pragma block at the top of pybind11.h (ornladios#3164)
      61ee923b Consistent step name "Python tests". (ornladios#3180)
      4c7e509f PYBIND11_NOINLINE-related cleanup. (ornladios#3179)
      7d3b0571 Improved workaround for Centos 8 failure (follow-on to PR ornladios#3030). (ornladios#3193)
      1bcd94c4 Removing last remnants of pragma block at the top of pybind11.h (ornladios#3186)
      774b5ff9 Removing obsolete eigen.h warning suppression pragmas. (ornladios#3198)
      998d45e4 Cleanup of file-scoped and globally-scoped warning suppression pragmas across pybind11 header files. (ornladios#3201)
      c8ce4b8d Clone of @virtuald's PR ornladios#2112 with minor enhancements. (ornladios#3215)
      777352fc Adding `ssize_t_cast` to support passing `size_t` or `ssize_t` values where `ssize_t` is needed. (ornladios#3219)
      a46f6237 Minor tweaks. (ornladios#3230)
      49173e47 Minor follow-on to PR ornladios#1334 (Fix enum value's __int__ returning non-int when underlying type is bool or of char type) (ornladios#3232)
      6abf2baa CodeHealth: Enabling clang-tidy google-explicit-constructor (ornladios#3250)
      121b91f9 Fixing NOLINT mishap (ornladios#3260)
      6c65ab59 Follow-on to PR ornladios#3254, to address user code breakages. (ornladios#3263)
      9f146a56 All `-DDOWNLOAD_EIGEN=OFF` (to work around gitlab eigen outage).
      7c580586 Correct options on Eigen::MappedSparseMatrix & adding MSVC C4127 suppression around Eigen includes. (ornladios#3352)
      f7b49961 [skip ci] Tweaks in preparation for the 2.8.1 release. (ornladios#3421)
      a80b2237 chore: get back to work after 2.8.1
      9281faf4 Fixing `stict` vs `strict` typo. (ornladios#3493)
      b3d9c354 vi: replacing currently broken ICC Latest C++17 with C++14. (ornladios#3551)
      1bbaeb34 Adding dedicated test_const_name. (ornladios#3578)
      f5888108 Replacing ICC C++14 with C++17 (ornladios#3570)
      7e7c5585 Fixing obvious minor typo (missing `D` in `-DOWNLOAD_EIGEN=ON`).
      3899dc65 Documenting missing unit test coverage. (ornladios#3673)
      8581584e Manual fix-ups in preparation for clang-tidy readability-braces-around-statements.
      ddbc74c6 Adding .clang-tidy readability-braces-around-statements option.
      b4f5350d chore: use member initializer (ornladios#3704)
      7769e771 clang-tidy readability-qualified-auto (ornladios#3702)
      abc38690 Manually applying two clang-format changes that need fix-ups for clang-tidy. (ornladios#3705)
      e96221be Final manual curation in preparation for global `clang-format`ing (ornladios#3712)
      ec24786e Fully-automatic clang-format with include reordering (ornladios#3713)
      6493f496 Python 2 removal part 1: tests (C++ code is intentionally ~untouched) (ornladios#3688)
      44156477 Adding MSVC 2022 C++20 GitHub Action (ornladios#3732)
      a97e9d8c Dropping MSVC 2015 (ornladios#3722)
      c14170a7 Removing `// clang-format off` - `on` directives from test_pickling.cpp (ornladios#3738)
      009ffc33 MSVC C++20 test_eigen (ornladios#3741)

Rasmus Munk Larsen (1):
      70a58c57 Replace usage of deprecated Eigen class MappedSparseMatrix. (ornladios#3499)

Robert Haschke (4):
      b72cebeb style: clang-tidy: modernize-use-using (ornladios#2645)
      d9fa7056 style: remove redundant instance->owned = true (ornladios#2723)
      c2db53da fix: catch missing self argument in overloads constructor (ornladios#2914)
      c090c8c4 Unify cast_error message thrown by [simple|unpacking]_collector (ornladios#3013)

Robert Schütz (1):
      d00fc629 use CMAKE_INSTALL_FULL_INCLUDEDIR (ornladios#3005)

Ryan Cahoon (1):
      c2d3e220 fix: the types for return_value_policy_override in optional_caster (ornladios#3376)

Sebastian Koslowski (1):
      94a94872 docs: fix imported target name (ornladios#3689)

Sergei Izmailov (1):
      51948559 Render `py::bool_` and `py::float_` without `_` in docstrings (ornladios#3622)

Sergiu Deitsch (1):
      d2b21316 cmake: report version type in the version string (ornladios#3472)

Shane Loretz (1):
      7331d381 Raise codec errors when casting to std::string (ornladios#2903)

StarQTius (1):
      9aa676d3 fix: clear local internals after finalizing interpreter ornladios#2101 (ornladios#3744)

Stefano Rivera (1):
      465b2e0b Use sysconfig in Python >= 3.10 (ornladios#3764)

Steve Siano (1):
      6f66e760 docs: add a note about compiling the example (ornladios#2737)

Tailing Yuan (1):
      d6474ed7 fix: memory leak in cpp_function (ornladios#3228) (ornladios#3229)

Tamaki Nishino (1):
      6709abba Allow function pointer extraction from overloaded functions (ornladios#2944)

Thomas Ballinger (1):
      39a0aac8 docs fix to avoid nonexistent SmartCompile (ornladios#3241)

Tobias Leibner (1):
      7bd4b397 fix: define PYBIND11_CPP14 for recent intel compilers (ornladios#2679)

Tom de Geus (1):
      9c0aa699 Pointing out namespace in docs (ornladios#2874)

Trigve (1):
      afdc09de [master] Wrong caching of overrides  (ornladios#3465)

Vikram Pal (1):
      417067ee Add pybind11::bytearray (ornladios#2799)

Weiming Zhao (1):
      4f0727f2 Fix the enabling of default extension handling (ornladios#2938)

Wenzel Jakob (1):
      409be833 CMake: react to python version changes

Yannick Jadoul (19):
      7d6713a4 Use weakref to clean up captured function object in def_buffer (ornladios#2634)
      c58758d0 fix: add reasonable argument names to enum_ methods (ornladios#2637)
      028812ae docs: add warning about FindPython's Development component when libraries don't exist (e.g. on manylinux) (ornladios#2689)
      91a69720 docs: Update warning about Python 3.9.0 UB, now that 3.9.1 has been released (ornladios#2719)
      30eb39ed fix: also throw in the move-constructor added by the PYBIND11_OBJECT macro, after the argument has been moved-out (if necessary) (ornladios#2701)
      830f8eda tests: update pytest 6.2.1 and fix test_python_alreadyset_in_destructor (ornladios#2741)
      e612043d Fix invalid access when reinterpret_casting a non-pybind11 PyObject* to instance* (found by Valgrind in ornladios#2746) (ornladios#2755)
      e57dd471 Fix various minor memory leaks in the tests (found by Valgrind in ornladios#2746) (ornladios#2758)
      98f1bbb8 Ignore deprecation warnings about old-style __init__/__setstate__ constructors in the tests (originally done in ornladios#2746) (ornladios#2759)
      7b7ec664 ci: pin CMake to 3.19.2, fixes  issues with 3.19.3 on Linux (aarch64) and macOS (universal) (ornladios#2790)
      f243450e ci: disable builds for 3.10.0a4, and enable a nightly 3.10-dev build (ornladios#2792)
      1faf4a8a docs: the order of alternatives for variant types matters, and follows the same rules as overload resolution (ornladios#2784)
      08551463 Plug leaking function_records in cpp_function initialization in case of exceptions (found by Valgrind in ornladios#2746) (ornladios#2756)
      0f8d5f2e Add a Valgrind build on debug Python 3.9  (ornladios#2746)
      8449a808 fix: only allow integer type_caster to call __int__ method when conversion is allowed; always call __index__ (ornladios#2698)
      0bb8ca26 Always call PyNumber_Index when casting from Python to a C++ integral type, also pre-3.8 (ornladios#2801)
      587d5f84 Update breathe to 4.26.1, add make_tuple, make_iterator, and make_key_iterator (ornladios#2828)
      6cf6bf20 Fix confusing weakref constructor overload (ornladios#2832)
      fe845878 Make sure all warnings in pytest get turned into errors (ornladios#2838)

Ye Zhihao (1):
      cb60ed49 Fix enum value's __int__ returning non-int when underlying type is bool or of char type (ornladios#1334)

Yichen (1):
      3ac690b8 Explicitly export exception types. (ornladios#2999)

albanD (1):
      087b07c8 Remove workaround code that is not needed since ornladios#1211 (ornladios#2683)

blacktea (1):
      6d5d4e73 Move object in pop method of List. (ornladios#3116)

crimsoncor (1):
      9ea39dc3 Force the builtin module key to be the correct type. (ornladios#2814)

cyy (1):
      f067deb5 avoid unnecessary strlen (ornladios#3058)

dependabot[bot] (14):
      42e73807 chore(deps): bump jwlawson/actions-setup-cmake from v1.6 to v1.7 (ornladios#2818)
      c2362393 chore(deps): bump pypa/gh-action-pypi-publish from v1.4.1 to v1.4.2 (ornladios#2851)
      59f8d7f1 chore(deps): bump jwlawson/actions-setup-cmake from v1.7 to v1.8 (ornladios#2865)
      16c23fef chore(deps): bump pre-commit/action from v2.0.0 to v2.0.2 (ornladios#2935)
      bca4b36b chore(deps): bump pre-commit/action from v2.0.2 to v2.0.3 (ornladios#2964)
      bc7cf6ef chore(deps): bump jwlawson/actions-setup-cmake from 1.8 to 1.9 (ornladios#3000)
      f61855b9 chore(deps): bump ilammy/msvc-dev-cmd from 1 to 1.8.0 (ornladios#3001)
      14023c9c chore(deps): bump ilammy/msvc-dev-cmd from 1.8.0 to 1.8.1 (ornladios#3021)
      9b3b3577 chore(deps): bump ilammy/msvc-dev-cmd from 1.8.1 to 1.9.0 (ornladios#3027)
      d6841f60 chore(deps): bump jwlawson/actions-setup-cmake from 1.9 to 1.10 (ornladios#3196)
      1dc9a23c chore(deps): bump jwlawson/actions-setup-cmake from 1.10 to 1.11 (ornladios#3294)
      ed09664f chore(deps): bump ilammy/msvc-dev-cmd from 1.9.0 to 1.10.0 (ornladios#3338)
      fb9a222d chore(deps): bump pypa/gh-action-pypi-publish from 1.4.2 to 1.5.0 (ornladios#3606)
      3a1eddab chore(deps): bump jwlawson/actions-setup-cmake from 1.11 to 1.12 (ornladios#3625)

heyer2 (1):
      76a16007 fix: STATIC and SHARED flags not being detected (ornladios#2796)

jakobjw (1):
      98f9a33c Correct typo in FAQ (ornladios#2868)

jbarlow83 (2):
      79178e71 fix(setup_helpers): try import multiprocessing.synchronize too (ornladios#3043)
      2b7985e5 Improve documentation of discard_as_unraisable() API (ornladios#2697)

jesse-sony (1):
      d65edfb0 Feature/local exception translator (ornladios#2650)

jonathan-conder-sm (1):
      733f8de2 Avoid string copy if possible when passing a Python object to std::ostream (ornladios#3042)

ka-bo (2):
      e58c6897 Specified encoding in setup.py calls of open() (ornladios#3137)
      ee3ecb8a Specified encoding in setup.py calls of open() (ornladios#3137)

kururu002 (1):
      da15bb20 Cast bytearray to string  (ornladios#3707)

luzpaz (1):
      8bee61b6 docs: fix various typos (ornladios#3075)

mvoelkle-cern (1):
      e08a5811 Fix compilation with gcc < 5 (ornladios#2956)

ngc92 (1):
      56322daf fixed include for filesystem::path (ornladios#3482)

nickbridgechess (1):
      2fa4747c pythonbuf fix (ornladios#2675)

pre-commit-ci[bot] (28):
      9626483c [pre-commit.ci] pre-commit autoupdate (ornladios#3134)
      7f76d795 [pre-commit.ci] pre-commit autoupdate (ornladios#3143)
      c973660d [pre-commit.ci] pre-commit autoupdate (ornladios#3143)
      f4f4632e [pre-commit.ci] pre-commit autoupdate (ornladios#3167)
      ada6b791 [pre-commit.ci] pre-commit autoupdate (ornladios#3167)
      0be2ea06 [pre-commit.ci] pre-commit autoupdate (ornladios#3185)
      b3d18f38 [pre-commit.ci] pre-commit autoupdate (ornladios#3213)
      76d939de [pre-commit.ci] pre-commit autoupdate (ornladios#3231)
      3ed31e92 [pre-commit.ci] pre-commit autoupdate (ornladios#3266)
      077a16e9 [pre-commit.ci] pre-commit autoupdate (ornladios#3286)
      6be64304 [pre-commit.ci] pre-commit autoupdate (ornladios#3312)
      97976c16 [pre-commit.ci] pre-commit autoupdate (ornladios#3325)
      02c05573 [pre-commit.ci] pre-commit autoupdate (ornladios#3353)
      d45a8810 [pre-commit.ci] pre-commit autoupdate (ornladios#3409)
      6de30d31 [pre-commit.ci] pre-commit autoupdate (ornladios#3432)
      b322018e [pre-commit.ci] pre-commit autoupdate (ornladios#3449)
      9422d98f [pre-commit.ci] pre-commit autoupdate (ornladios#3473)
      fe65693c [pre-commit.ci] pre-commit autoupdate (ornladios#3500)
      59aa9986 [pre-commit.ci] pre-commit autoupdate (ornladios#3533)
      d0406c74 [pre-commit.ci] pre-commit autoupdate (ornladios#3563)
      89769e6e [pre-commit.ci] pre-commit autoupdate (ornladios#3574)
      2cd32e5d [pre-commit.ci] pre-commit autoupdate (ornladios#3589)
      b66328b0 [pre-commit.ci] pre-commit autoupdate (ornladios#3609)
      0986af61 [pre-commit.ci] pre-commit autoupdate (ornladios#3672)
      91f597be [pre-commit.ci] pre-commit autoupdate (ornladios#3754)
      061c6177 [pre-commit.ci] pre-commit autoupdate (ornladios#3765)
      f8a532a7 [pre-commit.ci] pre-commit autoupdate (ornladios#3800)
      67089cd3 [pre-commit.ci] pre-commit autoupdate (ornladios#3817)

xaedes (1):
      b4e1ab8c Docs: Demonstrate non-enum internal types in example (ornladios#3314)

yangliz5 (1):
      dedda228 Fix a typo in class.rst (ornladios#3648)
@germasch germasch mentioned this pull request Jul 1, 2022
@germasch
Copy link
Contributor

germasch commented Jul 1, 2022

  • all the user has to do is to specialize the corresponding traits to tell the standard library how to interface with them.

The translation unit needs to know when linking where Kokkos::View::data() is defined (declaration can be forwarded) since templates become regular functions at compile-time and need to resolve all the types. It would become simpler for users to pass the raw pointer from data(). Users shouldn't specialize adios2 APIs. At the end performance, functionality and simple APIs are the main drivers.

Sure, at compile time Kokkos::View and its methods need to be known. And they will be, that is, at compile time for the application that uses a Kokkos::View and passes it off to ADIOS2. That application obviously needs to be built with Kokkos headers etc, so everything will be available t the time. But at ADIOS2 build time, it's not needed, since the corresponding version of Put won't be instantiated.

I put up a draft PR #3271 to show a proof of principle just for Put, though Get can be handled analogously. And yeah, those things are not pretty, but it's more pretty much the same stuff that the C++ standard library does internally (and hides it away from the casual user).

The draft PR I put up actually just does the bare miminum, ie., memory space information is not communicated from Kokkos to ADIOS2 (nor is that done with Ana's PR here). It could be added, but at that point, it will require a specific header, say <adios2/kokkos_interop.h> that should be installed by ADIOS2, but only included by a Kokkos application relying on this kind of interoperability. That still means virtually no impact on ADIOS2, and extensibility to other, e.g., multi-d array containers, but it does mean one additional header that needs to be included on the application side.

Here's a (standalone) test for the draft PR: https://github.com/germasch/kokkos-adios2 .

@anagainaru
Copy link
Contributor Author

I like @germasch solution. I'll give it a try this weekend (or next week) and we can discuss on a working proof of concept.

@williamfgc
Copy link
Contributor

williamfgc commented Jul 1, 2022

Agree with @anagainaru . Thanks @germasch , it's very cool. I like the simplicity of the API. Another aspect is to test how the CMake files you put. Agree, the pattern is well known for being a huge boilerplate, like many things C++. I'll try to take a look as well. Happy 4th.

@vicentebolea
Copy link
Collaborator

@germasch Thanks for going the extra mile and submit a draft PR with the discussed design. I really like it, moreover years from now we can further simplify it with new c++ features. I left some comments in the draft.

@anagainaru
Copy link
Contributor Author

Closed by #3320

@anagainaru anagainaru closed this Sep 14, 2022
@anagainaru anagainaru deleted the kokkos branch September 15, 2022 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants