Skip to content

Commit

Permalink
Introduce __hip_array_interface__.
Browse files Browse the repository at this point in the history
  • Loading branch information
stubbiali committed Jun 22, 2023
1 parent eef2309 commit 8309029
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/gridtools/storage/adapter/python_sid_adapter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,11 @@ namespace gridtools {
static_assert(std::is_trivially_copy_constructible_v<T>,
"as_cuda_sid should be instantiated with the trivially copyable type");

#if defined(__HIP__)
auto iface = src.attr("__hip_array_interface__").cast<pybind11::dict>();
#else
auto iface = src.attr("__cuda_array_interface__").cast<pybind11::dict>();
#endif

// shape
array<size_t, Dim> shape;
Expand Down

0 comments on commit 8309029

Please sign in to comment.