]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/tracking-ca/AliHLTTPCCAGPUConfig.h
bug fix: reconstruction crash when the output buffer size exceed
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / AliHLTTPCCAGPUConfig.h
1 #ifndef ALIHLTTPCCAGPUCONFIG_H
2 #define ALIHLTTPCCAGPUCONFIG_H
3
4 //GPU Run Configuration
5 #define HLTCA_GPU_BLOCK_COUNT 30
6 #define HLTCA_GPU_THREAD_COUNT 256
7
8 //GPU Parameters
9 #define HLTCA_GPU_WARP_SIZE 32
10 #define HLTCA_GPU_REGS 64
11
12 //Detector Parameters
13 #define HLTCA_ROW_COUNT 159
14
15 #define HLTCA_GPU_ROWALIGNMENT uint4                                    //Align Row Hits and Grid
16 #define HLTCA_GPU_ROWCOPY int                                                   //must not be bigger than row alignment!!!
17 #define HLTCA_GPU_TRACKLET_CONSTRUCTOR_NMEMTHREDS 32    //Amound of threads to reserve for memory copy
18 //#define HLTCA_GPU_PREFETCHDATA                                                //Fetch Row Data (Hits / Grid) into shared memory during Tracklet Construction
19 //#define HLTCA_GPU_PREFETCH_ROWBLOCK_ONLY                              //Prefetch only row parameters for current block during tracklet construction, faster for UpdateTracklet but shared cache can not be used for StoreTracklet then
20
21 #define HLTCA_GPU_SCHED_ROW_STEP 32                                             //Amount of Rows to process in one step before rescheduling
22 #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
23 //#define HLTCA_GPU_SCHED_FIXED_SLICE                                   //Make each Multiprocessor on GPU work only on a single slice during tracklet construction
24 #define HLTCA_GPU_RESCHED                                                               //Use dynamic tracklet scheduling
25
26 #define HLTCA_GPU_TEXTURE_FETCH                                                 //Fetch data through texture cache
27
28 //#define HLTCA_GPU_TRACKLET_CONSTRUCTOR_DO_PROFILE             //Output Profiling Data for Tracklet Constructor Tracklet Scheduling
29 //#define HLTCA_GPU_TIME_PROFILE                                                //Output Time Profiling Data for asynchronous DMA transfer
30
31 #define HLTCA_GPU_TRACKLET_SELECTOR_HITS_REG_SIZE 12
32 #define HLTCA_GPU_TRACKLET_SELECTOR_SLICE_COUNT 3               //Currently must be smaller than avaiable MultiProcessors on GPU or will result in wrong results
33
34 #define HLTCA_GPU_SORT_DUMPDATA                                                 //Sort Start Hits etc before dumping to file
35
36 #define HLTCA_GPU_MAX_TRACKLETS 12288                                   //Max Number of Tracklets that can be processed by GPU Tracker, Should be divisible by 16 at least
37 #define HLTCA_GPU_MAX_TRACKS 3072                                               //Max number of Tracks that can be processd by GPU Tracker
38
39 //#define HLTCA_GPU_EMULATION_SINGLE_TRACKLET 1313              //Run Tracklet constructor on on single Tracklet in Device Emulation Mode
40 //#define HLTCA_GPU_EMULATION_DEBUG_TRACKLET 1313
41
42 #define HLTCA_GPU_TRACKER_CONSTANT_MEM 65000                    //Amount of Constant Memory to reserve
43
44 #define HLTCA_GPU_TRACKER_OBJECT_MEMORY 1024 * 1024             //Total amount of Memory to reserve for GPU Tracker Objects
45 #define HLTCA_GPU_ROWS_MEMORY 1024 * 1024                               //Total amount of Memory to reserve for GPU Row Parameters
46 #define HLTCA_GPU_COMMON_MEMORY 1024 * 1024                             //Total amount of Memory to reserve for CommomMemoryStruct on GPU
47 #define HLTCA_GPU_SLICE_DATA_MEMORY 7 * 1024 * 1024             //Amount of Slice Data Memory to reserve per Slice on GPU
48 #define HLTCA_GPU_GLOBAL_MEMORY 20 * 1024 * 1024                //Amount of global temporary Memory to reserve per Slice on GPU
49 #define HLTCA_GPU_TRACKS_MEMORY 2 * 1024 * 1024                 //Amount of Memory to reserve for Final Tracks per Slice on GPU
50
51 //Make sure options do not interfere
52
53 #ifndef HLTCA_GPUCODE
54 //No texture fetch for CPU Tracker
55 #ifdef HLTCA_GPU_TEXTURE_FETCH
56 #undef HLTCA_GPU_TEXTURE_FETCH
57 #endif
58 //No Shared memory cache for CPU Tracker
59 #ifdef HLTCA_GPU_PREFETCHDATA
60 #undef HLTCA_GPU_PREFETCHDATA
61 #endif
62 //Do not cache Row Hits during Tracklet selection in Registers for CPU Tracker
63 #undef HLTCA_GPU_TRACKLET_SELECTOR_HITS_REG_SIZE
64 #define HLTCA_GPU_TRACKLET_SELECTOR_HITS_REG_SIZE 0
65 #else
66 //Sort start hits for GPU tracker
67 #define HLTCA_GPU_SORT_STARTHITS
68 #endif
69
70 //If not using Row Based schreduling or not using shared memory cache do not reserve threads for shared memory copy
71 #if !defined(HLTCA_GPU_PREFETCHDATA) | !defined(HLTCA_GPU_RESCHED)
72 #undef HLTCA_GPU_TRACKLET_CONSTRUCTOR_NMEMTHREDS
73 #define HLTCA_GPU_TRACKLET_CONSTRUCTOR_NMEMTHREDS 0
74 #endif
75
76 //Error Codes for GPU Tracker
77 #define HLTCA_GPU_ERROR_NONE 0
78 #define HLTCA_GPU_ERROR_ROWBLOCK_TRACKLET_OVERFLOW 1
79 #define HLTCA_GPU_ERROR_TRACKLET_OVERFLOW 2
80 #define HLTCA_GPU_ERROR_TRACK_OVERFLOW 3
81 #define HLTCA_GPU_ERROR_SCHEDULE_COLLISION 4
82
83 #endif
84