Skip to content

Commit f3a8622

Browse files
stanleytsang-amdumfranzwnolmoonenNaraendaevetsso
authored
6.2 mergeback into develop (#524)
* Update device-specific config headers with benchmark tuning results (#483) I ran the benchmark tuning code and scripts on the remaining architectures in our GPU support matrix. This change updates the config headers with the results. * Updates and test coverage for hipGraph support in rocRAND (#439) (#482) This change allows device-side generators to be used inside of hipGraphs. More specifically, you can 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. - After the generator is initialized (but before stream capture or manual graph creation begins), use rocrand_set_stream to set the stream the generator will use within the graph. - A generator's seed, offset, and stream may not be changed from within the hipGraph. Attempting to do so may result in unpredicable behaviour. - API calls for the poisson distribution (eg. rocrand_generate_poisson) are not yet supported inside of hipGraphs. I've added a note to the changelog that mentions these details. In addition to the changes necessary to support the behaviour described above, this change also: - updates the changelog to alert the user to the restrictions mentioned above - adds new unit test coverage to exercises generators and distributions within hipGraphs. * workaround for regression in sobol kernel (#485) (#487) introduced by generic codepath for host and device generator Co-authored-by: Nol Moonen <[email protected]> * Rename test_config_dispatch.cpp to test_rocrand_config_dispatch.cpp (#496) * fix(lfsr113,mgr,,mtgp32,philox4x32,threefry,xorwow): force inline generate function (#495) (#497) A compiler change caused the generate function to no longer be inlined which caused a performance regression. Force inlining resolves this. Co-authored-by: Nara <[email protected]> * cmake: don't set CMAKE_C_COMPILER, as rocRAND is a CXX project (#502) * cherry picking documentation from develop into 6.2 (#507) * organizing docs into subfolders * update license and index * Update LICENSE.txt Co-authored-by: Nara <[email protected]> * removing what-is-rocRAND * Update Read the Docs configuration to use Python 3.10 and latest rocm-docs-core (#503) * Bump urllib3 from 2.2.1 to 2.2.2 in /docs/sphinx (#505) Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.2.1 to 2.2.2. - [Release notes](https://github.com/urllib3/urllib3/releases) - [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst) - [Commits](urllib3/urllib3@2.2.1...2.2.2) --- updated-dependencies: - dependency-name: urllib3 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Nara <[email protected]> Co-authored-by: Sam Wu <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add an option for using TBB for host-side generators * Add package dependencies on TBB if used * Correct dependencies for RHEL / SLES --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Wayne Franz <[email protected]> Co-authored-by: Nol Moonen <[email protected]> Co-authored-by: Nara <[email protected]> Co-authored-by: Steve Leung <[email protected]> Co-authored-by: srawat <[email protected]> Co-authored-by: Nara <[email protected]> Co-authored-by: Sam Wu <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lauren Wrubleski <[email protected]>
1 parent 2d549a1 commit f3a8622

File tree

6 files changed

+12
-22
lines changed

6 files changed

+12
-22
lines changed

.gitlab-ci.yml

-1
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,6 @@ test:nvcc-parity:
598598
-D BUILD_SHARED_LIBS="$BUILD_SHARED_LIBS"
599599
-D BUILD_TEST=ON
600600
-D CMAKE_BUILD_TYPE=Release
601-
-D CMAKE_C_COMPILER:FILEPATH="$ROCM_PATH/bin/clang.exe"
602601
-D CMAKE_CXX_COMPILER:FILEPATH="$ROCM_PATH/bin/clang++.exe"
603602
-D CMAKE_INSTALL_PREFIX:PATH="$CI_PROJECT_DIR/build/install"
604603
-D CMAKE_PREFIX_PATH:PATH="$ROCM_PATH/lib/cmake"

cmake/Dependencies.cmake

+1-4
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,12 @@ if(BUILD_TEST)
6363
if(DEFINED CMAKE_CXX_COMPILER)
6464
set(CXX_COMPILER_OPTION "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}")
6565
endif()
66-
if(DEFINED CMAKE_C_COMPILER)
67-
set(C_COMPILER_OPTION "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}")
68-
endif()
6966
download_project(
7067
PROJ googletest
7168
GIT_REPOSITORY https://github.com/google/googletest.git
7269
GIT_TAG release-1.11.0
7370
INSTALL_DIR ${GTEST_ROOT}
74-
CMAKE_ARGS -DBUILD_GTEST=ON -DINSTALL_GTEST=ON -Dgtest_force_shared_crt=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> ${CXX_COMPILER_OPTION} ${C_COMPILER_OPTION} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
71+
CMAKE_ARGS -DBUILD_GTEST=ON -DINSTALL_GTEST=ON -Dgtest_force_shared_crt=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> ${CXX_COMPILER_OPTION} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
7572
LOG_DOWNLOAD TRUE
7673
LOG_CONFIGURE TRUE
7774
LOG_BUILD TRUE

library/CMakeLists.txt

+10-5
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ if (ROCRAND_HAVE_ASM_INCBIN)
8787
enable_language(ASM)
8888
list(TRANSFORM SOBOL_PRECOMPUTED_SOURCES APPEND ".S")
8989
set_source_files_properties(${SOBOL_PRECOMPUTED_SOURCES} PROPERTIES
90-
INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/src)
90+
INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/src)
9191
else()
9292
list(TRANSFORM SOBOL_PRECOMPUTED_SOURCES APPEND ".cpp")
9393
endif()
@@ -123,12 +123,17 @@ else()
123123
target_link_libraries(rocrand PUBLIC hip::host)
124124
endif()
125125

126-
if(NOT WIN32)
126+
option(ROCRAND_USE_TBB "Use TBB for host-side generators if available." ON)
127+
if(NOT WIN32 AND ROCRAND_USE_TBB)
127128
find_package(TBB QUIET)
128129
if(NOT TARGET TBB::tbb)
129130
message(WARNING "TBB is not found. Building without parallel STL support")
130131
else()
131132
target_link_libraries(rocrand PRIVATE TBB::tbb)
133+
rocm_package_add_deb_dependencies("libtbb-dev")
134+
set(CPACK_DEB_PACKAGE_REQUIRES "${CPACK_DEB_PACKAGE_REQUIRES}" PARENT_SCOPE)
135+
rocm_package_add_rpm_dependencies("(tbb-devel or tbb)")
136+
set(CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES}" PARENT_SCOPE)
132137

133138
# Older libstdc++ headers require TBB to be installed to be able to #include <execution>
134139
target_compile_definitions(rocrand PRIVATE ROCRAND_PARALLEL_STL)
@@ -187,7 +192,7 @@ if (WIN32)
187192
install (TARGETS rocrand DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
188193
if (BUILD_TEST)
189194
add_custom_command(
190-
TARGET rocrand
195+
TARGET rocrand
191196
POST_BUILD
192197
COMMAND ${CMAKE_COMMAND} -E copy
193198
$<TARGET_FILE:rocrand>
@@ -196,13 +201,13 @@ if (WIN32)
196201
endif()
197202
if (BUILD_BENCHMARK)
198203
add_custom_command(
199-
TARGET rocrand
204+
TARGET rocrand
200205
POST_BUILD
201206
COMMAND ${CMAKE_COMMAND} -E copy
202207
$<TARGET_FILE:rocrand>
203208
${PROJECT_BINARY_DIR}/benchmark/$<TARGET_FILE_NAME:rocrand>
204209
)
205-
endif()
210+
endif()
206211
endif()
207212

208213
# Fortran wrappers for rocRAND

test/cpp_wrapper/cmake/Dependencies.cmake

+1-4
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,12 @@ if(NOT TARGET GTest::GTest AND NOT TARGET GTest::gtest)
5656
if(DEFINED CMAKE_CXX_COMPILER)
5757
set(CXX_COMPILER_OPTION "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}")
5858
endif()
59-
if(DEFINED CMAKE_C_COMPILER)
60-
set(C_COMPILER_OPTION "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}")
61-
endif()
6259
download_project(
6360
PROJ googletest
6461
GIT_REPOSITORY https://github.com/google/googletest.git
6562
GIT_TAG release-1.11.0
6663
INSTALL_DIR ${GTEST_ROOT}
67-
CMAKE_ARGS -DBUILD_GTEST=ON -DINSTALL_GTEST=ON -Dgtest_force_shared_crt=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> ${CXX_COMPILER_OPTION} ${C_COMPILER_OPTION} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
64+
CMAKE_ARGS -DBUILD_GTEST=ON -DINSTALL_GTEST=ON -Dgtest_force_shared_crt=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> ${CXX_COMPILER_OPTION} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
6865
LOG_DOWNLOAD TRUE
6966
LOG_CONFIGURE TRUE
7067
LOG_BUILD TRUE

toolchain-linux.cmake

-7
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,3 @@ if (NOT DEFINED ENV{CXX})
1616
else()
1717
set(CMAKE_CXX_COMPILER "$ENV{CXX}" CACHE PATH "Path to the C++ compiler")
1818
endif()
19-
20-
if (NOT DEFINED ENV{CC})
21-
set(CMAKE_C_COMPILER "${rocm_bin}/amdclang" CACHE PATH "Path to the C compiler")
22-
set(CMAKE_CXX_FLAGS "-mllvm -amdgpu-early-inline-all=true -mllvm -amdgpu-function-calls=false")
23-
else()
24-
set(CMAKE_C_COMPILER "$ENV{CC}" CACHE PATH "Path to the C compiler")
25-
endif()

toolchain-windows.cmake

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ else()
1515
endif()
1616

1717
set(CMAKE_CXX_COMPILER "${rocm_bin}/clang++.exe")
18-
set(CMAKE_C_COMPILER "${rocm_bin}/clang.exe")
1918

2019
if (NOT python)
2120
set(python "python3") # take default for windows

0 commit comments

Comments
 (0)