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

Develop stream 2024-10-28 #574

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 111 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ include:
- /deps-rocm.yaml
- /deps-nvcc.yaml
- /deps-windows.yaml
- /deps-compiler-acceleration.yaml
- /gpus-rocm.yaml
- /gpus-nvcc.yaml
- /rules.yaml
Expand Down Expand Up @@ -68,59 +69,71 @@ copyright-date:
extends:
- .deps:rocm
- .deps:cmake-minimum
- .deps:compiler-acceleration
before_script:
- !reference [".deps:rocm", before_script]
- !reference [".deps:cmake-minimum", before_script]
- !reference [".deps:compiler-acceleration", before_script]

.rocm:cmake-latest:
variables:
COMPILER: /opt/rocm/bin/amdclang++
extends:
- .deps:rocm
- .deps:cmake-latest
- .deps:compiler-acceleration
before_script:
- !reference [".deps:rocm", before_script]
- !reference [".deps:cmake-latest", before_script]
- !reference [".deps:compiler-acceleration", before_script]

.rocm-hipcc:cmake-minimum:
variables:
COMPILER: /opt/rocm/bin/hipcc
extends:
- .deps:rocm
- .deps:cmake-minimum
- .deps:compiler-acceleration
before_script:
- !reference [".deps:rocm", before_script]
- !reference [".deps:cmake-minimum", before_script]
- !reference [".deps:compiler-acceleration", before_script]

.nvcc:cmake-minimum:
variables:
COMPILER: /usr/bin/g++
extends:
- .deps:nvcc
- .deps:cmake-minimum
- .deps:compiler-acceleration
before_script:
- !reference [".deps:nvcc", before_script]
- !reference [".deps:cmake-minimum", before_script]
- !reference [".deps:compiler-acceleration", before_script]

.nvcc:cmake-latest:
variables:
COMPILER: /usr/bin/g++
extends:
- .deps:nvcc
- .deps:cmake-latest
- .deps:compiler-acceleration
before_script:
- !reference [".deps:nvcc", before_script]
- !reference [".deps:cmake-latest", before_script]
- !reference [".deps:compiler-acceleration", before_script]

.nvcc-clang:cmake-minimum:
variables:
COMPILER: /usr/local/bin/clang++
extends:
- .deps:nvcc
- .deps:cmake-latest
- .deps:compiler-acceleration
before_script:
- !reference [".deps:nvcc", before_script]
- !reference [".deps:cmake-latest", before_script]
- !reference [".deps:compiler-acceleration", before_script]

.rocm:build:
variables:
Expand Down Expand Up @@ -148,8 +161,10 @@ copyright-date:
-D BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
-D AMDGPU_TARGETS=${GPU_TARGETS}
-D DISABLE_WERROR=OFF
-D CMAKE_C_COMPILER_LAUNCHER=phc_sccache_c
-D CMAKE_CXX_COMPILER_LAUNCHER=phc_sccache_cxx
- cmake --build $CI_PROJECT_DIR/build
- cmake --build $CI_PROJECT_DIR/build --target package
- if [[ "${BUILD_SHARED_LIBS}" = "ON" ]]; then cmake --build $CI_PROJECT_DIR/build --target package; fi

.nvcc:build:
stage: build
Expand All @@ -171,8 +186,11 @@ copyright-date:
-D BUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF
-D BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
-D NVGPU_TARGETS=${GPU_TARGETS}
-D CMAKE_C_COMPILER_LAUNCHER=phc_sccache_c
-D CMAKE_CXX_COMPILER_LAUNCHER=phc_sccache_cxx
-D CMAKE_CUDA_COMPILER_LAUNCHER=phc_sccache_cuda
- cmake --build $CI_PROJECT_DIR/build
- cmake --build $CI_PROJECT_DIR/build --target package
- if [[ "${BUILD_SHARED_LIBS}" = "ON" ]]; then cmake --build $CI_PROJECT_DIR/build --target package; fi

# Build output is too big to upload in the case of the static library builds
.save-artifacts:
Expand Down Expand Up @@ -304,6 +322,8 @@ benchmark:benchmark-tuning:
-D BENCHMARK_TUNING_MIN_GRID_SIZE=${BENCHMARK_TUNING_MIN_GRID_SIZE}
-D BENCHMARK_TUNING_THREAD_OPTIONS="${BENCHMARK_TUNING_THREAD_OPTIONS}"
-D BENCHMARK_TUNING_BLOCK_OPTIONS="${BENCHMARK_TUNING_BLOCK_OPTIONS}"
-D CMAKE_C_COMPILER_LAUNCHER=phc_sccache_c
-D CMAKE_CXX_COMPILER_LAUNCHER=phc_sccache_cxx
- cmake --build $CI_PROJECT_DIR/build --target benchmark_rocrand_tuning
- $CI_PROJECT_DIR/build/benchmark/tuning/benchmark_rocrand_tuning --benchmark_out_format=json --benchmark_out=$CI_PROJECT_DIR/build/rocrand_config_tuning_${GPU_TARGET}_${CI_JOB_ID}.json
artifacts:
Expand Down Expand Up @@ -618,3 +638,92 @@ test:windows:
- cmake -E copy "$CI_PROJECT_DIR/build/install/bin/rocRAND.dll" "$CI_PROJECT_DIR/build_install_test" *>&1
# Run package test
- ctest --test-dir "$CI_PROJECT_DIR/build_install_test" -C $CMAKE_BUILD_TYPE --output-on-failure *>&1

.statistical-test:
stage: test
needs:
- build:rocm-cmake-minimum
extends:
- .rocm:cmake-minimum
variables:
ROCRAND_STAT_TESTS_GIT_BRANCH: "develop_stream"
ROCRAND_STAT_TESTS_DIR: ${CI_PROJECT_DIR}/rocrand-statistical-tests
LOGS_DIR: ${CI_PROJECT_DIR}/logs
script:
- $SUDO_CMD apt-get update -qq
- $SUDO_CMD apt-get install -y -qq python3
- cd $CI_PROJECT_DIR/build
- $SUDO_CMD dpkg -i rocrand_*.deb rocrand-dev*.deb
- cd $CI_PROJECT_DIR
- git clone -b ${ROCRAND_STAT_TESTS_GIT_BRANCH} https://gitlab-ci-token:${CI_JOB_TOKEN}@${ROCRAND_STAT_TESTS_GIT_URL}
- cmake
-S ${ROCRAND_STAT_TESTS_DIR}
-B ${ROCRAND_STAT_TESTS_DIR}/build
-G Ninja
-D CMAKE_CXX_COMPILER=${COMPILER}
-D CMAKE_C_COMPILER_LAUNCHER=phc_sccache_c
-D CMAKE_CXX_COMPILER_LAUNCHER=phc_sccache_cxx
- cmake --build ${ROCRAND_STAT_TESTS_DIR}/build
- mkdir ${LOGS_DIR}
- cd ${ROCRAND_STAT_TESTS_DIR}/build
- nproc
artifacts:
paths:
- ${LOGS_DIR}/*
expire_in: never

# TestU01 SmallCrush, 10 tests, 15 statistics, takes about 5 seconds
statistical-test:crush-small:
tags:
- rocm
extends:
- .statistical-test
- .rules:manual
script:
- !reference [".statistical-test", script]
- python3 -u run_crush.py --logs_dir ${LOGS_DIR} --battery small |& tee ${LOGS_DIR}/summary-crush-small.log

# TestU01 Crush, 96 tests, 144 statistics, takes about 30 minutes
statistical-test:crush-medium:
tags:
- rocm
- big-parallel
extends:
- .statistical-test
- .rules:manual
script:
- !reference [".statistical-test", script]
- python3 -u run_crush.py --logs_dir ${LOGS_DIR} --battery medium |& tee ${LOGS_DIR}/summary-crush-medium.log

# TestU01 BigCrush, 116 tests, 160 statistics, takes about 3 hours
statistical-test:crush-big:
tags:
- rocm
- big-parallel
extends:
- .statistical-test
- .rules:manual
timeout: 8h
script:
- !reference [".statistical-test", script]
- python3 -u run_crush.py --logs_dir ${LOGS_DIR} --battery big |& tee ${LOGS_DIR}/summary-crush-big.log

# Dieharder, 114 tests, takes about 25 minutes
statistical-test:dieharder:
extends:
- .statistical-test
- .rules:manual
script:
- !reference [".statistical-test", script]
- $SUDO_CMD apt-get install -y -qq dieharder
- python3 -u run_dieharder.py --logs_dir ${LOGS_DIR} |& tee ${LOGS_DIR}/summary-dieharder.log

# Distribution tests: Pearson, Anderson-Darling, Kolmogorov-Smirnov
statistical-test:distributions:
extends:
- .statistical-test
- .rules:test
- .gpus:rocm
script:
- !reference [".statistical-test", script]
- ./test_distributions_generate --engine all --dis all --runs 100 |& tee ${LOGS_DIR}/summary-distributions.log
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ Documentation for rocRAND is available at
### Changed

* `rocrand_discrete` for MTGP32, LFSR113 and ThreeFry generators now uses the alias method, which is faster than binary search in CDF.
* Removed TBB dependency for multi-core processing of host-side generation.

## rocRAND 3.1.1 for ROCm 6.2.4

## Fixes

* Fixed " unknown extension ?>" issue in scripts/config-tuning/select_best_config.py
* Fixed " unknown extension ?>" issue in scripts/config-tuning/select_best_config.py
when using python version thats older than 3.11
* Fixed low random sequence quality of `ROCRAND_RNG_PSEUDO_THREEFRY2_64_20` and `ROCRAND_RNG_PSEUDO_THREEFRY4_64_20`.

Expand All @@ -47,7 +48,7 @@ Documentation for rocRAND is available at
* If TBB is not found when configuring rocRAND, the configuration is still successful, and the host generators are executed on a single CPU thread.
* Added the option to create a host generator to the Python wrapper
* Added the option to create a host generator to the Fortran wrapper
* Added dynamic ordering. This ordering is free to rearrange the produced numbers,
* Added dynamic ordering. This ordering is free to rearrange the produced numbers,
which can be specific to devices and distributions. It is implemented for:
* XORWOW, MRG32K3A, MTGP32, Philox 4x32-10, MRG31K3P, LFSR113, and ThreeFry
* For the NVIDIA platform compilation using clang as the host compiler is now supported.
Expand All @@ -66,7 +67,7 @@ Documentation for rocRAND is available at

### Changes

* For device-side generators, you can now wrap calls to rocrand_generate_* inside of a hipGraph. There are a few
* For device-side generators, you can now wrap calls to rocrand_generate_* inside of a hipGraph. There are a few
things to be aware of:
- Generator creation (rocrand_create_generator), initialization (rocrand_initialize_generator), and destruction (rocrand_destroy_generator) must still happen outside the hipGraph.
- After the generator is created, you may call API functions to set its seed, offset, and order.
Expand Down
6 changes: 3 additions & 3 deletions benchmark/custom_csv_formater.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ class customCSVReporter : public BenchmarkReporter
"error_message"};
};

bool customCSVReporter::ReportContext(const Context& context)
inline bool customCSVReporter::ReportContext(const Context& context)
{
PrintBasicContext(&GetErrorStream(), context);
return true;
}

void customCSVReporter::ReportRuns(const std::vector<Run>& reports)
inline void customCSVReporter::ReportRuns(const std::vector<Run>& reports)
{
std::ostream& Out = GetOutputStream();

Expand Down Expand Up @@ -149,7 +149,7 @@ void customCSVReporter::ReportRuns(const std::vector<Run>& reports)
}
}

void customCSVReporter::PrintRunData(const Run& run)
inline void customCSVReporter::PrintRunData(const Run& run)
{
std::ostream& Out = GetOutputStream();
std::ostream& Err = GetErrorStream();
Expand Down
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
/doxygen/xml/
/doxygen/*.tag
/sphinx/_toc.yml
fortran-api-reference.md
Loading
Loading