Skip to content

Commit

Permalink
Develop stream 2025-01-20 (#515)
Browse files Browse the repository at this point in the history
* Update copyright date python scripts

* Fix warnings when generating sphinx docs

* fix GenerateResourceSpec for gfx90a

* fix relying on ROCPRIM_TARGET_ARCH

* fix GenerateResourceSpec for gfx90a

* Update documentation generation instructions

* log more information during configure

* CI changes to speedup development

* fix usage of numeric_limits in tests

* Fix rules overwrite for other then MR pipelines

* Resolve "hook up additional rocThrust bitwise reproducibility tests into CI"

* General changes CCCL 2.6

* Add missing copyright banners

* Fix CMake warnings

* Remove workaround for compiler issue for inclusive/exclusive scan with FixedVector items

* Finalize changes for CCCL 2.6.0

* Resolve "Building rocRAND (used in benchmarks) takes significant time"

* Remove extra dashes in the documentation its \param and \tparam

* Documentation to ci upload

* Adopt symbol visibility rules in rocThrust

* Update copyright dates

* Fix minor copyright year typo

* Clang formatting on replacements of typedef

* One more formatting issue in examples

* Fix rebasing mistake in summary

* cstdint.h is removed from thrust, replaced usage in rebased code

* Add to CHANGELOG CCCL 2.6.0 changes

---------

Co-authored-by: Sander Bos <[email protected]>
Co-authored-by: Robin Voetter <[email protected]>
Co-authored-by: Bence Parajdi <[email protected]>
Co-authored-by: Nara Prasetya <[email protected]>
Co-authored-by: Enrico Degregori <[email protected]>
Co-authored-by: Beatriz Navidad Vilches <[email protected]>
Co-authored-by: Anton Gorenko <[email protected]>
Co-authored-by: Borys Petrov <[email protected]>
  • Loading branch information
9 people authored Feb 28, 2025
1 parent 0006584 commit 0d5f02a
Show file tree
Hide file tree
Showing 861 changed files with 11,517 additions and 12,822 deletions.
130 changes: 113 additions & 17 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ########################################################################
# Copyright 2019-2024 Advanced Micro Devices, Inc.
# Copyright 2019-2025 Advanced Micro Devices, Inc.
# ########################################################################

include:
Expand All @@ -23,6 +23,10 @@ stages:
- test # Tests if unit tests are passing (CTest)
- benchmark # Runs the non-internal benchmarks (Google Benchmark)

workflow:
rules:
- if: $CI_MERGE_REQUEST_LABELS !~ /CI Skip/

variables:
# Helper variables
PACKAGE_DIR: $BUILD_DIR/package
Expand Down Expand Up @@ -74,7 +78,6 @@ copyright-date:
-D CMAKE_CXX_COMPILER=hipcc
-D CMAKE_BUILD_TYPE=Release
-D BUILD_TEST=OFF
-D BUILD_HIPSTDPAR_TEST=OFF
-D BUILD_EXAMPLE=OFF
-D ROCM_DEP_ROCMCORE=OFF
-D CMAKE_C_COMPILER_LAUNCHER=phc_sccache_c
Expand Down Expand Up @@ -116,7 +119,6 @@ copyright-date:
-D CMAKE_BUILD_TYPE=$BUILD_TYPE
-D BUILD_$BUILD_TARGET=ON
-D GPU_TARGETS=$GPU_TARGETS
-D AMDGPU_TEST_TARGETS=$GPU_TARGETS
-D RNG_SEED_COUNT=$rng_seed_count
-D PRNG_SEEDS=$prng_seeds
-D CMAKE_C_COMPILER_LAUNCHER=phc_sccache_c
Expand All @@ -137,7 +139,7 @@ copyright-date:
- $CI_PROJECT_DIR/build/.ninja_log
exclude:
- $CI_PROJECT_DIR/build/**/*.o
expire_in: 2 weeks
expire_in: 1 day

build:cmake-latest:
stage: build
Expand Down Expand Up @@ -183,7 +185,7 @@ build:package:
paths:
- $PACKAGE_DIR/rocthrust*.deb
- $PACKAGE_DIR/rocthrust*.zip
expire_in: 2 weeks
expire_in: 1 day

build:windows:
stage: build
Expand Down Expand Up @@ -231,7 +233,7 @@ build:windows:
paths:
- $CI_PROJECT_DIR/build/
- $ROCPRIM_DIR/build/install
expire_in: 2 weeks
expire_in: 1 day

test:package:
stage: test
Expand Down Expand Up @@ -268,13 +270,18 @@ test:doc:
extends:
- .build:docs
- .rules:test
artifacts:
paths:
- $DOCS_DIR/_build/html/
expire_in: 2 weeks

test:
.test:rocm:
stage: test
tags:
- rocm
- $GPU
extends:
- .cmake-minimum
- .rules:test
- .gpus:rocm
needs:
- job: build:cmake-minimum
parallel:
Expand All @@ -294,10 +301,76 @@ test:
- HSA_ENABLE_SDMA=0 ctest
--output-on-failure
--repeat-until-fail 2
--tests-regex $GPU_TARGET
--resource-spec-file ./resources.json
--parallel $PARALLEL_JOBS

test:rocm-any-gpu:
variables:
GPU: ""
PARALLEL_JOBS: 1
extends:
- .test:rocm
rules:
- if: $CI_MERGE_REQUEST_TITLE =~ /Draft:/ && $CI_MERGE_REQUEST_LABELS !~ /Arch::/

test:rocm-label-arch:
extends:
- .gpus:rocm
- .test:rocm
- .rules:arch-labels

test:rocm-all-gpus:
variables:
SHOULD_BE_UNDRAFTED: "true"
extends:
- .gpus:rocm
- .test:rocm
- .rules:test

test-bitwise-repro-generate:
stage: test
extends:
- .cmake-minimum
- .rules:manual
- .gpus:rocm
needs:
- job: build:cmake-minimum
parallel:
matrix:
- BUILD_TYPE: Release
BUILD_TARGET: TEST
BUILD_VERSION: 14
cache:
key: database
paths:
- $CI_PROJECT_DIR/bitwise.db
policy: push
script:
- cd $CI_PROJECT_DIR/build/test/
- ROCTHRUST_BWR_PATH=$CI_PROJECT_DIR/bitwise.db ROCTHRUST_BWR_GENERATE=1 ./reproducibility.hip

test-bitwise-repro:
stage: test
extends:
- .cmake-minimum
- .rules:test
- .gpus:rocm
needs:
- job: build:cmake-minimum
parallel:
matrix:
- BUILD_TYPE: Release
BUILD_TARGET: TEST
BUILD_VERSION: 14
cache:
key: database
paths:
- $CI_PROJECT_DIR/bitwise.db
policy: pull
script:
- cd $CI_PROJECT_DIR/build/test/
- ROCTHRUST_BWR_PATH=$CI_PROJECT_DIR/bitwise.db ./reproducibility.hip

.rocm-windows:test:
extends:
- .gpus:rocm-windows
Expand Down Expand Up @@ -358,7 +431,7 @@ build:cuda-and-omp:
tags:
- build
variables:
CCCL_GIT_BRANCH: v2.5.0
CCCL_GIT_BRANCH: v2.6.0
CCCL_DIR: ${CI_PROJECT_DIR}/cccl
needs: []
script:
Expand Down Expand Up @@ -402,16 +475,17 @@ build:cuda-and-omp:
- $CCCL_DIR/thrust/cmake/ThrustRunTest.cmake
- $CCCL_DIR/thrust/cmake/ThrustRunExample.cmake
- $CI_PROJECT_DIR/build/.ninja_log
expire_in: 1 week
expire_in: 1 day

test:cuda-and-omp:
.test:cuda-and-omp:
stage: test
tags:
- nvcc
- $GPU
needs:
- build:cuda-and-omp
extends:
- .nvcc
- .gpus:nvcc
- .rules:test
before_script:
# This is only needed because of the legacy before_script in .gpus:nvcc would otherwise overwrite before_script
- !reference [.nvcc, before_script]
Expand All @@ -420,6 +494,23 @@ test:cuda-and-omp:
# These tests are executed on the build stage because they require sources
- ctest --output-on-failure --exclude-regex "thrust.example.cmake.add_subdir|thrust.test.cmake.check_source_files"

test:cuda-and-omp-any-gpu:
variables:
GPU: ""
PARALLEL_JOBS: 1
extends:
- .test:cuda-and-omp
rules:
- if: $CI_MERGE_REQUEST_TITLE =~ /Draft:/

test:cuda-and-omp-all-gpus:
variables:
SHOULD_BE_UNDRAFTED: "true"
extends:
- .gpus:nvcc
- .test:cuda-and-omp
- .rules:test

.benchmark-base:
stage: benchmark
extends:
Expand All @@ -430,7 +521,12 @@ test:cuda-and-omp:

benchmark:
needs:
- build:cmake-minimum
- job: build:cmake-minimum
parallel:
matrix:
- BUILD_TYPE: Release
BUILD_TARGET: BENCHMARKS
BUILD_VERSION: 14
extends:
- .cmake-minimum
- .gpus:rocm
Expand All @@ -453,4 +549,4 @@ benchmark:
artifacts:
paths:
- ${BENCHMARK_RESULT_DIR}
expire_in: 1 week
expire_in: 1 day
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Documentation for rocThrust available at

### Added

* gfx950 support
* Added gfx950 support.
* Merged changes from upstream CCCL/thrust 2.6.0

## rocThrust 3.3.0 for ROCm 6.4

Expand Down
27 changes: 13 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ########################################################################
# Copyright 2019-2024 Advanced Micro Devices, Inc.
# Copyright 2019-2025 Advanced Micro Devices, Inc.
# ########################################################################

cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
Expand All @@ -22,6 +22,12 @@ endif()
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

if (CMAKE_CXX_STANDARD EQUAL 14)
message(WARNING "C++14 will be deprecated in the next major release")
elseif(NOT CMAKE_CXX_STANDARD EQUAL 17)
message(FATAL_ERROR "Only C++14 and C++17 are supported")
endif()

# Set HIP flags
set(CMAKE_HIP_STANDARD 17)
set(CMAKE_HIP_STANDARD_REQUIRED ON)
Expand All @@ -39,6 +45,7 @@ option(BUILD_HIPSTDPAR_TEST_WITH_TBB "Build hipstdpar tests with TBB" OFF)
option(BUILD_EXAMPLES "Build examples" OFF)
option(BUILD_BENCHMARKS "Build benchmarks" OFF)
option(DOWNLOAD_ROCPRIM "Download rocPRIM and do not search for rocPRIM package" OFF)
cmake_dependent_option(DOWNLOAD_ROCRAND "Download rocRAND and do not search for rocRAND package" OFF BUILD_BENCHMARKS OFF)
option(DOWNLOAD_ROCRAND "Download rocRAND and do not search for rocRAND package" OFF)
option(BUILD_ADDRESS_SANITIZER "Build with address sanitizer enabled" OFF)
cmake_dependent_option(ENABLE_UPSTREAM_TESTS "Enable upstream (thrust) tests" ON BUILD_TEST OFF)
Expand Down Expand Up @@ -130,16 +137,9 @@ if (NOT THRUST_HOST_SYSTEM IN_LIST THRUST_HOST_SYSTEM_OPTIONS)
)
endif ()

if(DISABLE_WERROR)
add_compile_options(-Wall -Wextra)
else()
add_compile_options(-Wall -Wextra -Werror)
endif()

if (CMAKE_CXX_STANDARD EQUAL 14)
message(WARNING "C++14 will be deprecated in the next major release")
elseif(NOT CMAKE_CXX_STANDARD EQUAL 17)
message(FATAL_ERROR "Only C++14 and C++17 are supported")
set(COMPILE_OPTIONS -Wall -Wextra)
if(NOT DISABLE_WERROR)
list(APPEND COMPILE_OPTIONS -Werror)
endif()

if (WIN32)
Expand All @@ -149,13 +149,13 @@ endif()

# Address Sanitizer
if(BUILD_ADDRESS_SANITIZER)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -shared-libasan")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -shared-libasan")
list(APPEND COMPILE_OPTIONS -fsanitize=address -shared-libasan)
add_link_options(-fuse-ld=lld)
endif()

# Setup VERSION
rocm_setup_version(VERSION "3.3.0")
math(EXPR rocthrust_VERSION_NUMBER "${rocthrust_VERSION_MAJOR} * 100000 + ${rocthrust_VERSION_MINOR} * 100 + ${rocthrust_VERSION_PATCH}")

# Print configuration summary
include(cmake/Summary.cmake)
Expand Down Expand Up @@ -191,7 +191,6 @@ endif()
# Benchmarks
if(BUILD_BENCHMARKS)
add_subdirectory(benchmarks)
add_subdirectory(internal/benchmark)
endif()

#Create header wrapper for backward compatibility
Expand Down
Loading

0 comments on commit 0d5f02a

Please sign in to comment.