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