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

Rebuild for CUDA 12 #40

Merged

Conversation

regro-cf-autotick-bot
Copy link
Contributor

@regro-cf-autotick-bot regro-cf-autotick-bot commented Jun 8, 2023

This PR has been triggered in an effort to update cuda120.

Notes and instructions for merging this PR:

  1. Please merge the PR only after the tests have passed.
  2. Feel free to push to the bot's branch to update this PR if needed.

Please note that if you close this PR we presume that the feedstock has been rebuilt, so if you are going to perform the rebuild yourself don't close this PR until the your rebuild has been merged.


Here are some more details about this specific migrator:

The transition to CUDA 12 SDK includes new packages for all CUDA libraries and build tools. Notably, the cudatoolkit package no longer exists, and packages should depend directly on the specific CUDA libraries (libcublas, libcusolver, etc) as needed. For an in-depth overview of the changes and to report problems see this issue. Please feel free to raise any issues encountered there. Thank you! 🙏


If this PR was opened in error or needs to be updated please add the bot-rerun label to this PR. The bot will close this PR and schedule another one. If you do not have permissions to add this label, you can use the phrase @conda-forge-admin, please rerun bot in a PR comment to have the conda-forge-admin add it for you.

This PR was created by the regro-cf-autotick-bot. The regro-cf-autotick-bot is a service to automatically track the dependency graph, migrate packages, and propose package version updates for conda-forge. Feel free to drop us a line if there are any issues! This PR was generated by https://github.com/regro/cf-scripts/actions/runs/5209187231, please use this URL for debugging.

The transition to CUDA 12 SDK includes new packages for all CUDA libraries and
build tools. Notably, the cudatoolkit package no longer exists, and packages
should depend directly on the specific CUDA libraries (libblas, libcusolver,
etc) as needed. For an in-depth overview of the changes and to report problems
[see this issue]( conda-forge/conda-forge.github.io#1963 ).
Please feel free to raise any issues encountered there. Thank you! 🙏
@conda-forge-webservices
Copy link
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@johnlees
Copy link
Contributor

johnlees commented Jun 8, 2023

Compile line

nvcc -Xcompiler -fPIC --cudart static --relocatable-device-code=true --expt-relaxed-constexpr -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/conda/feedstock_root/build_artifacts/pp-sketchlib_1686215631204/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/include  -I/home/conda/feedstock_root/build_artifacts/pp-sketchlib_1686215631204/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/targets/x86_64-linux/include -I/home/conda/feedstock_root/build_artifacts/pp-sketchlib_1686215631204/_build_env/targets/x86_64-linux/include  -L/home/conda/feedstock_root/build_artifacts/pp-sketchlib_1686215631204/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/targets/x86_64-linux/lib -L/home/conda/feedstock_root/build_artifacts/pp-sketchlib_1686215631204/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/targets/x86_64-linux/lib/stubs -L/home/conda/feedstock_root/build_artifacts/pp-sketchlib_1686215631204/_build_env/targets/x86_64-linux/lib -L/home/conda/feedstock_root/build_artifacts/pp-sketchlib_1686215631204/_build_env/targets/x86_64-linux/lib/stubs -I"." -I"/home/conda/feedstock_root/build_artifacts/pp-sketchlib_1686215631204/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol"/include -I"/home/conda/feedstock_root/build_artifacts/pp-sketchlib_1686215631204/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol"/include/eigen3 -DGPU_AVAILABLE -DPYTHON_EXT -DNDEBUG -Dpp_sketchlib_EXPORTS -I/home/conda/feedstock_root/build_artifacts/pp-sketchlib_1686215631204/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/include/python3.10 -I/home/conda/feedstock_root/build_artifacts/pp-sketchlib_1686215631204/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.10/site-packages/pybind11/include -DGPU_AVAILABLE -x cu -c gpu/dist.cu -o gpu/dist.cu.o

error

2023-06-08T09:17:08.4472557Z   /home/conda/feedstock_root/build_artifacts/pp-sketchlib_1686215631204/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.10/site-packages/pybind11/include/pybind11/detail/../cast.h: In function 'typename pybind11::detail::type_caster<typename pybind11::detail::intrinsic_type<T>::type>::cast_op_type<T> pybind11::detail::cast_op(make_caster<T>&)':
2023-06-08T09:17:08.4474709Z   /home/conda/feedstock_root/build_artifacts/pp-sketchlib_1686215631204/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.10/site-packages/pybind11/include/pybind11/detail/../cast.h:45:120: error: expected template-name before '<' token
2023-06-08T09:17:08.4475529Z      45 |     return caster.operator typename make_caster<T>::template cast_op_type<T>();
2023-06-08T09:17:08.4475947Z         |                                                                                                                        ^
2023-06-08T09:17:08.4477003Z   /home/conda/feedstock_root/build_artifacts/pp-sketchlib_1686215631204/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.10/site-packages/pybind11/include/pybind11/detail/../cast.h:45:120: error: expected identifier before '<' token
2023-06-08T09:17:08.4478433Z   /home/conda/feedstock_root/build_artifacts/pp-sketchlib_1686215631204/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.10/site-packages/pybind11/include/pybind11/detail/../cast.h:45:123: error: expected primary-expression before '>' token
2023-06-08T09:17:08.4479196Z      45 |     return caster.operator typename make_caster<T>::template cast_op_type<T>();
2023-06-08T09:17:08.4479609Z         |                                                                                                                           ^
2023-06-08T09:17:08.4480671Z   /home/conda/feedstock_root/build_artifacts/pp-sketchlib_1686215631204/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.10/site-packages/pybind11/include/pybind11/detail/../cast.h:45:126: error: expected primary-expression before ')' token
2023-06-08T09:17:08.4481695Z      45 |     return caster.operator typename make_caster<T>::template cast_op_type<T>();
2023-06-08T09:17:08.4482104Z         |                                                                                                                              ^
2023-06-08T09:17:11.1032050Z   make: *** [Makefile:119: gpu/dist.cu.o] Error 1

Incompatibility between new nvcc and pybind11?

@johnlees
Copy link
Contributor

johnlees commented Jun 8, 2023

This is just on CUDA 12

@johnlees
Copy link
Contributor

johnlees commented Jun 8, 2023

On OS X, compiler line:

2023-06-08T09:23:51.9438150Z   [ 93%] Building CXX object CMakeFiles/pp_sketchlib.dir/src/random/random_match.cpp.o
2023-06-08T09:23:51.9544530Z   /Users/runner/miniforge3/conda-bld/pp-sketchlib_1686215809509/_build_env/bin/x86_64-apple-darwin13.4.0-clang++ -DPYTHON_EXT -Dpp_sketchlib_EXPORTS -I/Users/runner/miniforge3/conda-bld/pp-sketchlib_1686215809509/_build_env/include -I/Users/runner/miniforge3/conda-bld/pp-sketchlib_1686215809509/work/vendor/highfive/include -I/Users/runner/miniforge3/conda-bld/pp-sketchlib_1686215809509/work/src -isystem /Users/runner/miniforge3/conda-bld/pp-sketchlib_1686215809509/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.10/site-packages/pybind11/include -isystem /Users/runner/miniforge3/conda-bld/pp-sketchlib_1686215809509/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/include/python3.10 -isystem /Users/runner/miniforge3/conda-bld/pp-sketchlib_1686215809509/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/include/eigen3 -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -isystem /Users/runner/miniforge3/conda-bld/pp-sketchlib_1686215809509/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/include -fdebug-prefix-map=/Users/runner/miniforge3/conda-bld/pp-sketchlib_1686215809509/work=/usr/local/src/conda/pp-sketchlib-2.1.1 -fdebug-prefix-map=/Users/runner/miniforge3/conda-bld/pp-sketchlib_1686215809509/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh=/usr/local/src/conda-prefix -DVERSION_INFO=\"2.1.1\" -Wall -DEIGEN_USE_BLAS -O3 -DNDEBUG -ffast-math -funroll-loops -m64 -std=gnu++14 -flto=thin -isysroot /Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -mmacosx-version-min=10.9 -fPIC -fvisibility=hidden -fopenmp=libomp -MD -MT CMakeFiles/pp_sketchlib.dir/src/random/random_match.cpp.o -MF CMakeFiles/pp_sketchlib.dir/src/random/random_match.cpp.o.d -o CMakeFiles/pp_sketchlib.dir/src/random/random_match.cpp.o -c /Users/runner/miniforge3/conda-bld/pp-sketchlib_1686215809509/work/src/random/random_match.cpp

error:

2023-06-08T09:24:01.3657440Z   In file included from /Users/runner/miniforge3/conda-bld/pp-sketchlib_1686215809509/work/src/random/random_match.cpp:12:
2023-06-08T09:24:01.3662070Z   In file included from /Users/runner/miniforge3/conda-bld/pp-sketchlib_1686215809509/_build_env/bin/../include/c++/v1/random:1689:
2023-06-08T09:24:01.3666480Z   /Users/runner/miniforge3/conda-bld/pp-sketchlib_1686215809509/_build_env/bin/../include/c++/v1/__random/discrete_distribution.h:216:5: error: static assertion failed due to requirement '__libcpp_random_is_valid_urng<Xoshiro, void>::value':
2023-06-08T09:24:01.3668000Z       static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
2023-06-08T09:24:01.3669030Z       ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-06-08T09:24:01.3670680Z   /Users/runner/miniforge3/conda-bld/pp-sketchlib_1686215809509/_build_env/bin/../include/c++/v1/__random/discrete_distribution.h:117:17: note: in instantiation of function template specialization 'std::discrete_distribution<>::operator()<Xoshiro>' requested here
2023-06-08T09:24:01.3672060Z           {return (*this)(__g, __p_);}
2023-06-08T09:24:01.3672980Z                   ^
2023-06-08T09:24:01.3674510Z   /Users/runner/miniforge3/conda-bld/pp-sketchlib_1686215809509/work/src/random/random_match.cpp:414:43: note: in instantiation of function template specialization 'std::discrete_distribution<>::operator()<Xoshiro>' requested here
2023-06-08T09:24:01.3675780Z         random_seq_buffer << RCMAP[base_dist(generator)];
2023-06-08T09:24:01.3677300Z                                             ^
2023-06-08T09:24:01.3678550Z   In file included from /Users/runner/miniforge3/conda-bld/pp-sketchlib_1686215809509/work/src/random/random_match.cpp:12:
2023-06-08T09:24:01.3679990Z   In file included from /Users/runner/miniforge3/conda-bld/pp-sketchlib_1686215809509/_build_env/bin/../include/c++/v1/random:1682:
2023-06-08T09:24:01.3681310Z   In file included from /Users/runner/miniforge3/conda-bld/pp-sketchlib_1686215809509/_build_env/bin/../include/c++/v1/__random/bernoulli_distribution.h:14:
2023-06-08T09:24:01.3683720Z   /Users/runner/miniforge3/conda-bld/pp-sketchlib_1686215809509/_build_env/bin/../include/c++/v1/__random/uniform_real_distribution.h:119:5: error: static assertion failed due to requirement '__libcpp_random_is_valid_urng<Xoshiro, void>::value':
2023-06-08T09:24:01.3685090Z       static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
2023-06-08T09:24:01.3686050Z       ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-06-08T09:24:01.3687950Z   /Users/runner/miniforge3/conda-bld/pp-sketchlib_1686215809509/_build_env/bin/../include/c++/v1/__random/uniform_real_distribution.h:84:17: note: in instantiation of function template specialization 'std::uniform_real_distribution<>::operator()<Xoshiro>' requested here
2023-06-08T09:24:01.3689270Z           {return (*this)(__g, __p_);}
2023-06-08T09:24:01.3690160Z                   ^
2023-06-08T09:24:01.3691750Z   /Users/runner/miniforge3/conda-bld/pp-sketchlib_1686215809509/_build_env/bin/../include/c++/v1/__random/discrete_distribution.h:219:65: note: in instantiation of function template specialization 'std::uniform_real_distribution<>::operator()<Xoshiro>' requested here
2023-06-08T09:24:01.3693660Z              _VSTD::upper_bound(__p.__p_.begin(), __p.__p_.end(), __gen(__g)) -
2023-06-08T09:24:01.3694590Z                                                                   ^
2023-06-08T09:24:01.3696190Z   /Users/runner/miniforge3/conda-bld/pp-sketchlib_1686215809509/_build_env/bin/../include/c++/v1/__random/discrete_distribution.h:117:17: note: in instantiation of function template specialization 'std::discrete_distribution<>::operator()<Xoshiro>' requested here
2023-06-08T09:24:01.3697770Z           {return (*this)(__g, __p_);}
2023-06-08T09:24:01.3698840Z                   ^
2023-06-08T09:24:01.3700190Z   /Users/runner/miniforge3/conda-bld/pp-sketchlib_1686215809509/work/src/random/random_match.cpp:414:43: note: in instantiation of function template specialization 'std::discrete_distribution<>::operator()<Xoshiro>' requested here
2023-06-08T09:24:01.3701530Z         random_seq_buffer << RCMAP[base_dist(generator)];
2023-06-08T09:24:01.3702440Z                                             ^

i.e. static_assert(__libcpp_random_is_valid_urng<_URNG>::value, ""); fails with the Xoshiro type. Traits may have changed? As this is just runif we could easily remove the bit from stdlib

@jakirkham
Copy link
Member

jakirkham commented Jun 22, 2023

Think this is due to libcxx 15.0.0+ (used by clang++ 15.0.0+ on macOS) being stricter about random number generators implementations

The result_type defined by Xoshiro is size_t, which libcxx expect to match the return type of operator(). However Xoshiro::operator() returns uint64_t. Hence this check fails

Maybe Xoshiro::result_type should be uint64_t? Or perhaps another solution to align these could be pursued?

Edit: Filed issue ( bacpop/pp-sketchlib#92 )

@johnlees
Copy link
Contributor

Thanks for diagnosing this! I will fix this upstream and release a new version

@jakirkham
Copy link
Member

Happy to help :)

Also the pybind11 compilation issue looks similar to upstream issue ( pybind/pybind11#4606 )

@johnlees
Copy link
Contributor

Happy to help :)

Also the pybind11 compilation issue looks similar to upstream issue ( pybind/pybind11#4606 )

brilliant, thanks – I will probably wait for that to be fixed before updating the build here in that case

@jakirkham
Copy link
Member

jakirkham commented Jun 27, 2023

A new release for the macOS fixes is probably useful here independently of the pybind11 issue as the macOS issues show up in other PRs ( like this HDF5 migrator: #41 )

For the pybind11 + nvcc issue, we might be able to use a different version of GCC with CUDA 12 (like GCC 11 or 10) as a workaround ( pybind/pybind11#4606 (comment) )

@jakirkham
Copy link
Member

Along the lines of trying older compilers to see if that resolves the issues, have configured macOS to use LLVM 14 and the Linux CUDA 12 build to use GCC 11

@jakirkham
Copy link
Member

Needed a couple more pins for macOS, but this seems to work

Please take a look and let me know what you think 🙂

The combination of pybind11 + GCC 12 + nvcc 12 runs into compilation
errors. This is documented in a pybind11 issue. To workaround this,
configure the CUDA 12 migrator to use GCC 11, which shouldn't have this
issue.

xref: pybind/pybind11#4606
…nda-forge-pinning 2023.06.27.16.55.53

Now that GCC 11 is configured for use with CUDA 12 in the migrator,
re-render to propagate that changes to the variants and CI.
As build issues are being encountered with LLVM 15 on macOS, pin to LLVM
14 in this feedstock to workaround those build issues. To ensure
`llvm-openmp` matches pin it as well. Also, as the new `libcxx` will
introduce this problem even with the older compiler toolchain, add
`libcxx` as an explicit dependency in `build` & `host` along with
pinning it.

These build issues still need to be fixed upstream. However, this
workaround should just allow this feedstock to continue to build on
macOS.
…nda-forge-pinning 2023.06.27.16.55.53

Now that the LLVM 14 toolchain is pinned on macOS, re-render to update
the variants with these constraints.
@jakirkham jakirkham force-pushed the rebuild-cuda120-0-1_hfdbfda branch from 7fbc9bd to c617e8c Compare June 27, 2023 22:16
@jakirkham
Copy link
Member

Cleaned up the commits a bit to make it easier to see relevant changes grouped together. Also should hopefully make it easier to revert them when no longer needed

@johnlees
Copy link
Contributor

This all looks great, thanks! I'll fix upstream shortly for OS X, and hopefully the next CUDA 12 release will fix the pybind issue

@johnlees johnlees merged commit 38fa6ec into conda-forge:main Jun 28, 2023
22 checks passed
@jakirkham
Copy link
Member

Happy to help 😄

Thanks John! 🙏

Copy link
Member

@jakirkham jakirkham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed feedstock issues for follow up (linked below) once the corresponding upstream issues are resolved. Noting here for clarity


fortran_compiler_version: # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
- 12 # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
- 11 # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed issue ( #43 ) to track reverting this once the upstream issue ( pybind/pybind11#4606 ) is resolved

Comment on lines +1 to +13
###########################################################
# Drop this file when the upstream issue is fixed. #
# #
# xref: https://github.com/bacpop/pp-sketchlib/issues/92 #
###########################################################
c_compiler_version: # [osx]
- 14 # [osx]
cxx_compiler_version: # [osx]
- 14 # [osx]
libcxx: # [osx]
- 14 # [osx]
llvm_openmp: # [osx]
- 14 # [osx]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed issue ( #42 ) to track reverting this once the upstream issue ( bacpop/pp-sketchlib#92 ) is resolved

@@ -38,6 +41,9 @@ requirements:
- eigen
- hdf5
- openblas
# Drop `libcxx` when the upstream issue is fixed
# xref: https://github.com/bacpop/pp-sketchlib/issues/92
- libcxx # [osx]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed issue ( #42 ) to track reverting this once the upstream issue ( bacpop/pp-sketchlib#92 ) is resolved

@jakirkham jakirkham mentioned this pull request Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants