Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion projects/rocthrust/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -226,4 +226,4 @@ StatementMacros: [
'_LIBCUDACXX_END_NAMESPACE_VIEWS',
]
TabWidth: 2
UseTab: Never
UseTab: Never
2 changes: 1 addition & 1 deletion projects/rocthrust/.githooks/install
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
cd "$(git rev-parse --git-dir)"
cd hooks

echo "Installing hooks..."
echo "Installing hooks..."
ln -s ../../.githooks/pre-commit pre-commit
echo "Done!"
2 changes: 1 addition & 1 deletion projects/rocthrust/.github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
* @stanleytsang-amd @umfranzw @RobsonRLemos
* @stanleytsang-amd @umfranzw @RobsonRLemos
# Documentation files
docs/ @ROCm/rocm-documentation
*.md @ROCm/rocm-documentation
Expand Down
2 changes: 1 addition & 1 deletion projects/rocthrust/.gitlab/run_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def is_benchmark_executable(filename):
subprocess.check_call(args)
end_time = time.time()
duration = end_time - start_time

print(f'Benchmark {benchmark_name} took {duration:.3f} seconds to run', file=sys.stderr, flush=True)
except subprocess.CalledProcessError as error:
print(f'Could not run benchmark at {benchmark_path}. Error: "{error}"', file=sys.stderr, flush=True)
Expand Down
4 changes: 2 additions & 2 deletions projects/rocthrust/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ Documentation for rocThrust available at
* Fixed `copy_if` to work with large data types (512 bytes)

### Known Issues
* `thrust::inclusive_scan_by_key` might produce incorrect results when it's used with -O2 or -O3 optimization.
- The error is caused by a recent compiler change. There is a fix available that will be released at a later date.
* `thrust::inclusive_scan_by_key` might produce incorrect results when it's used with -O2 or -O3 optimization.
- The error is caused by a recent compiler change. There is a fix available that will be released at a later date.

## rocThrust 3.2.0 for ROCm 6.3

Expand Down
14 changes: 7 additions & 7 deletions projects/rocthrust/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ if (NOT THRUST_HOST_SYSTEM IN_LIST THRUST_HOST_SYSTEM_OPTIONS)
"THRUST_HOST_SYSTEM must be one of ${THRUST_HOST_SYSTEM_OPTIONS}"
)
endif ()

set(COMPILE_OPTIONS -Wall -Wextra)
if(NOT DISABLE_WERROR)
list(APPEND COMPILE_OPTIONS -Werror)
Expand All @@ -184,7 +184,7 @@ if (WIN32)
add_compile_options(-xhip)
add_compile_definitions(THRUST_IGNORE_DEPRECATED_CPP_DIALECT)
endif()

# Address Sanitizer
if(BUILD_ADDRESS_SANITIZER)
list(APPEND COMPILE_OPTIONS -fsanitize=address -shared-libasan)
Expand All @@ -194,25 +194,25 @@ endif()
# Setup VERSION
rocm_setup_version(VERSION ${VERSION_STRING})
math(EXPR rocthrust_VERSION_NUMBER "${rocthrust_VERSION_MAJOR} * 100000 + ${rocthrust_VERSION_MINOR} * 100 + ${rocthrust_VERSION_PATCH}")

# Thrust (with HIP backend)
add_subdirectory(thrust)

if(BUILD_TEST OR BUILD_BENCHMARK OR BUILD_HIPSTDPAR_TEST)
rocm_package_setup_component(clients)
endif()

if(CODE_COVERAGE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -fprofile-instr-generate -fcoverage-mapping")
endif()

# Tests
if(BUILD_TEST OR BUILD_HIPSTDPAR_TEST)
rocm_package_setup_client_component(tests)
if (ENABLE_UPSTREAM_TESTS)
enable_testing()
endif()

# We still want the testing to be compiled to catch some errors
#TODO: Get testing folder working with HIP on Windows
if (NOT WIN32 AND BUILD_TEST)
Expand Down Expand Up @@ -260,7 +260,7 @@ rocm_create_package(
MAINTAINER "rocthrust-maintainer@amd.com"
HEADER_ONLY
)

# Print configuration summary
include(cmake/Summary.cmake)
print_configuration_summary()
18 changes: 9 additions & 9 deletions projects/rocthrust/NOTICES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Notices and licenses file
_________________________


AMD copyrighted code (Apache 2.0)
AMD copyrighted code (Apache 2.0)
Copyright © 2019-2022 Advanced Micro Devices, Inc. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -18,13 +18,13 @@ See the License for the specific language governing permissions and
limitations under the License.


crascit-downloadproject v-u (MIT)
crascit-downloadproject v-u (MIT)
# Distributed under the OSI-approved MIT License. See accompanying
# file LICENSE or https://github.com/Crascit/DownloadProject for details.

Dependencies on scipy-scipy v-u (BSD-3-Clause)
Copyright (C) 2003-2013 SciPy Developers.
Modifications Copyright (C) 2019 Advanced Micro Devices, Inc. All rights reserved.
Dependencies on scipy-scipy v-u (BSD-3-Clause)
Copyright (C) 2003-2013 SciPy Developers.
Modifications Copyright (C) 2019 Advanced Micro Devices, Inc. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -55,7 +55,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Dependencies on thrust-thrust v1.9.2 (Apache 2.0)
Dependencies on thrust-thrust v1.9.2 (Apache 2.0)
Copyright 2008-2013 NVIDIA Corporation
Modifications Copyright (C) 2019 Advanced Micro Devices, Inc. All rights reserved.

Expand All @@ -72,7 +72,7 @@ See the License for the specific language governing permissions and
limitations under the License.


rocmsoftwareplatform-rocfft v-u (MIT)
rocmsoftwareplatform-rocfft v-u (MIT)
Copyright © 2016 Advanced Micro Devices, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Expand All @@ -82,7 +82,7 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE


thrust-thrust v1.9.2 (Apache 2.0)
thrust-thrust v1.9.2 (Apache 2.0)
Copyright 2008-2013 NVIDIA Corporation

Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -98,7 +98,7 @@ See the License for the specific language governing permissions and
limitations under the License.


thrust-thrust v1.9.2 (BSD3)
thrust-thrust v1.9.2 (BSD3)
Copyright (c) 2011, Duane Merrill. All rights reserved.
Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved.

Expand Down
2 changes: 1 addition & 1 deletion projects/rocthrust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ To specify an option, add it to your camke command, prefixed with the `-D` switc

### HIP on Windows

We've added initial support for HIP on Windows.
We've added initial support for HIP on Windows.
To install, first clone rocThrust using the steps described in [obtaining the source code](#obtaining-the-source-code).
Then, use the provided `rmake.py` Python script:

Expand Down
2 changes: 1 addition & 1 deletion projects/rocthrust/cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ if(BUILD_TEST OR BUILD_HIPSTDPAR_TEST)
UPDATE_DISCONNECTED TRUE
)
find_package(TBB REQUIRED CONFIG PATHS ${TBB_ROOT})

endif()

# SQlite (for run-to-run bitwise-reproducibility tests)
Expand Down
1 change: 0 additions & 1 deletion projects/rocthrust/cmake/FindROCMCmake.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,3 @@ if(NOT ROCM_FOUND)

find_package( ROCM 0.7.3 REQUIRED CONFIG PATHS ${PROJECT_EXTERN_DIR}/rocm-cmake )
endif()

2 changes: 1 addition & 1 deletion projects/rocthrust/cmake/Summary.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,5 @@ if(GIT_FOUND)
endif()
if(UNAME_EXECUTABLE)
message(STATUS " Unix name : ${LINUX_KERNEL_DETAILS}")
endif()
endif()
endfunction()
2 changes: 1 addition & 1 deletion projects/rocthrust/custom.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
booktitle=rocTHRUST API Guide
spreadsheet.xml=docs/classification-map.xml
document.locale=enus
document.locale=enus
1 change: 0 additions & 1 deletion projects/rocthrust/doc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2281,4 +2281,3 @@ First production release of Thrust.
crash.
- Komrade 7: Fix an issue where `const_iterator`s could not be passed to
`thrust::transform`.

4 changes: 2 additions & 2 deletions projects/rocthrust/docs/bitwise-repro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ An alternative version of the above operations that *is* bitwise reproducible wi
=====
Tests
=====
To run the bitwise reproduciblity tests, you'll need to build the reproducibility.hip target.
To run the bitwise reproduciblity tests, you'll need to build the reproducibility.hip target.
This target provides bitwise reproduciblity test coverage in two forms:

1. The first form runs tests by issuing multiple calls to the bitwise-reproducible versions of the algorithms mentioned in the section above using the deterministic parallel execution policy.
Expand Down Expand Up @@ -60,4 +60,4 @@ If one or more of the three factors changes - suppose we now want to run on gfx1

After that we can test in the same manner as before:

``ROCTHRUST_BWR_PATH=/path/to/repro.db reproducibility.hip``
``ROCTHRUST_BWR_PATH=/path/to/repro.db reproducibility.hip``
1 change: 0 additions & 1 deletion projects/rocthrust/docs/data-type-support.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ rocThrust and Thrust both support the following fundamental types:


Both rocThrust and Thrust also support ``half`` and ``bfloat16``. However, the host-side HIP implementations of these types are missing some functionality. Because of this, ``half`` and ``bfloat16`` should be used only as storage types to be passed between functions.

2 changes: 1 addition & 1 deletion projects/rocthrust/docs/hip-execution-policies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ The example below illustrates the behaviour of these two policies.
std::cout << "reduction: " << reduction2 << std::endl;

return 0;
}
}
2 changes: 1 addition & 1 deletion projects/rocthrust/docs/hipgraph-support.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ a given algorithm. This is because some Thrust functions require execution polic
arguments) rather than at runtime. Since streams must be created at runtime, there is no way to pass these functions a stream.
Adding a stream argument to such functions breaks compatibility with the Thrust API.

For these reasons, we recommend that you do not use hipGraphs together with rocThrust code.
For these reasons, we recommend that you do not use hipGraphs together with rocThrust code.
20 changes: 10 additions & 10 deletions projects/rocthrust/docs/how-to/rocThrust-build-backends.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@ rocThrust supports CPP, OpenMP, and TBB on HOST and device, and NVIDIA CUDA on d
The ``THRUST_HOST_SYSTEM``, ``_THRUST_HOST_SYSTEM_NAMESPACE``, ``THRUST_DEVICE_SYSTEM``, and ``_THRUST_DEVICE_SYSTEM_NAMESPACE`` build options specify the backend to use.


.. list-table::
.. list-table::
:header-rows: 1
:widths: 52 13 13 13 13

* -
* -
- CPP
- OpenMP
- TBB
- CUDA

* - **THRUST_HOST_SYSTEM**
* - **THRUST_HOST_SYSTEM**
- 1
- 2
- 3
- not supported

* - **_THRUST_HOST_SYSTEM_NAMESPACE**
- cpp
- omp
Expand All @@ -42,7 +42,7 @@ The ``THRUST_HOST_SYSTEM``, ``_THRUST_HOST_SYSTEM_NAMESPACE``, ``THRUST_DEVICE_S
- 2
- 3
- 1

* - **_THRUST_DEVICE_SYSTEM_NAMESPACE**
- cpp
- omp
Expand All @@ -64,10 +64,10 @@ To build the application, create the ``build`` directory under the same director
Run cmake with the appropriate build options for your backend:

.. code:: shell
CXX=hipcc [-DTHRUST_HOST_SYSTEM={1|2|3}
-D__THRUST_HOST_SYSTEM_NAMESPACE={cpp|omp|tbb}]
[-DTHRUST_HOST_SYSTEM={1|2|3|4}

CXX=hipcc [-DTHRUST_HOST_SYSTEM={1|2|3}
-D__THRUST_HOST_SYSTEM_NAMESPACE={cpp|omp|tbb}]
[-DTHRUST_HOST_SYSTEM={1|2|3|4}
-D__THRUST_HOST_SYSTEM_NAMESPACE={cuda|omp|tbb|cpp}]

Then run ``make`` to build.
Then run ``make`` to build.
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ How to run tests on multiple GPUs

To run tests on multiple GPUs, you can configure your tests using the ``AMDGPU_TEST_TARGETS`` option or you can use CTest resource allocation.

The ``AMDGPU_TEST_TARGETS`` CTest option lets you specify the families of GPUs on which you want to run your tests. For example, if you have two GPUs from the gfx900 family in your system, you can specify ``-DAMDGPU_TEST_TARGETS=gfx900`` when you configure your test to specify that you only want that family of GPUs to be tested. If you don't set ``AMDGPU_TEST_TARGETS``, the tests will be run on the default device in your system.
The ``AMDGPU_TEST_TARGETS`` CTest option lets you specify the families of GPUs on which you want to run your tests. For example, if you have two GPUs from the gfx900 family in your system, you can specify ``-DAMDGPU_TEST_TARGETS=gfx900`` when you configure your test to specify that you only want that family of GPUs to be tested. If you don't set ``AMDGPU_TEST_TARGETS``, the tests will be run on the default device in your system.

You can use CTest resource allocation to run tests in a distributed manner across multiple GPUs and test multiple product families from one invocation.
You can use CTest resource allocation to run tests in a distributed manner across multiple GPUs and test multiple product families from one invocation.

CTest resource allocation requires a resource specification file. You can generate a resource specification file using the ``GenerateResourceSpec.cmake`` utility script.
CTest resource allocation requires a resource specification file. You can generate a resource specification file using the ``GenerateResourceSpec.cmake`` utility script.

After you have cloned the ``rocThrust`` repository and built rocThrust with the ``-DBUILD_TESTS=ON`` option, change directory to the ``build`` directory and run:

.. code:: shell

../cmake/GenerateResourceSpec.cmake

This will generate a ``resources.json`` file in the ``build`` directory. Use the ``resources.json`` file in your call to ``ctest``.
This will generate a ``resources.json`` file in the ``build`` directory. Use the ``resources.json`` file in your call to ``ctest``.

For example, if you have two compatible GPUs in your system, run:

Expand All @@ -29,12 +29,6 @@ For example, if you have two compatible GPUs in your system, run:
ctest --resource-spec-file ./resources.json --parallel 2


.. note::
.. note::

CTest resource allocation requires CMake 3.16 or later.






Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ How to use rocThrust in a CMake project

To use rocThrust in your own project, add the following lines to your CMakeLists file:

.. code::
.. code::

# On ROCm rocThrust requires rocPRIM
find_package(rocprim REQUIRED CONFIG PATHS "/opt/rocm/rocprim")
Expand All @@ -20,4 +20,3 @@ To use rocThrust in your own project, add the following lines to your CMakeLists

# include rocThrust headers and roc::rocprim_hip target
target_link_libraries(<your_target> roc::rocthrust)

2 changes: 1 addition & 1 deletion projects/rocthrust/docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ rocThrust is a parallel algorithm library that has been ported to `HIP <https://
The rocThrust project is located in https://github.com/ROCm/rocm-libraries/tree/develop/projects/rocthrust.

.. grid:: 2
:gutter: 3
:gutter: 3

.. grid-item-card:: Installation

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.. meta::
:description: rocThrust installation overview
:description: rocThrust installation overview
:keywords: install, rocThrust, AMD, ROCm, installation, overview, general

*********************************
rocThrust installation overview
rocThrust installation overview
*********************************

The rocThrust source code is available from the `ROCm libraries GitHub Repository <https://github.com/ROCm/rocm-libraries/tree/develop/projects/rocthrust>`_. Use sparse checkout when cloning the rocThrust project:
Expand All @@ -26,7 +26,7 @@ rocThrust can be built and installed with |install|_ on Linux, |rmake|_ on Windo
.. |install| replace:: ``install``
.. _install: ./rocThrust-install-script.html

.. |rmake| replace:: ``rmake.py``
.. |rmake| replace:: ``rmake.py``
.. _rmake: ./rocThrust-rmake-install.html

CMake provides the most flexibility in building and installing rocThrust.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
Building and installing rocThrust on Linux with the install script
********************************************************************

You can use the ``install`` script to build and install rocThrust on Linux. You can also use `CMake <./rocThrust-install-with-cmake.html>`_ if you want more build and installation options.
You can use the ``install`` script to build and install rocThrust on Linux. You can also use `CMake <./rocThrust-install-with-cmake.html>`_ if you want more build and installation options.

:doc:`Clone the rocThrust project <./rocThrust-install-overview>`. The ``install`` script will be located in the ``rocthrust`` root directory.
:doc:`Clone the rocThrust project <./rocThrust-install-overview>`. The ``install`` script will be located in the ``rocthrust`` root directory.

To build and install rocThrust with the ``install`` script, run:

Expand All @@ -29,4 +29,3 @@ To see a complete list of options, run:
.. code-block:: shell

./install --help

Loading