]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/tracking-ca/AliHLTTPCCAGPUConfig.h
GPU tracker update
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / AliHLTTPCCAGPUConfig.h
1 #ifndef ALIHLTTPCCAGPUCONFIG_H
2 #define ALIHLTTPCCAGPUCONFIG_H
3
4 //GPU Run Configuration
5
6 //#define FERMI
7
8 #ifdef FERMI
9 #define HLTCA_GPU_BLOCK_COUNT_CONSTRUCTOR_MULTIPLIER 2
10 #define HLTCA_GPU_BLOCK_COUNT_SELECTOR_MULTIPLIER 3
11 #define HLTCA_GPU_THREAD_COUNT 256
12 #define HLTCA_GPU_THREAD_COUNT_CONSTRUCTOR 256
13 #define HLTCA_GPU_THREAD_COUNT_SELECTOR 256
14 #define HLTCA_GPU_THREAD_COUNT_FINDER 256
15 #else
16 #define HLTCA_GPU_BLOCK_COUNT_CONSTRUCTOR_MULTIPLIER 1
17 #define HLTCA_GPU_BLOCK_COUNT_SELECTOR_MULTIPLIER 1
18 #define HLTCA_GPU_THREAD_COUNT 256
19 #define HLTCA_GPU_THREAD_COUNT_CONSTRUCTOR 256
20 #define HLTCA_GPU_THREAD_COUNT_SELECTOR 256
21 #define HLTCA_GPU_THREAD_COUNT_FINDER 256
22 #endif
23
24 #define GLTCA_GPU_HELPER_THREADS 0                                              //Number of helper threads to speed up initialization/output
25
26 //GPU Parameters
27 #define HLTCA_GPU_WARP_SIZE 32
28 #define HLTCA_GPU_REGS 64
29
30 //#define HLTCA_GPU_MERGER                                                              //Use GPU Merger
31
32 //Detector Parameters
33 #define HLTCA_ROW_COUNT 159
34
35 #define HLTCA_GPU_ROWALIGNMENT uint4                                    //Align Row Hits and Grid
36 #define HLTCA_GPU_ROWCOPY int                                                   //must not be bigger than row alignment!!!
37
38 #define HLTCA_GPU_SCHED_ROW_STEP 32                                             //Amount of Rows to process in one step before rescheduling
39 #define HLTCA_GPU_SCHED_FIXED_START                                             //Assign each GPU thread a start tracklet to start with instead of using the scheduler to obtain start tracklet
40 //#define HLTCA_GPU_SCHED_FIXED_SLICE                                   //Make each Multiprocessor on GPU work only on a single slice during tracklet construction
41 #define HLTCA_GPU_RESCHED                                                               //Use dynamic tracklet scheduling
42
43 #define HLTCA_GPU_ALTERNATIVE_SCHEDULER                                 //Use alternative scheduling algorithm (makes upper 4 options obsolete)
44 #define HLTCA_GPU_ALTSCHED_STEPSIZE 160                                 //Number of rows to process in between of rescheduling
45 #define HLTCA_GPU_ALTSCHED_MIN_THREADS 1                                //Reschedule if less than n threads are active
46 #define HLTCA_GPU_ALTERNATIVE_SCHEDULER_SIMPLE                  //Use simple version of alternative scheduler
47
48 #ifndef FERMI
49 #define HLTCA_GPU_TEXTURE_FETCH                                                 //Fetch data through texture cache
50 #define HLTCA_GPU_TEXTURE_FETCHa                                                //Fetch also in Neighbours Finder
51 #endif
52
53 //#define HLTCA_GPU_TRACKLET_CONSTRUCTOR_DO_PROFILE             //Output Profiling Data for Tracklet Constructor Tracklet Scheduling
54 //#define HLTCA_GPU_TIME_PROFILE                                                //Output Time Profiling Data for asynchronous DMA transfer
55 #define BITWISE_COMPATIBLE_DEBUG_OUTPUT                                 //Make Debug Output of CPU and GPU bitwise compatible for comparison, also enable SORT_DUMPDATA!
56 #define HLTCA_GPU_SORT_DUMPDATA                                                 //Sort Start Hits etc before dumping to file
57
58 #define HLTCA_GPU_TRACKLET_SELECTOR_HITS_REG_SIZE 12
59 #define HLTCA_GPU_TRACKLET_SELECTOR_SLICE_COUNT 3               //Currently must be smaller than avaiable MultiProcessors on GPU or will result in wrong results
60
61 #define HLTCA_GPU_MAX_TRACKLETS 12288                                   //Max Number of Tracklets that can be processed by GPU Tracker, Should be divisible by 16 at least
62 #define HLTCA_GPU_MAX_TRACKS 1536                                               //Max number of Tracks that can be processd by GPU Tracker
63
64 //#define HLTCA_GPU_EMULATION_SINGLE_TRACKLET 1313              //Run Tracklet constructor on on single Tracklet in Device Emulation Mode
65 //#define HLTCA_GPU_EMULATION_DEBUG_TRACKLET 1313
66
67 //#define HLTCA_GPU_DEFAULT_MAX_SLICE_COUNT 12
68
69 #define HLTCA_GPU_TRACKER_CONSTANT_MEM 65000                    //Amount of Constant Memory to reserve
70
71 #define HLTCA_GPU_TRACKER_OBJECT_MEMORY 1024 * 1024             //Total amount of Memory to reserve for GPU Tracker Objects
72 #define HLTCA_GPU_ROWS_MEMORY 1024 * 1024                               //Total amount of Memory to reserve for GPU Row Parameters
73 #define HLTCA_GPU_COMMON_MEMORY 1024 * 1024                             //Total amount of Memory to reserve for CommomMemoryStruct on GPU
74 #define HLTCA_GPU_SLICE_DATA_MEMORY 6 * 1024 * 1024             //Amount of Slice Data Memory to reserve per Slice on GPU
75 #define HLTCA_GPU_GLOBAL_MEMORY 13 * 1024 * 1024                //Amount of global temporary Memory to reserve per Slice on GPU
76 #define HLTCA_GPU_TRACKS_MEMORY 2 * 1024 * 1024                 //Amount of Memory to reserve for Final Tracks per Slice on Host as Page Locked Memory
77
78 //Make sure options do not interfere
79
80 #ifndef HLTCA_GPUCODE
81 //No texture fetch for CPU Tracker
82 #ifdef HLTCA_GPU_TEXTURE_FETCH
83 #undef HLTCA_GPU_TEXTURE_FETCH
84 #endif
85 #ifdef HLTCA_GPU_TEXTURE_FETCHa
86 #undef HLTCA_GPU_TEXTURE_FETCHa
87 #endif
88
89 //Do not cache Row Hits during Tracklet selection in Registers for CPU Tracker
90 #undef HLTCA_GPU_TRACKLET_SELECTOR_HITS_REG_SIZE
91 #define HLTCA_GPU_TRACKLET_SELECTOR_HITS_REG_SIZE 0
92 #else
93 //Sort start hits for GPU tracker
94 #define HLTCA_GPU_SORT_STARTHITS
95 #endif
96
97 //Error Codes for GPU Tracker
98 #define HLTCA_GPU_ERROR_NONE 0
99 #define HLTCA_GPU_ERROR_ROWBLOCK_TRACKLET_OVERFLOW 1
100 #define HLTCA_GPU_ERROR_TRACKLET_OVERFLOW 2
101 #define HLTCA_GPU_ERROR_TRACK_OVERFLOW 3
102 #define HLTCA_GPU_ERROR_SCHEDULE_COLLISION 4
103 #define HLTCA_GPU_ERROR_WRONG_ROW 5
104
105 #endif
106