16#include "GPUDefParametersLoad.inc"
21static_assert(std::is_convertible_v<cl_event, void*>,
"OpenCL event type incompatible to deviceEvent");
23#define GPUErrorReturn(...) \
25 GPUError(__VA_ARGS__); \
31#ifdef OPENCL_ENABLED_SPIRV
41 *
mParDevice = o2::gpu::internal::GPUDefParametersLoad();
54static_assert(
sizeof(cl_int) <=
sizeof(int64_t) && CL_SUCCESS == 0);
58 if (retval != CL_SUCCESS) {
59 GPUError(
"OpenCL Error: %ld / %s (%s:%d)", retval, convertErrorToString(retval),
file, line);
61 return retval != CL_SUCCESS;
70 setenv(
"POCL_CPU_MAX_CU_COUNT", nThreadsStr.c_str(), 1);
75 cl_uint num_platforms;
76 if (
GPUChkErrI(clGetPlatformIDs(0,
nullptr, &num_platforms))) {
79 if (num_platforms == 0) {
83 GPUInfo(
"%d OpenCL Platforms found", num_platforms);
87 std::unique_ptr<cl_platform_id[]> platforms;
88 platforms.reset(
new cl_platform_id[num_platforms]);
89 if (
GPUChkErrI(clGetPlatformIDs(num_platforms, platforms.get(),
nullptr))) {
93 auto query = [&](
auto func,
auto obj,
auto var) {
101 std::string platform_profile, platform_version, platform_name, platform_vendor;
102 float platform_version_f;
103 auto queryPlatform = [&](
auto platform) {
104 platform_profile = query(clGetPlatformInfo, platform, CL_PLATFORM_PROFILE);
105 platform_version = query(clGetPlatformInfo, platform, CL_PLATFORM_VERSION);
106 platform_name = query(clGetPlatformInfo, platform, CL_PLATFORM_NAME);
107 platform_vendor = query(clGetPlatformInfo, platform, CL_PLATFORM_VENDOR);
108 sscanf(platform_version.c_str(),
"OpenCL %f", &platform_version_f);
111 std::vector<cl_device_id> devices;
112 std::string device_vendor, device_name, device_il_version;
113 cl_device_type device_type;
114 cl_uint device_freq, device_shaders, device_nbits;
115 cl_bool device_endian;
116 auto queryDevice = [&](
auto device) {
117 platform_name = query(clGetDeviceInfo,
device, CL_DEVICE_NAME);
118 device_vendor = query(clGetDeviceInfo,
device, CL_DEVICE_VENDOR);
119 device_il_version = query(clGetDeviceInfo,
device, CL_DEVICE_IL_VERSION);
120 clGetDeviceInfo(
device, CL_DEVICE_TYPE,
sizeof(device_type), &device_type,
nullptr);
121 clGetDeviceInfo(
device, CL_DEVICE_MAX_CLOCK_FREQUENCY,
sizeof(device_freq), &device_freq,
nullptr);
122 clGetDeviceInfo(
device, CL_DEVICE_MAX_COMPUTE_UNITS,
sizeof(device_shaders), &device_shaders,
nullptr);
123 clGetDeviceInfo(
device, CL_DEVICE_ADDRESS_BITS,
sizeof(device_nbits), &device_nbits,
nullptr);
124 clGetDeviceInfo(
device, CL_DEVICE_ENDIAN_LITTLE,
sizeof(device_endian), &device_endian,
nullptr);
127 cl_uint deviceCount, bestDevice = (cl_uint)-1, bestPlatform = (cl_uint)-1;
128 for (
uint32_t iPlatform = 0; iPlatform < num_platforms; iPlatform++) {
135 std::string platformUsageInfo;
136 bool platformCompatible =
false;
137 queryPlatform(platforms[iPlatform]);
138 if (clGetDeviceIDs(platforms[iPlatform], CL_DEVICE_TYPE_ALL, 0,
nullptr, &deviceCount) != CL_SUCCESS) {
140 GPUErrorReturn(
"No device in requested platform or error obtaining device count");
142 platformUsageInfo +=
" - no devices";
144 if (platform_version_f >= 2.1f) {
145 platformUsageInfo +=
" - OpenCL 2.2 capable";
146 platformCompatible =
true;
151 GPUInfo(
"%s Platform %d: (%s %s) %s %s (Compatible: %s)%s",
GetProcessingSettings().oclPlatformNum >= 0 ?
"Enforced" :
"Available", iPlatform, platform_profile.c_str(), platform_version.c_str(), platform_vendor.c_str(), platform_name.c_str(), platformCompatible ?
"yes" :
"no",
GetProcessingSettings().debugLevel >= 2 ? platformUsageInfo.c_str() :
"");
155 if (deviceCount > devices.size()) {
156 devices.resize(deviceCount);
158 if (clGetDeviceIDs(platforms[iPlatform], CL_DEVICE_TYPE_ALL, deviceCount, devices.data(),
nullptr) != CL_SUCCESS) {
172 bool deviceOK =
true;
173 queryDevice(devices[
i]);
174 std::string deviceFailure;
175 if (
GetProcessingSettings().gpuDeviceOnly && ((device_type & CL_DEVICE_TYPE_CPU) || !(device_type & CL_DEVICE_TYPE_GPU))) {
177 deviceFailure +=
" - No GPU device";
179 if (device_nbits / 8 !=
sizeof(
void*)) {
181 deviceFailure +=
" - No 64 bit device";
183 if (!device_endian) {
185 deviceFailure +=
" - No Little Endian Mode";
189 while ((
pos = device_il_version.find(
"SPIR-V",
pos)) != std::string::npos) {
191 sscanf(device_il_version.c_str() +
pos,
"SPIR-V_%f", &spirvVersion);
192 if (spirvVersion >= GPUCA_OCL_SPIRV_VERSION) {
195 pos += strlen(
"SPIR-V_0.0");
197 if (
pos == std::string::npos) {
199 deviceFailure +=
" - No SPIR-V " +
std::to_string(GPUCA_OCL_SPIRV_VERSION) +
" (" + device_il_version +
")";
203 double bestDeviceSpeed = -1, deviceSpeed = (double)device_freq * (
double)device_shaders;
205 GPUInfo(
" Device %s%2d: %s %s (Frequency %d, Shaders %d, %d bit) (Speed Value: %ld)%s %s", deviceOK ?
" " :
"[",
i, device_vendor.c_str(), device_name.c_str(), (
int32_t)device_freq, (
int32_t)device_shaders, (
int32_t)device_nbits, (int64_t)deviceSpeed, deviceOK ?
" " :
" ]", deviceOK ?
"" : deviceFailure.c_str());
209 GPUInfo(
"Unsupported device requested on platform %d: (%d)", iPlatform,
GetProcessingSettings().deviceNum);
214 if (deviceSpeed > bestDeviceSpeed) {
216 bestPlatform = iPlatform;
217 bestDeviceSpeed = deviceSpeed;
230 if (bestDevice == (cl_uint)-1) {
231 GPUErrorReturn(
"Did not find compatible OpenCL Platform / Device, aborting OPENCL Initialisation");
238 cl_ulong deviceConstantBuffer, deviceGlobalMem, deviceLocalMem;
239 std::string deviceVersion;
240 size_t deviceMaxWorkGroup, deviceMaxWorkItems[3];
241 clGetDeviceInfo(
mInternals->
device, CL_DEVICE_GLOBAL_MEM_SIZE,
sizeof(deviceGlobalMem), &deviceGlobalMem,
nullptr);
242 clGetDeviceInfo(
mInternals->
device, CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE,
sizeof(deviceConstantBuffer), &deviceConstantBuffer,
nullptr);
243 clGetDeviceInfo(
mInternals->
device, CL_DEVICE_LOCAL_MEM_SIZE,
sizeof(deviceLocalMem), &deviceLocalMem,
nullptr);
244 clGetDeviceInfo(
mInternals->
device, CL_DEVICE_MAX_WORK_GROUP_SIZE,
sizeof(deviceMaxWorkGroup), &deviceMaxWorkGroup,
nullptr);
245 clGetDeviceInfo(
mInternals->
device, CL_DEVICE_MAX_WORK_ITEM_SIZES,
sizeof(deviceMaxWorkItems), deviceMaxWorkItems,
nullptr);
246 deviceVersion = query(clGetDeviceInfo,
mInternals->
device, CL_DEVICE_VERSION);
247 int versionMajor, versionMinor;
248 sscanf(deviceVersion.c_str(),
"OpenCL %d.%d", &versionMajor, &versionMinor);
250 GPUInfo(
"Using OpenCL platform %d / device %d: %s %s with properties:", bestPlatform, bestDevice, device_vendor.c_str(), device_name.c_str());
251 GPUInfo(
"\tVersion = %s", deviceVersion);
252 GPUInfo(
"\tFrequency = %d", (
int32_t)device_freq);
253 GPUInfo(
"\tShaders = %d", (
int32_t)device_shaders);
254 GPUInfo(
"\tGLobalMemory = %ld", (int64_t)deviceGlobalMem);
255 GPUInfo(
"\tContantMemoryBuffer = %ld", (int64_t)deviceConstantBuffer);
256 GPUInfo(
"\tLocalMemory = %ld", (int64_t)deviceLocalMem);
257 GPUInfo(
"\tmaxThreadsPerBlock = %ld", (int64_t)deviceMaxWorkGroup);
258 GPUInfo(
"\tmaxThreadsDim = %ld %ld %ld", (int64_t)deviceMaxWorkItems[0], (int64_t)deviceMaxWorkItems[1], (int64_t)deviceMaxWorkItems[2]);
261#ifndef GPUCA_NO_CONSTANT_MEMORY
262 if (gGPUConstantMemBufferSize > deviceConstantBuffer) {
263 GPUErrorReturn(
"Insufficient constant memory available on GPU %d < %d!", (
int32_t)deviceConstantBuffer, (
int32_t)gGPUConstantMemBufferSize);
283 GPUInfo(
"OpenCL program and kernels loaded successfully");
299 if (device_type & CL_DEVICE_TYPE_CPU) {
301 GPUInfo(
"Disabling device timers for CPU device");
307 cl_queue_properties prop = 0;
309 prop |= CL_QUEUE_PROFILING_ENABLE;
313 GPUError(
"GPU device timers not supported by OpenCL platform, disabling");
337 const char* krnlGetPtr =
"__kernel void krnlGetPtr(__global char* gpu_mem, __global char* constant_mem, __global size_t* host_mem) {if (get_global_id(0) == 0) {host_mem[0] = (size_t) gpu_mem; host_mem[1] = (size_t) constant_mem;}}";
338 cl_program
program = clCreateProgramWithSource(
mInternals->
context, 1, (
const char**)&krnlGetPtr,
nullptr, &ocl_error);
344 char build_log[16384];
346 GPUImportant(
"Build Log:\n\n%s\n\n", build_log);
349 cl_kernel kernel = clCreateKernel(
program,
"krnlGetPtr", &ocl_error);
363 GPUInfo(
"Mapping hostmemory");
378 GPUInfo(
"OPENCL Initialisation successfull (%d: %s %s (Frequency %d, Shaders %d), %ld / %ld bytes host / global memory, Stack frame %d, Constant memory %ld)", bestDevice, device_vendor, device_name, (
int32_t)device_freq, (
int32_t)device_shaders, (int64_t)
mDeviceMemorySize, (int64_t)
mHostMemorySize, -1, (int64_t)gGPUConstantMemBufferSize);
421 GPUInfo(
"OPENCL Uninitialized");
431 if (evList ==
nullptr) {
444 }
else if (toGPU == -2) {
495 GPUChkErr(clGetEventInfo(evList[
i].get<cl_event>(), CL_EVENT_COMMAND_EXECUTION_STATUS,
sizeof(eventdone), &eventdone,
nullptr));
496 if (eventdone != CL_COMPLETE) {
511 GPUError(
"OpenCL Error while synchronizing (%s) (Stream %d/%d)",
state,
stream,
i);
515 GPUInfo(
"GPU Sync Done");
526#ifdef OPENCL_ENABLED_SPIRV
528 GPUInfo(
"Reading OpenCL program from SPIR-V IL (Platform version %4.2f)",
mOclVersion);
529 mInternals->
program = clCreateProgramWithIL(
mInternals->
context, _binary_GPUReconstructionOCLCode_spirv_start, _binary_GPUReconstructionOCLCode_spirv_len, &ocl_error);
534 GPUInfo(
"Compiling OpenCL program from sources (Platform version %4.2f)",
mOclVersion);
535 size_t program_sizes[1] = {_binary_GPUReconstructionOCLCode_src_len};
536 char* programs_sources[1] = {_binary_GPUReconstructionOCLCode_src_start};
541 GPUError(
"Error creating OpenCL program from binary");
546 cl_build_status status;
550 std::unique_ptr<char[]> build_log(
new char[log_size + 1]);
552 build_log[log_size] = 0;
553 GPUError(
"Build Log:\n\n%s\n", build_log.get());
561const char* GPUReconstructionOCL::convertErrorToString(int32_t errorcode)
563 static const std::map<cl_int, const char*> error_map = {
564 {CL_SUCCESS,
"CL_SUCCESS"},
565 {CL_DEVICE_NOT_FOUND,
"CL_DEVICE_NOT_FOUND"},
566 {CL_DEVICE_NOT_AVAILABLE,
"CL_DEVICE_NOT_AVAILABLE"},
567 {CL_COMPILER_NOT_AVAILABLE,
"CL_COMPILER_NOT_AVAILABLE"},
568 {CL_MEM_OBJECT_ALLOCATION_FAILURE,
"CL_MEM_OBJECT_ALLOCATION_FAILURE"},
569 {CL_OUT_OF_RESOURCES,
"CL_OUT_OF_RESOURCES"},
570 {CL_OUT_OF_HOST_MEMORY,
"CL_OUT_OF_HOST_MEMORY"},
571 {CL_PROFILING_INFO_NOT_AVAILABLE,
"CL_PROFILING_INFO_NOT_AVAILABLE"},
572 {CL_MEM_COPY_OVERLAP,
"CL_MEM_COPY_OVERLAP"},
573 {CL_IMAGE_FORMAT_MISMATCH,
"CL_IMAGE_FORMAT_MISMATCH"},
574 {CL_IMAGE_FORMAT_NOT_SUPPORTED,
"CL_IMAGE_FORMAT_NOT_SUPPORTED"},
575 {CL_BUILD_PROGRAM_FAILURE,
"CL_BUILD_PROGRAM_FAILURE"},
576 {CL_MAP_FAILURE,
"CL_MAP_FAILURE"},
577 {CL_MISALIGNED_SUB_BUFFER_OFFSET,
"CL_MISALIGNED_SUB_BUFFER_OFFSET"},
578 {CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST,
"CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST"},
579 {CL_COMPILE_PROGRAM_FAILURE,
"CL_COMPILE_PROGRAM_FAILURE"},
580 {CL_LINKER_NOT_AVAILABLE,
"CL_LINKER_NOT_AVAILABLE"},
581 {CL_LINK_PROGRAM_FAILURE,
"CL_LINK_PROGRAM_FAILURE"},
582 {CL_DEVICE_PARTITION_FAILED,
"CL_DEVICE_PARTITION_FAILED"},
583 {CL_KERNEL_ARG_INFO_NOT_AVAILABLE,
"CL_KERNEL_ARG_INFO_NOT_AVAILABLE"},
584 {CL_INVALID_VALUE,
"CL_INVALID_VALUE"},
585 {CL_INVALID_DEVICE_TYPE,
"CL_INVALID_DEVICE_TYPE"},
586 {CL_INVALID_PLATFORM,
"CL_INVALID_PLATFORM"},
587 {CL_INVALID_DEVICE,
"CL_INVALID_DEVICE"},
588 {CL_INVALID_CONTEXT,
"CL_INVALID_CONTEXT"},
589 {CL_INVALID_QUEUE_PROPERTIES,
"CL_INVALID_QUEUE_PROPERTIES"},
590 {CL_INVALID_COMMAND_QUEUE,
"CL_INVALID_COMMAND_QUEUE"},
591 {CL_INVALID_HOST_PTR,
"CL_INVALID_HOST_PTR"},
592 {CL_INVALID_MEM_OBJECT,
"CL_INVALID_MEM_OBJECT"},
593 {CL_INVALID_IMAGE_FORMAT_DESCRIPTOR,
"CL_INVALID_IMAGE_FORMAT_DESCRIPTOR"},
594 {CL_INVALID_IMAGE_SIZE,
"CL_INVALID_IMAGE_SIZE"},
595 {CL_INVALID_SAMPLER,
"CL_INVALID_SAMPLER"},
596 {CL_INVALID_BINARY,
"CL_INVALID_BINARY"},
597 {CL_INVALID_BUILD_OPTIONS,
"CL_INVALID_BUILD_OPTIONS"},
598 {CL_INVALID_PROGRAM,
"CL_INVALID_PROGRAM"},
599 {CL_INVALID_PROGRAM_EXECUTABLE,
"CL_INVALID_PROGRAM_EXECUTABLE"},
600 {CL_INVALID_KERNEL_NAME,
"CL_INVALID_KERNEL_NAME"},
601 {CL_INVALID_KERNEL_DEFINITION,
"CL_INVALID_KERNEL_DEFINITION"},
602 {CL_INVALID_KERNEL,
"CL_INVALID_KERNEL"},
603 {CL_INVALID_ARG_INDEX,
"CL_INVALID_ARG_INDEX"},
604 {CL_INVALID_ARG_VALUE,
"CL_INVALID_ARG_VALUE"},
605 {CL_INVALID_ARG_SIZE,
"CL_INVALID_ARG_SIZE"},
606 {CL_INVALID_KERNEL_ARGS,
"CL_INVALID_KERNEL_ARGS"},
607 {CL_INVALID_WORK_DIMENSION,
"CL_INVALID_WORK_DIMENSION"},
608 {CL_INVALID_WORK_GROUP_SIZE,
"CL_INVALID_WORK_GROUP_SIZE"},
609 {CL_INVALID_WORK_ITEM_SIZE,
"CL_INVALID_WORK_ITEM_SIZE"},
610 {CL_INVALID_GLOBAL_OFFSET,
"CL_INVALID_GLOBAL_OFFSET"},
611 {CL_INVALID_EVENT_WAIT_LIST,
"CL_INVALID_EVENT_WAIT_LIST"},
612 {CL_INVALID_EVENT,
"CL_INVALID_EVENT"},
613 {CL_INVALID_OPERATION,
"CL_INVALID_OPERATION"},
614 {CL_INVALID_GL_OBJECT,
"CL_INVALID_GL_OBJECT"},
615 {CL_INVALID_BUFFER_SIZE,
"CL_INVALID_BUFFER_SIZE"},
616 {CL_INVALID_MIP_LEVEL,
"CL_INVALID_MIP_LEVEL"},
617 {CL_INVALID_GLOBAL_WORK_SIZE,
"CL_INVALID_GLOBAL_WORK_SIZE"},
618 {CL_INVALID_PROPERTY,
"CL_INVALID_PROPERTY"},
619 {CL_INVALID_IMAGE_DESCRIPTOR,
"CL_INVALID_IMAGE_DESCRIPTOR"},
620 {CL_INVALID_COMPILER_OPTIONS,
"CL_INVALID_COMPILER_OPTIONS"},
621 {CL_INVALID_LINKER_OPTIONS,
"CL_INVALID_LINKER_OPTIONS"},
622 {CL_INVALID_DEVICE_PARTITION_COUNT,
"CL_INVALID_DEVICE_PARTITION_COUNT"},
623 {CL_INVALID_PIPE_SIZE,
"CL_INVALID_PIPE_SIZE"},
624 {CL_INVALID_DEVICE_QUEUE,
"CL_INVALID_DEVICE_QUEUE"},
625 {CL_INVALID_SPEC_ID,
"CL_INVALID_SPEC_ID"},
626 {CL_MAX_SIZE_RESTRICTION_EXCEEDED,
"CL_MAX_SIZE_RESTRICTION_EXCEEDED"}};
627 auto entry = error_map.find(errorcode);
628 return (
entry != error_map.end()) ?
entry->second :
"Unknown Errorcode";
#define GPUErrorReturn(...)
GPUReconstruction * GPUReconstruction_Create_OCL(const GPUSettingsDeviceBackend &cfg)
configStandalone Light OpenGL display display_light Apply smoothing to points Enable Z buffer Highlight links Highlight seeds Highlight sector tracks Highlight final tracks Show individual Show related Highlight grid Show only individual collision Color clusters belonging to track objects Set line Enable drawing TPC data Enable drawing TOF data Enable drawing magnetic field Set field line step count Invert colors configStandalone Heavy OpenGL display display_heavy Show tracks with ITS contribution Show tracks with TOF contribution Enable propagation of loopers Show clusters at nominal x of pad row for early transformed data Split CE tracks when they cross the central Mark clusters Mark adjacent clusters Hide rejected tracks Apply filter on tracks to be displayed Separate increase X h configStandalone Camera window renderer OpenGL display display_camera Orient the camera such that the y axis is always upwards Full Screen MultiSample Anti Downsampling Anti Enable Vertical Sync Target frame or if the backend cannot limit to the refresh Use OpenGL indirect draws to reduce number of draw calls Display h configStandalone Vulkan display display_vulkan Have uniform buffers in host accessible device memory h configStandalone Internal display display_internal Number of updates the Qt GUI may send ahead of the last one the display has before it waits for the display Opacity of the console background Number of console lines the history is shortened to this when it reaches twice the size Time in seconds an info message fades out after setInfoTime h OpenGL display display Font size Do not use Freetype for font Renderer for event Frontend to use for event ROOT macros used as track filter Console script file
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char events
configStandalone Reconstruction rec_tpc multiplier for the combined cluster track error during track following area in cm for the search of for z only used if decrease removal by when above this local occupancy rowx Shift of TPC revert cluster flag edge bit distance to edge exceeds this ZOffset for secondary multiple of radius max P of electron K BB bands crossing max P of electron p BB bands crossing max P of electron d BB bands crossing max P of electron t BB bands crossing min accepted dEdxMaxTPC of the track Additive extra cluster error for Y2 if edge flag set Additive extra cluster error for Y2 if single set Additive extra cluster error for Y2 if or single set Additive extra cluster error for Z2 if or single set Extra errors to add to track when crossing depending on addErrorsCECrossing Inner portion of y range in sector that is not used in searching for extrapolated track candidates factor2YS for track merging factor2K for track merging Margin in cm of Y position when rejecting edge clusters based on uncorrected track Y Max fraction of shared clusters for tracklet Except pad from cluster finding if total number of charges in a fragment is above this Except pad from cluster finding if number of consecutive charges in a fragment is above this Threshold where a timebin is considered disabling the noisy pad check for that pad Treat signal above this minimum as saturated Smoothing factor for the exponential Highly Ionising Particle tail filter Number of timebins to use for the averaging Add additional custom track errors when crossing relative as fraction of Do N fit passes in final fit of< 0:reject at max -n hits") AddOptionRTC(rejectIFCLowRadiusCluster, uint8_t, 1, "", 0, "Reject clusters that get the IFC mask error during refit") AddOptionRTC(dEdxTruncLow, uint8_t, 2, "", 0, "Low truncation threshold, fraction of 128") AddOptionRTC(dEdxTruncHigh, uint8_t, 77, "", 0, "High truncation threshold, fraction of 128") AddOptionRTC(extrapolationTracking, int8_t, 1, "", 0, "Enable Extrapolation Tracking(prolong tracks to adjacent sectors to find short segments)") AddOptionRTC(disableRefitAttachment, uint8_t, 0, "", 0, "Bitmask to disable certain attachment steps during refit(1:attachment, 2:propagation, 4:loop following, 8:mirroring)") AddOptionRTC(rejectionStrategy, uint8_t, o2::gpu::GPUSettings::RejectionStrategyA, "", 0, "Enable rejection of TPC clusters for compression(0=no, 1=strategy A, 2=strategy B)") AddOptionRTC(mergeLoopersAfterburner, uint8_t, 1, "", 0, "Run afterburner for additional looper merging") AddOptionRTC(compressionTypeMask, uint8_t, o2::gpu::GPUSettings::CompressionFull, "", 0, "TPC Compression mode bits(1=truncate charge/width LSB, 2=differences, 4=track-model)") AddOptionRTC(compressionSortOrder, uint8_t, o2::gpu::GPUSettings::SortTime, "", 0, "Sort order of TPC compression(0=time, 1=pad, 2=Z-time-pad, 3=Z-pad-time, 4=no sorting(use incoming order))") AddOptionRTC(sigBitsCharge, uint8_t, 4, "", 0, "Number of significant bits for TPC cluster charge in compression mode 1") AddOptionRTC(sigBitsWidth, uint8_t, 3, "", 0, "Number of significant bits for TPC cluster width in compression mode 1") AddOptionRTC(dropLoopers, uint8_t, 0, "", 0, "Drop looping tracks starting from second loop") AddOptionRTC(mergerInterpolateErrors, uint8_t, 1, "", 0, "Use interpolation instead of extrapolation for chi2 based cluster rejection") AddOptionRTC(mergerInterpolateRejectAlsoOnCurrentPosition, uint8_t, 1, "", 0, "When using mergerInterpolateErrors, reject based on chi2 twice computed with interpolated and current track position starting from NDF > mergerNonInterpolateRejectMinNDF Merge tracks accross the central electrode Enable PID response Add sub threshold clusters in TPC dEdx computation OR mask of TPC flags that will reject the cluster in alternative dEdx Reject edge clusters based on uncorrected track Y during track fit Increase decrease removal by when on this number of pads from the edge h configStandalone Reconstruction rec_trd Max chi2 for TRD tracklets to be matched to a track Chi2 cut for strict matching mode Number of sigmas for ITS TPC track time error estimate Addition to search road around track prolongation along Y in cm Optimal tracklet rphi resolution in maximum chi2 per attached tracklet for TRD tracks take into account the full likelihood of the slope including exponential tails Tracks with less attached tracklets are discarded after the tracking Post trigger Pile up integration time in BCs fits all iterations but the last one in projections Use material lookup table for TPC refit Apply workarounds to avoid cyclic merge should not be needed tpc dyn configStandalone Processing proc_rtc Replace constant variables static by constexpr expressions Compile RTC in deterministic with NO_FAST_MATH flags and GPUCA_DETERMINISTIC_MODE define Use RTC to optimize GPU code h configStandalone Processing proc_rtctech Use a file lock to serialize access to the cache folder int32_t
configStandalone Reconstruction rec_tpc multiplier for the combined cluster track error during track following area in cm for the search of for z only used if decrease removal by when above this local occupancy rowx Shift of TPC revert cluster flag edge bit distance to edge exceeds this ZOffset for secondary multiple of radius max P of electron K BB bands crossing max P of electron p BB bands crossing max P of electron d BB bands crossing max P of electron t BB bands crossing min accepted dEdxMaxTPC of the track Additive extra cluster error for Y2 if edge flag set Additive extra cluster error for Y2 if single set Additive extra cluster error for Y2 if or single set Additive extra cluster error for Z2 if or single set Extra errors to add to track when crossing depending on addErrorsCECrossing Inner portion of y range in sector that is not used in searching for extrapolated track candidates factor2YS for track merging factor2K for track merging Margin in cm of Y position when rejecting edge clusters based on uncorrected track Y Max fraction of shared clusters for tracklet Except pad from cluster finding if total number of charges in a fragment is above this Except pad from cluster finding if number of consecutive charges in a fragment is above this Threshold where a timebin is considered disabling the noisy pad check for that pad Treat signal above this minimum as saturated Smoothing factor for the exponential Highly Ionising Particle tail filter Number of timebins to use for the averaging Add additional custom track errors when crossing relative as fraction of Do N fit passes in final fit of< 0:reject at max -n hits") AddOptionRTC(rejectIFCLowRadiusCluster, uint8_t, 1, "", 0, "Reject clusters that get the IFC mask error during refit") AddOptionRTC(dEdxTruncLow, uint8_t, 2, "", 0, "Low truncation threshold, fraction of 128") AddOptionRTC(dEdxTruncHigh, uint8_t, 77, "", 0, "High truncation threshold, fraction of 128") AddOptionRTC(extrapolationTracking, int8_t, 1, "", 0, "Enable Extrapolation Tracking(prolong tracks to adjacent sectors to find short segments)") AddOptionRTC(disableRefitAttachment, uint8_t, 0, "", 0, "Bitmask to disable certain attachment steps during refit(1:attachment, 2:propagation, 4:loop following, 8:mirroring)") AddOptionRTC(rejectionStrategy, uint8_t, o2::gpu::GPUSettings::RejectionStrategyA, "", 0, "Enable rejection of TPC clusters for compression(0=no, 1=strategy A, 2=strategy B)") AddOptionRTC(mergeLoopersAfterburner, uint8_t, 1, "", 0, "Run afterburner for additional looper merging") AddOptionRTC(compressionTypeMask, uint8_t, o2::gpu::GPUSettings::CompressionFull, "", 0, "TPC Compression mode bits(1=truncate charge/width LSB, 2=differences, 4=track-model)") AddOptionRTC(compressionSortOrder, uint8_t, o2::gpu::GPUSettings::SortTime, "", 0, "Sort order of TPC compression(0=time, 1=pad, 2=Z-time-pad, 3=Z-pad-time, 4=no sorting(use incoming order))") AddOptionRTC(sigBitsCharge, uint8_t, 4, "", 0, "Number of significant bits for TPC cluster charge in compression mode 1") AddOptionRTC(sigBitsWidth, uint8_t, 3, "", 0, "Number of significant bits for TPC cluster width in compression mode 1") AddOptionRTC(dropLoopers, uint8_t, 0, "", 0, "Drop looping tracks starting from second loop") AddOptionRTC(mergerInterpolateErrors, uint8_t, 1, "", 0, "Use interpolation instead of extrapolation for chi2 based cluster rejection") AddOptionRTC(mergerInterpolateRejectAlsoOnCurrentPosition, uint8_t, 1, "", 0, "When using mergerInterpolateErrors, reject based on chi2 twice computed with interpolated and current track position starting from NDF > mergerNonInterpolateRejectMinNDF Merge tracks accross the central electrode Enable PID response Add sub threshold clusters in TPC dEdx computation OR mask of TPC flags that will reject the cluster in alternative dEdx Reject edge clusters based on uncorrected track Y during track fit Increase decrease removal by when on this number of pads from the edge h configStandalone Reconstruction rec_trd Max chi2 for TRD tracklets to be matched to a track Chi2 cut for strict matching mode Number of sigmas for ITS TPC track time error estimate Addition to search road around track prolongation along Y in cm Optimal tracklet rphi resolution in maximum chi2 per attached tracklet for TRD tracks take into account the full likelihood of the slope including exponential tails Tracks with less attached tracklets are discarded after the tracking Post trigger Pile up integration time in BCs fits all iterations but the last one in projections Use material lookup table for TPC refit Apply workarounds to avoid cyclic merge should not be needed tpc dyn configStandalone Processing proc_rtc Replace constant variables static by constexpr expressions Compile RTC in deterministic with NO_FAST_MATH flags and GPUCA_DETERMINISTIC_MODE define Use RTC to optimize GPU code h configStandalone Processing proc_rtctech Use a file lock to serialize access to the cache folder Print launch bounds used for RTC code as debugging for exit after Allow RTC with slave GPUReconstruction instances with optConstexpr and optSpecialcode Maximum number of RTC cache files per backend in the cache the oldest are Prepend RTC compilation commands by this string Load a parameter object containing the launch bounds from a file h configStandalone Processing proc_param TPC Cluster Z Error Parameterization h configStandalone Processing settings for neural network proc_nn std::string Specify inference device(cpu(default), rocm, cuda)") AddOption(nnInferenceDeviceId
uint32_t mMultiprocessorCount
void ReleaseEvent(deviceEvent ev) override
void StreamWaitForEvents(int32_t stream, deviceEvent *evList, int32_t nEvents=1) override
GPUReconstructionOCL(const GPUSettingsDeviceBackend &cfg)
~GPUReconstructionOCL() override
void RecordMarker(deviceEvent *ev, int32_t stream) override
void SynchronizeEvents(deviceEvent *evList, int32_t nEvents=1) override
size_t GPUMemCpy(void *dst, const void *src, size_t size, int32_t stream, int32_t toGPU, deviceEvent *ev=nullptr, deviceEvent *evList=nullptr, int32_t nEvents=1) override
size_t WriteToConstantMemory(size_t offset, const void *src, size_t size, int32_t stream=-1, deviceEvent *ev=nullptr) override
int32_t GPUDebug(const char *state="UNKNOWN", int32_t stream=-1, bool force=false) override
void SynchronizeStream(int32_t stream) override
GPUReconstructionOCLInternals * mInternals
bool IsEventDone(deviceEvent *evList, int32_t nEvents=1) override
void SynchronizeGPU() override
virtual int32_t GPUChkErrInternal(const int64_t retval, const char *file, int32_t line) const override
int32_t InitDevice_Runtime() override
int32_t ExitDevice_Runtime() override
std::vector< std::vector< deviceEvent > > mEvents
GPUDefParameters * mParDevice
GPUReconstruction * mMaster
GPUConstantMem * mDeviceConstantMem
std::unique_ptr< GPUSettingsDeviceBackend > mDeviceBackendSettings
int32_t mMaxBackendThreads
std::unique_ptr< GPUSettingsProcessing > mProcessingSettings
const GPUSettingsProcessing & GetProcessingSettings() const
GLbitfield GLuint program
std::string to_string(gsl::span< T, Size > span)
#define QGET_LD_BINARY_SYMBOLS(filename)
std::vector< cl_kernel > kernels
cl_command_queue command_queue[constants::GPU_MAX_STREAMS]