Skip to content

Commit d62289a

Browse files
authored
Merge f76678b into sapling-pr-archive-ktf
2 parents 81124b4 + f76678b commit d62289a

File tree

9 files changed

+47
-111
lines changed

9 files changed

+47
-111
lines changed

Detectors/CTP/simulation/src/Digitizer.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ void Digitizer::calculateClassMask(const std::bitset<CTP_NINPUTS> ctpinpmask, st
170170
// }
171171
}
172172
} else {
173-
if ((ctpinpmask.to_ullong() & tcl.descriptor->getInputsMask()) == tcl.descriptor->getInputsMask()) {
173+
if (tcl.descriptor && ((ctpinpmask.to_ullong() & tcl.descriptor->getInputsMask()) == tcl.descriptor->getInputsMask())) {
174174
classmask |= tcl.classMask;
175175
}
176176
}

Detectors/TPC/calibration/SpacePoints/include/SpacePoints/SpacePointsCalibConfParam.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ struct SpacePointsCalibConfParam : public o2::conf::ConfigurableParamHelper<Spac
3737
int minTRDNTrklts = 3; ///< min number of TRD space points
3838
float maxITSChi2 = 20.f; ///< cut on ITS reduced chi2
3939
float maxTRDChi2 = 10.f; ///< cut on TRD reduced chi2
40-
float minPtNoOuterPoint = 0.8f; ///< minimum pt for ITS-TPC tracks to be considered for extrapolation
41-
int minTOFTRDPVContributors = 0; ///< min contributors from TRD or TOF (fast detectors) to consider tracks of this PV
40+
float minPtNoOuterPoint = 0.2f; ///< minimum pt for ITS-TPC tracks to be considered for extrapolation
41+
int minTOFTRDPVContributors = 2; ///< min contributors from TRD or TOF (fast detectors) to consider tracks of this PV
4242
bool ignoreNonPVContrib = true; ///< flag if tracks which did not contribute to the PV should be ignored or not
4343
bool enableTrackDownsampling = false; ///< flag if track sampling shall be enabled or not
4444
float tsalisThreshold = 1.f; ///< in case the sampling functions returns a value smaller than this the track is discarded (1. means no downsampling)
@@ -67,7 +67,7 @@ struct SpacePointsCalibConfParam : public o2::conf::ConfigurableParamHelper<Spac
6767
float maxRejFrac{.15f}; ///< if the fraction of rejected clusters of a track is higher, the full track is invalidated
6868
float maxRMSLong{.8f}; ///< maximum variance of the cluster residuals wrt moving avarage for a track to be considered
6969
int minNCl = 30; ///< min number of clusters in a track to be used for calibration
70-
float maxQ2Pt = 3.f; ///< max fitted q/pt for a track to be used for calibration
70+
float maxQ2Pt = 5.f; ///< max fitted q/pt for a track to be used for calibration
7171
float maxDevHelixY = .3f; ///< max deviation in Y for clusters wrt helix fit
7272
float maxDevHelixZ = .3f; ///< max deviation in Z for clusters wrt helix fit
7373
int minNumberOfAcceptedResiduals = 30; ///< min number of accepted residuals for

Framework/Core/src/DataSpecUtils.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "Headers/DataHeaderHelpers.h"
1717

1818
#include <fmt/format.h>
19+
#include <sstream>
1920
#include <cstring>
2021
#include <cinttypes>
2122
#include <regex>

GPU/GPUTracking/Base/cuda/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,20 @@ if(NOT ALIGPU_BUILD_TYPE STREQUAL "ALIROOT")
6969
add_custom_command(
7070
OUTPUT ${GPU_RTC_BIN}.src
7171
COMMAND cat ${GPUDIR}/Base/cuda/GPUReconstructionCUDAIncludes.h > ${GPU_RTC_BIN}.src
72-
COMMAND ${CMAKE_CXX_COMPILER} ${GPU_RTC_DEFINES} ${GPU_RTC_INCLUDES} -std=c++${CMAKE_CUDA_STANDARD} -D__CUDA_ARCH__=${RTC_CUDA_ARCH} -D__CUDACC__ -x c++ -E ${GPU_RTC_SRC} >> ${GPU_RTC_BIN}.src
72+
COMMAND ${CMAKE_CXX_COMPILER} ${GPU_RTC_DEFINES} ${GPU_RTC_INCLUDES} -std=c++${CMAKE_CUDA_STANDARD} -D__CUDA_ARCH__=${RTC_CUDA_ARCH} -D__CUDACC__ -x c++ -nostdinc -E ${GPU_RTC_SRC} >> ${GPU_RTC_BIN}.src
7373
MAIN_DEPENDENCY ${GPU_RTC_SRC}
7474
IMPLICIT_DEPENDS CXX ${GPU_RTC_SRC}
7575
COMMAND_EXPAND_LISTS
7676
COMMENT "Preparing CUDA RTC source file ${GPU_RTC_BIN}.src"
7777
)
7878
create_binary_resource(${GPU_RTC_BIN}.src ${GPU_RTC_BIN}.src.o)
7979

80+
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${MODULE}_CUDA_SRC_CHK.done
81+
COMMAND ! grep "# [0-9]* \"\\(/usr/\\|.*GCC-Toolchain\\)" ${GPU_RTC_BIN}.src > ${CMAKE_CURRENT_BINARY_DIR}/${MODULE}_CUDA_SRC_CHK.done || bash -c "echo ERROR: CUDA RTC sources contain standard headers 1>&2 && exit 1"
82+
COMMENT Checking CUDA RTC File ${GPU_RTC_BIN}.src
83+
DEPENDS ${GPU_RTC_BIN}.src VERBATIM)
84+
add_custom_target(${MODULE}_CUDA_SRC_CHK ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${MODULE}_CUDA_SRC_CHK.done)
85+
8086
add_custom_command(
8187
OUTPUT ${GPU_RTC_BIN}.command
8288
COMMAND echo -n "${CMAKE_CUDA_COMPILER} ${GPU_RTC_FLAGS_SEPARATED} ${GPU_RTC_DEFINES} -fatbin" > ${GPU_RTC_BIN}.command

GPU/GPUTracking/Base/hip/CMakeLists.txt

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,11 @@ if(NOT DEFINED GPUCA_HIP_HIPIFY_FROM_CUDA OR "${GPUCA_HIP_HIPIFY_FROM_CUDA}")
5252
list(APPEND HIP_SOURCES "${GPUCA_HIP_SOURCE_DIR}/${HIP_SOURCE}")
5353
endforeach()
5454

55-
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${MODULE}_HIPIFIED_CHK.done COMMAND diff -u ${GPUCA_HIP_SOURCE_DIR}/GPUReconstructionHIPkernel.template.hip ${CMAKE_CURRENT_SOURCE_DIR}/GPUReconstructionHIPkernel.template.hip && touch ${CMAKE_CURRENT_BINARY_DIR}/${MODULE}_HIPIFIED_CHK.done DEPENDS ${GPUCA_HIP_SOURCE_DIR}/GPUReconstructionHIPkernel.template.hip ${CMAKE_CURRENT_SOURCE_DIR}/GPUReconstructionHIPkernel.template.hip)
56-
add_custom_target(${MODULE}_HIPIFIED_CHK DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${MODULE}_HIPIFIED_CHK.done)
55+
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${MODULE}_HIPIFIED_CHK.done
56+
COMMAND diff -u ${GPUCA_HIP_SOURCE_DIR}/GPUReconstructionHIPkernel.template.hip ${CMAKE_CURRENT_SOURCE_DIR}/GPUReconstructionHIPkernel.template.hip > ${CMAKE_CURRENT_BINARY_DIR}/${MODULE}_HIPIFIED_CHK.done
57+
DEPENDS ${GPUCA_HIP_SOURCE_DIR}/GPUReconstructionHIPkernel.template.hip ${CMAKE_CURRENT_SOURCE_DIR}/GPUReconstructionHIPkernel.template.hip
58+
COMMENT Checking HIPified file ${CMAKE_CURRENT_SOURCE_DIR}/GPUReconstructionHIPkernel.template.hip)
59+
add_custom_target(${MODULE}_HIPIFIED_CHK ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${MODULE}_HIPIFIED_CHK.done)
5760
else()
5861
get_filename_component(GPUCA_HIP_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} ABSOLUTE)
5962
endif()
@@ -103,14 +106,21 @@ if(NOT ALIGPU_BUILD_TYPE STREQUAL "ALIROOT")
103106
add_custom_command(
104107
OUTPUT ${GPU_RTC_BIN}.src
105108
COMMAND cat ${GPUDIR}/Base/hip/GPUReconstructionHIPIncludes.h > ${GPU_RTC_BIN}.src
106-
COMMAND ${CMAKE_CXX_COMPILER} ${GPU_RTC_DEFINES} ${GPU_RTC_INCLUDES} -std=c++${CMAKE_HIP_STANDARD} -D__HIPCC__ -D__HIP_DEVICE_COMPILE__ -x c++ -E ${GPU_RTC_SRC} >> ${GPU_RTC_BIN}.src
109+
COMMAND ${CMAKE_CXX_COMPILER} ${GPU_RTC_DEFINES} ${GPU_RTC_INCLUDES} -std=c++${CMAKE_HIP_STANDARD} -D__HIPCC__ -D__HIP_DEVICE_COMPILE__ -x c++ -nostdinc -E ${GPU_RTC_SRC} >> ${GPU_RTC_BIN}.src
107110
MAIN_DEPENDENCY ${GPU_RTC_SRC}
108111
IMPLICIT_DEPENDS CXX ${GPU_RTC_SRC}
112+
DEPENDS ${MODULE}_HIPIFIED
109113
COMMAND_EXPAND_LISTS
110114
COMMENT "Preparing HIP RTC source file ${GPU_RTC_BIN}.src"
111115
)
112116
create_binary_resource(${GPU_RTC_BIN}.src ${GPU_RTC_BIN}.src.o)
113117

118+
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${MODULE}_HIP_SRC_CHK.done
119+
COMMAND ! grep "# [0-9]* \"\\(/usr/\\|.*GCC-Toolchain\\)" ${GPU_RTC_BIN}.src > ${CMAKE_CURRENT_BINARY_DIR}/${MODULE}_HIP_SRC_CHK.done || bash -c "echo ERROR: HIP RTC sources contain standard headers 1>&2 && exit 1"
120+
COMMENT Checking HIP RTC File ${GPU_RTC_BIN}.src
121+
DEPENDS ${GPU_RTC_BIN}.src VERBATIM)
122+
add_custom_target(${MODULE}_HIP_SRC_CHK ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${MODULE}_HIP_SRC_CHK.done)
123+
114124
add_custom_command(
115125
OUTPUT ${GPU_RTC_BIN}.command
116126
COMMAND echo -n "${hip_HIPCC_EXECUTABLE} ${GPU_RTC_FLAGS_SEPARATED} ${GPU_RTC_DEFINES} --genco" > ${GPU_RTC_BIN}.command
@@ -202,7 +212,7 @@ target_include_directories(${MODULE}_CXX PRIVATE $<TARGET_PROPERTY:${TMP_BASELIB
202212
target_link_libraries(${targetName} PRIVATE ${MODULE}_CXX)
203213

204214
if(NOT DEFINED GPUCA_HIP_HIPIFY_FROM_CUDA OR "${GPUCA_HIP_HIPIFY_FROM_CUDA}")
205-
add_custom_target(${MODULE}_HIPIFIED DEPENDS ${HIP_SOURCES} ${MODULE}_HIPIFIED_CHK)
215+
add_custom_target(${MODULE}_HIPIFIED DEPENDS ${HIP_SOURCES})
206216
add_dependencies(${targetName} ${MODULE}_HIPIFIED)
207217
add_dependencies(${MODULE}_CXX ${MODULE}_HIPIFIED)
208218
endif()

GPU/GPUTracking/Base/opencl-common/GPUReconstructionOCL.cxx

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,14 @@ int32_t GPUReconstructionOCL::InitDevice_Runtime()
108108
}
109109
mInternals->platform = mInternals->platforms[mProcessingSettings.platformNum];
110110
found = true;
111+
if (mProcessingSettings.debugLevel >= 2) {
112+
char platform_profile[256] = {}, platform_version[256] = {}, platform_name[256] = {}, platform_vendor[256] = {};
113+
clGetPlatformInfo(mInternals->platform, CL_PLATFORM_PROFILE, sizeof(platform_profile), platform_profile, nullptr);
114+
clGetPlatformInfo(mInternals->platform, CL_PLATFORM_VERSION, sizeof(platform_version), platform_version, nullptr);
115+
clGetPlatformInfo(mInternals->platform, CL_PLATFORM_NAME, sizeof(platform_name), platform_name, nullptr);
116+
clGetPlatformInfo(mInternals->platform, CL_PLATFORM_VENDOR, sizeof(platform_vendor), platform_vendor, nullptr);
117+
GPUInfo("Selected Platform %d: (%s %s) %s %s", mProcessingSettings.platformNum, platform_profile, platform_version, platform_vendor, platform_name);
118+
}
111119
} else {
112120
for (uint32_t i_platform = 0; i_platform < num_platforms; i_platform++) {
113121
char platform_profile[256] = {}, platform_version[256] = {}, platform_name[256] = {}, platform_vendor[256] = {};
@@ -227,6 +235,8 @@ int32_t GPUReconstructionOCL::InitDevice_Runtime()
227235
clGetDeviceInfo(mInternals->device, CL_DEVICE_VERSION, sizeof(deviceVersion) - 1, deviceVersion, nullptr);
228236
clGetDeviceInfo(mInternals->device, CL_DEVICE_MAX_WORK_GROUP_SIZE, sizeof(maxWorkGroup), &maxWorkGroup, nullptr);
229237
clGetDeviceInfo(mInternals->device, CL_DEVICE_MAX_WORK_ITEM_SIZES, sizeof(maxWorkItems), maxWorkItems, nullptr);
238+
int versionMajor, versionMinor;
239+
sscanf(deviceVersion, "OpenCL %d.%d", &versionMajor, &versionMinor);
230240
if (mProcessingSettings.debugLevel >= 2) {
231241
GPUInfo("Using OpenCL device %d: %s %s with properties:", bestDevice, device_vendor, device_name);
232242
GPUInfo("\tVersion = %s", deviceVersion);
@@ -277,9 +287,18 @@ int32_t GPUReconstructionOCL::InitDevice_Runtime()
277287
quit("OPENCL Constant Memory Allocation Error");
278288
}
279289

290+
if (device_type & CL_DEVICE_TYPE_CPU) {
291+
if (mProcessingSettings.deviceTimers && mProcessingSettings.debugLevel >= 2) {
292+
GPUInfo("Disabling device timers for CPU device");
293+
}
294+
mProcessingSettings.deviceTimers = 0;
295+
}
280296
for (int32_t i = 0; i < mNStreams; i++) {
281297
#ifdef CL_VERSION_2_0
282-
cl_queue_properties prop = mProcessingSettings.deviceTimers ? CL_QUEUE_PROFILING_ENABLE : 0;
298+
cl_queue_properties prop = 0;
299+
if (versionMajor >= 2 && IsGPU() && mProcessingSettings.deviceTimers) {
300+
prop |= CL_QUEUE_PROFILING_ENABLE;
301+
}
283302
mInternals->command_queue[i] = clCreateCommandQueueWithProperties(mInternals->context, mInternals->device, &prop, &ocl_error);
284303
if (mProcessingSettings.deviceTimers && ocl_error == CL_INVALID_QUEUE_PROPERTIES) {
285304
GPUError("GPU device timers not supported by OpenCL platform, disabling");

GPU/GPUTracking/Base/opencl2/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ if(OPENCL2_ENABLED) # BUILD OpenCL2 source code for runtime compilation target
7171
${OCL_FLAGS}
7272
${OCL_DEFINECL}
7373
-cl-no-stdinc
74+
-nostdinc
7475
-E ${CL_SRC} > ${CL_BIN}.src
7576
MAIN_DEPENDENCY ${CL_SRC}
7677
IMPLICIT_DEPENDS CXX ${CL_SRC}

GPU/GPUTracking/Standalone/tools/rtc/rtcsource.sh

Lines changed: 0 additions & 15 deletions
This file was deleted.

GPU/GPUTracking/Standalone/tools/rtc/test.cu

Lines changed: 0 additions & 86 deletions
This file was deleted.

0 commit comments

Comments
 (0)