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
1 change: 1 addition & 0 deletions .github/workflows/standalone-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
curl -v -o ${STANDALONE_DIR}/events/o2-simple.tar.xz https://cernbox.cern.ch/remote.php/dav/public-files/SfYXgQOHFga2w75/events/o2-simple.tar.xz
tar -xf ${STANDALONE_DIR}/events/o2-simple.tar.xz -C ${STANDALONE_DIR}/events
${STANDALONE_DIR}/ca -e o2-simple -g --seed 0 --memSize 20000000000 --sync --runs 1 --RTCenable --PROCdeterministicGPUReconstruction 1 --RTCoptSpecialCode 1 --debug 6 ${{ matrix.ca_args }}

Check failure on line 63 in .github/workflows/standalone-benchmark.yml

View workflow job for this annotation

GitHub Actions / PR formatting / whitespace

Trailing spaces

Remove the trailing spaces at the end of the line.
curl -v -o ${STANDALONE_DIR}/o2-simple-GPU.out https://cernbox.cern.ch/remote.php/dav/public-files/SfYXgQOHFga2w75/o2-simple-GPU.out
cmp ${STANDALONE_DIR}/GPU.out ${STANDALONE_DIR}/o2-simple-GPU.out
rm -rf ${STANDALONE_DIR}/GPU.out ${STANDALONE_DIR}/o2-simple-GPU.out
Expand All @@ -73,6 +73,7 @@
STANDALONE_DIR: /root/standalone
BUILD_DIR: /root/standalone/build
ARTIFACT_FILE: /root/artifact.txt
ALIBUILD_O2_FORCE_GPU: 1

- name: Upload Artifact
uses: actions/upload-artifact@v4
Expand Down
17 changes: 9 additions & 8 deletions GPU/Common/GPUCommonAlgorithm.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,20 @@ namespace o2::gpu
{
class GPUCommonAlgorithm
{

public:
template <class T>
GPUd() static void sort(T* begin, T* end);
GPUd() static void sort(T begin, T end);
template <class T>
GPUd() static void sortInBlock(T* begin, T* end);
template <class T>
GPUd() static void sortDeviceDynamic(T* begin, T* end);
GPUd() static void sortDeviceDynamic(T begin, T end);
template <class T, class S>
GPUd() static void sort(T* begin, T* end, const S& comp);
GPUd() static void sort(T begin, T end, const S& comp);
template <class T, class S>
GPUd() static void sortInBlock(T* begin, T* end, const S& comp);
template <class T, class S>
GPUd() static void sortDeviceDynamic(T* begin, T* end, const S& comp);
GPUd() static void sortDeviceDynamic(T begin, T end, const S& comp);
#ifndef __OPENCL__
template <class T, class S>
GPUh() static void sortOnDevice(auto* rec, int32_t stream, T* begin, size_t N, const S& comp);
Expand Down Expand Up @@ -224,7 +225,7 @@ namespace o2::gpu
{

template <class T>
GPUdi() void GPUCommonAlgorithm::sortDeviceDynamic(T* begin, T* end)
GPUdi() void GPUCommonAlgorithm::sortDeviceDynamic(T begin, T end)
{
#ifndef GPUCA_GPUCODE
GPUCommonAlgorithm::sort(begin, end);
Expand All @@ -234,7 +235,7 @@ GPUdi() void GPUCommonAlgorithm::sortDeviceDynamic(T* begin, T* end)
}

template <class T, class S>
GPUdi() void GPUCommonAlgorithm::sortDeviceDynamic(T* begin, T* end, const S& comp)
GPUdi() void GPUCommonAlgorithm::sortDeviceDynamic(T begin, T end, const S& comp)
{
GPUCommonAlgorithm::sort(begin, end, comp);
}
Expand All @@ -248,7 +249,7 @@ namespace o2::gpu
{

template <class T>
GPUdi() void GPUCommonAlgorithm::sort(T* begin, T* end)
GPUdi() void GPUCommonAlgorithm::sort(T begin, T end)
{
#ifdef GPUCA_ALGORITHM_STD
std::sort(begin, end);
Expand All @@ -258,7 +259,7 @@ GPUdi() void GPUCommonAlgorithm::sort(T* begin, T* end)
}

template <class T, class S>
GPUdi() void GPUCommonAlgorithm::sort(T* begin, T* end, const S& comp)
GPUdi() void GPUCommonAlgorithm::sort(T begin, T end, const S& comp)
{
#ifdef GPUCA_ALGORITHM_STD
std::sort(begin, end, comp);
Expand Down
13 changes: 5 additions & 8 deletions GPU/Common/GPUCommonAlgorithmThrust.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

#include "GPUCommonDef.h"
#include "GPUCommonHelpers.h"
#include "GPUTPCTrack.h"

#ifndef __HIPCC__ // CUDA
#include <cub/cub.cuh>
Expand Down Expand Up @@ -81,19 +82,15 @@ GPUdi() void GPUCommonAlgorithm::sortInBlock(T* begin, T* end, const S& comp)
*/

template <class T>
GPUdi() void GPUCommonAlgorithm::sortDeviceDynamic(T* begin, T* end)
GPUdi() void GPUCommonAlgorithm::sortDeviceDynamic(T begin, T end)
{
thrust::device_ptr<T> thrustBegin(begin);
thrust::device_ptr<T> thrustEnd(end);
thrust::sort(GPUCA_THRUST_NAMESPACE::par, thrustBegin, thrustEnd);
thrust::sort(GPUCA_THRUST_NAMESPACE::par, begin, end);
}

template <class T, class S>
GPUdi() void GPUCommonAlgorithm::sortDeviceDynamic(T* begin, T* end, const S& comp)
GPUdi() void GPUCommonAlgorithm::sortDeviceDynamic(T begin, T end, const S& comp)
{
thrust::device_ptr<T> thrustBegin(begin);
thrust::device_ptr<T> thrustEnd(end);
thrust::sort(GPUCA_THRUST_NAMESPACE::par, thrustBegin, thrustEnd, comp);
thrust::sort(GPUCA_THRUST_NAMESPACE::par, begin, end, comp);
}

#ifndef GPUCA_GPUCODE_COMPILEKERNELS
Expand Down
Loading
Loading