Axel Huebl

Results 1239 comments of Axel Huebl

This could help: implicit conversion - https://pybind11.readthedocs.io/en/stable/advanced/classes.html?highlight=singleton#implicit-conversions Same for the `amrex::Vector` classes and `RealVect` as we saw in the hackathon w/ @RevathiJambunathan @EZoni

X-ref: - https://pybind11.readthedocs.io/en/stable/advanced/exceptions.html#handling-unraisable-exceptions - https://github.com/ECP-WarpX/WarpX/pull/4380

Thanks for starting a sticky thread so we can collect the approaches. Let me start with what I am using so far: General arrays (incl. numpy): - either we code...

Agreed, I think after going through all the material again: - buffer (array) protocol for CPU memory (ND, strides) - `__cuda_array_interface__` v3 ([C-example](https://github.com/cupy/cupy/blob/a5b24f91d4d77fa03e6a4dd2ac954ff9a04e21f4/cupy/core/core.pyx#L2478-L2514)) for transporting device-side memory w/o host-device copies...

Starting support for AMD GPUs (and Intel) in `DLPack` (`__dlpack__`): - https://dmlc.github.io/dlpack/latest/ - https://data-apis.org/array-api/latest/design_topics/data_interchange.html - https://github.com/dmlc/dlpack/blob/6c2c662e778ad386c5103ee664f00ab1f3cef319/include/dlpack/dlpack.h#L61-L66 - https://github.com/dmlc/dlpack - https://github.com/wjakob/nanobind/commit/5d92f75fabb439b1172a33627e7d33557f4ed9d1

`FArrayBox` for CPU via the array interface is now implemented via #19. Next is either the `__cuda_array_interface__` or `DLPack`. Should not be too hard to add both.

CUDA bindings for multifabs including cupy, numba and pytorch coming in via #30

Did some more DLPack deep diving with @scothalverson. What we want to implement here is primarily the producer, `__dlpack__`. This one creates a [PyCapsule](https://docs.python.org/3/c-api/capsule.html), essentially a transport of a `void*`....

This could be implemented similar to `cupy`'s profiler with an `__enter__`/`__exit__` that can be used within a `with:` context manager (and thus does not rely on destructor calls for the...

No, I don't think the original request works yet. https://github.com/sizmailov/pybind11-stubgen/issues/221 The last example posted has a single doc string per overload, instead of a unique doc string for each overload.