Skip to content

Commit

Permalink
Add patch to pybind11 to work around pybind/pybind11#4606
Browse files Browse the repository at this point in the history
with CUDA12
  • Loading branch information
Paul Melis committed Apr 16, 2023
1 parent ebbb917 commit 20e7738
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions patches/pybind11-cuda12.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/include/pybind11/cast.h b/include/pybind11/cast.h
index 3a404602..9054478c 100644
--- a/include/pybind11/cast.h
+++ b/include/pybind11/cast.h
@@ -42,7 +42,9 @@ using make_caster = type_caster<intrinsic_t<type>>;
// Shortcut for calling a caster's `cast_op_type` cast operator for casting a type_caster to a T
template <typename T>
typename make_caster<T>::template cast_op_type<T> cast_op(make_caster<T> &caster) {
- return caster.operator typename make_caster<T>::template cast_op_type<T>();
+ // https://github.com/pybind/pybind11/issues/4606 with CUDA 12
+ //return caster.operator typename make_caster<T>::template cast_op_type<T>();
+ return caster;
}
template <typename T>
typename make_caster<T>::template cast_op_type<typename std::add_rvalue_reference<T>::type>

0 comments on commit 20e7738

Please sign in to comment.