Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

Add option to enable all supported standards in for multiconfig.#1363

Merged
alliepiper merged 3 commits intoNVIDIA:mainfrom
alliepiper:enh/dialect_latest/gh.thrust1321
Feb 9, 2021
Merged

Add option to enable all supported standards in for multiconfig.#1363
alliepiper merged 3 commits intoNVIDIA:mainfrom
alliepiper:enh/dialect_latest/gh.thrust1321

Conversation

@alliepiper
Copy link
Copy Markdown
Collaborator

The THRUST_MULTICONFIG_ENABLE_DIALECT_ALL option will turn on all
dialects supported by the configured CXX / CUDA compilers.

Fixes #1321.

@alliepiper alliepiper added the only: cmake CMake changes only. Doesn't need internal NVIDIA CI. label Dec 16, 2020
@alliepiper alliepiper added this to the 1.12.0 milestone Dec 16, 2020
@alliepiper
Copy link
Copy Markdown
Collaborator Author

@brycelelbach Would this be a suitable implementation of #1321 for your needs? It enables all supported dialects, not just the latest. I can still add a mode that just enables the latest if needed.

I'll add this logic to CUB once this PR is approved.

@brycelelbach
Copy link
Copy Markdown
Collaborator

ok to test

@brycelelbach
Copy link
Copy Markdown
Collaborator

run tests

Copy link
Copy Markdown
Collaborator

@brycelelbach brycelelbach left a comment

Choose a reason for hiding this comment

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

This doesn't appear to work with NVC++. When building with this branch:

[11:40:33]:blelbach@dev-sky5:/home/blelbach/development/nvidia/thrust/build_nvcxx:0:$ cmake .. \
  -DCMAKE_CUDA_COMPILER="/proj/nv/Linux_x86_64/dev/compilers/bin/nvc++" \
  -DCMAKE_CUDA_COMPILER_FORCED=ON \
  -DCMAKE_CUDA_COMPILER_ID="NVCXX" 

-- The CXX compiler identification is PGI 99.99.198076
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /proj/nv/Linux_x86_64/dev/compilers/bin/nvc++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Thrust: /home/blelbach/development/nvidia/thrust/thrust/cmake/thrust-config.cmake (found version "1.12.0.0")
-- Found CUB: /home/blelbach/development/nvidia/thrust/dependencies/cub/cub/cmake/cub-config.cmake (found version "1.12.0.0")
-- Thrust: TargetInfo: thrust: (1.12.0.0)
-- Thrust: TargetInfo: thrust > IMPORTED: TRUE
-- Thrust: TargetInfo: thrust > INTERFACE_LINK_LIBRARIES: Thrust::CPP::Host;Thrust::CUDA::Device
-- Performing Test CXX_FLAG__Werror
-- Performing Test CXX_FLAG__Werror - Success
-- Performing Test CXX_FLAG__Wall
-- Performing Test CXX_FLAG__Wall - Success
-- Performing Test CXX_FLAG__Wextra
-- Performing Test CXX_FLAG__Wextra - Success
-- Performing Test CXX_FLAG__Winit_self
-- Performing Test CXX_FLAG__Winit_self - Success
-- Performing Test CXX_FLAG__Woverloaded_virtual
-- Performing Test CXX_FLAG__Woverloaded_virtual - Failed
-- Performing Test CXX_FLAG__Wcast_qual
-- Performing Test CXX_FLAG__Wcast_qual - Success
-- Performing Test CXX_FLAG__Wno_cast_align
-- Performing Test CXX_FLAG__Wno_cast_align - Success
-- Performing Test CXX_FLAG__Wno_long_long
-- Performing Test CXX_FLAG__Wno_long_long - Success
-- Performing Test CXX_FLAG__Wno_variadic_macros
-- Performing Test CXX_FLAG__Wno_variadic_macros - Failed
-- Performing Test CXX_FLAG__Wno_unused_function
-- Performing Test CXX_FLAG__Wno_unused_function - Failed
-- Performing Test CXX_FLAG__Wno_unused_variable
-- Performing Test CXX_FLAG__Wno_unused_variable - Success
-- Enabling Thrust configuration: cpp.cuda.cpp14
-- CPP system found?  TRUE
-- CUDA system found? TRUE
-- TBB system found?  FALSE
-- OMP system found?  FALSE
-- Configuring done
CMake Error: Cannot determine link language for target "thrust.test.zip_iterator_sort_by_key".
CMake Error: CMake can not determine linker language for target: thrust.test.zip_iterator_sort_by_key
CMake Error: Cannot determine link language for target "thrust.test.zip_iterator_sort".
CMake Error: CMake can not determine linker language for target: thrust.test.zip_iterator_sort
CMake Error: Cannot determine link language for target "thrust.test.zip_iterator_reduce_by_key".
CMake Error: CMake can not determine linker language for target: thrust.test.zip_iterator_reduce_by_key
CMake Error: Cannot determine link language for target "thrust.test.zip_function".
CMake Error: CMake can not determine linker language for target: thrust.test.zip_function
CMake Error: Cannot determine link language for target "thrust.test.vector_insert".
CMake Error: CMake can not determine linker language for target: thrust.test.vector_insert
CMake Error: Cannot determine link language for target "thrust.test.vector_allocators".
CMake Error: CMake can not determine linker language for target: thrust.test.vector_allocators
CMake Error: Cannot determine link language for target "thrust.test.unique".
CMake Error: CMake can not determine linker language for target: thrust.test.unique
CMake Error: Cannot determine link language for target "thrust.test.uninitialized_copy".
CMake Error: CMake can not determine linker language for target: thrust.test.uninitialized_copy
CMake Error: Cannot determine link language for target "thrust.test.tuple_scan".
CMake Error: CMake can not determine linker language for target: thrust.test.tuple_scan
CMake Error: Cannot determine link language for target "thrust.test.tuple_reduce".
CMake Error: CMake can not determine linker language for target: thrust.test.tuple_reduce

This can be reproduced by building with ci/local/build.bash -i gpuci/cccl:nvhpc20.9-devel-ubuntu20.04-nvcxx20.9.

@brycelelbach
Copy link
Copy Markdown
Collaborator

Also, can this PR update gpuCI to use this new option? The three "coverage plans" in ci/common/build.bash will need to be updated to use this instead of hardcoding specific C++ dialects.

@alliepiper
Copy link
Copy Markdown
Collaborator Author

Per our discussion today:

  • Also add a LATEST option (only latest, no other dialects)
  • Implement for CUB, too.

@alliepiper alliepiper force-pushed the enh/dialect_latest/gh.thrust1321 branch from aacec62 to 06e24b8 Compare January 28, 2021 22:18
@alliepiper
Copy link
Copy Markdown
Collaborator Author

run tests

@alliepiper
Copy link
Copy Markdown
Collaborator Author

  • Added a LATEST option
  • Updated the gpuCI scripts to use either ALL or LATEST dialects
  • Verified that the new options are propagated to CUB when building CUB targets.

gpuCI is failing now, apparently calling enable_language from a function works on windows, but not on linux. I'll have to refactor this a bit more before it'll be ready.

@alliepiper alliepiper force-pushed the enh/dialect_latest/gh.thrust1321 branch from 06e24b8 to 71bdde4 Compare January 29, 2021 19:34
@alliepiper
Copy link
Copy Markdown
Collaborator Author

run tests

@alliepiper alliepiper force-pushed the enh/dialect_latest/gh.thrust1321 branch from 71bdde4 to fb210c2 Compare January 29, 2021 19:45
@alliepiper
Copy link
Copy Markdown
Collaborator Author

run tests

@alliepiper alliepiper force-pushed the enh/dialect_latest/gh.thrust1321 branch from fb210c2 to fc5fb84 Compare January 29, 2021 20:28
@alliepiper
Copy link
Copy Markdown
Collaborator Author

Rewrote the dialect detection to check cmake properties instead of running try_compiles.

run tests

The THRUST_MULTICONFIG_ENABLE_DIALECT_ALL option will turn on all
dialects supported by the configured CXX / CUDA compilers.

THRUST_MULTICONFIG_ENABLE_DIALECT_LATEST will only turn on the most
recent supported standard.
@alliepiper alliepiper force-pushed the enh/dialect_latest/gh.thrust1321 branch from fc5fb84 to 809acfc Compare January 29, 2021 20:48
@alliepiper
Copy link
Copy Markdown
Collaborator Author

run tests

@alliepiper alliepiper self-assigned this Feb 8, 2021
@alliepiper alliepiper merged commit aecc656 into NVIDIA:main Feb 9, 2021
@alliepiper alliepiper deleted the enh/dialect_latest/gh.thrust1321 branch February 9, 2021 20:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

only: cmake CMake changes only. Doesn't need internal NVIDIA CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add THRUST_MULTICONFIG_ENABLE_DIALECT_LATEST CMake option for CI usecases

2 participants