mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-21 20:55:11 +00:00
fix: NVCC 11.4.0 - 11.8.0 host bug workaround (#4220)
* Work-Around: NVCC 11.4.0 - 11.8.0 Adds a targeted NVCC work around for limited number of CUDA releases. Fixed in NVCC development. * style: pre-commit fixes * CI: Bump CTK Version 11.2 -> 11.7 Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
864ed1120c
commit
6cb214748d
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -324,8 +324,8 @@ jobs:
|
||||
# Testing NVCC; forces sources to behave like .cu files
|
||||
cuda:
|
||||
runs-on: ubuntu-latest
|
||||
name: "🐍 3.8 • CUDA 11.2 • Ubuntu 20.04"
|
||||
container: nvidia/cuda:11.2.2-devel-ubuntu20.04
|
||||
name: "🐍 3.10 • CUDA 11.7 • Ubuntu 22.04"
|
||||
container: nvidia/cuda:11.7.0-devel-ubuntu22.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
@ -1578,6 +1578,22 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
// Nvidia's NVCC is broken between 11.4.0 and 11.8.0
|
||||
// https://github.com/pybind/pybind11/issues/4193
|
||||
#if defined(__CUDACC__) && (__CUDACC_VER_MAJOR__ == 11) && (__CUDACC_VER_MINOR__ >= 4) \
|
||||
&& (__CUDACC_VER_MINOR__ <= 8)
|
||||
template <typename T, typename... Extra>
|
||||
class_ &def(const T &op, const Extra &...extra) {
|
||||
op.execute(*this, extra...);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename T, typename... Extra>
|
||||
class_ &def_cast(const T &op, const Extra &...extra) {
|
||||
op.execute_cast(*this, extra...);
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
template <detail::op_id id, detail::op_type ot, typename L, typename R, typename... Extra>
|
||||
class_ &def(const detail::op_<id, ot, L, R> &op, const Extra &...extra) {
|
||||
op.execute(*this, extra...);
|
||||
@ -1589,6 +1605,7 @@ public:
|
||||
op.execute_cast(*this, extra...);
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
template <typename... Args, typename... Extra>
|
||||
class_ &def(const detail::initimpl::constructor<Args...> &init, const Extra &...extra) {
|
||||
|
Loading…
Reference in New Issue
Block a user