Skip to content

Commit 8ffe167

Browse files
committed
GPU: Cleanup, remove obsolete code
1 parent 1de28ad commit 8ffe167

15 files changed

+19
-102
lines changed

GPU/GPUTracking/Base/GPUReconstructionCPU.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ class GPUReconstructionCPU : public GPUReconstructionKernels<GPUReconstructionCP
112112
int32_t ExitDevice() override;
113113
int32_t GetThread();
114114

115-
virtual int32_t PrepareTextures() { return 0; }
116115
virtual int32_t DoStuckProtection(int32_t stream, deviceEvent event) { return 0; }
117116

118117
// Pointers to tracker classes

GPU/GPUTracking/Base/cuda/GPUReconstructionCUDA.cu

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -254,12 +254,6 @@ int32_t GPUReconstructionCUDA::InitDevice_Runtime()
254254
return (1);
255255
}
256256

257-
#ifdef GPUCA_USE_TEXTURES
258-
if (GPUCA_SECTOR_DATA_MEMORY * NSECTORS > (size_t)deviceProp.maxTexture1DLinear) {
259-
GPUError("Invalid maximum texture size of device: %ld < %ld\n", (int64_t)deviceProp.maxTexture1DLinear, (int64_t)(GPUCA_SECTOR_DATA_MEMORY * NSECTORS));
260-
return (1);
261-
}
262-
#endif
263257
#ifndef GPUCA_NO_CONSTANT_MEMORY
264258
if (gGPUConstantMemBufferSize > deviceProp.totalConstMem) {
265259
GPUError("Insufficient constant memory available on GPU %d < %d!", (int32_t)deviceProp.totalConstMem, (int32_t)gGPUConstantMemBufferSize);
@@ -627,18 +621,6 @@ void GPUReconstructionCUDA::loadKernelModules(bool perKernel)
627621
}
628622

629623
#ifndef __HIPCC__ // CUDA
630-
int32_t GPUReconstructionCUDA::PrepareTextures()
631-
{
632-
#ifdef GPUCA_USE_TEXTURES
633-
cudaChannelFormatDesc channelDescu2 = cudaCreateChannelDesc<cahit2>();
634-
size_t offset;
635-
GPUChkErr(cudaBindTexture(&offset, &gAliTexRefu2, mProcessorsShadow->tpcTrackers[0].Data().Memory(), &channelDescu2, NSECTORS * GPUCA_SECTOR_DATA_MEMORY));
636-
cudaChannelFormatDesc channelDescu = cudaCreateChannelDesc<calink>();
637-
GPUChkErr(cudaBindTexture(&offset, &gAliTexRefu, mProcessorsShadow->tpcTrackers[0].Data().Memory(), &channelDescu, NSECTORS * GPUCA_SECTOR_DATA_MEMORY));
638-
#endif
639-
return (0);
640-
}
641-
642624
void GPUReconstructionCUDA::startGPUProfiling()
643625
{
644626
GPUChkErr(cudaProfilerStart());

GPU/GPUTracking/Base/cuda/GPUReconstructionCUDA.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ class GPUReconstructionCUDA : public GPUReconstructionKernels<GPUReconstructionC
7979

8080
#ifndef __HIPCC__ // CUDA
8181
bool CanQueryMaxMemory() override { return true; }
82-
int32_t PrepareTextures() override;
8382
void startGPUProfiling() override;
8483
void endGPUProfiling() override;
8584
#else // HIP

GPU/GPUTracking/Base/cuda/GPUReconstructionCUDAKernels.cu

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@
2020

2121
using namespace o2::gpu;
2222

23-
#ifdef GPUCA_USE_TEXTURES
24-
texture<cahit2, cudaTextureType1D, cudaReadModeElementType> gAliTexRefu2;
25-
texture<calink, cudaTextureType1D, cudaReadModeElementType> gAliTexRefu;
26-
#endif
27-
2823
#include "GPUReconstructionIncludesDeviceAll.h"
2924

3025
#if defined(__HIPCC__) && defined(GPUCA_HAS_GLOBAL_SYMBOL_CONSTANT_MEM)

GPU/GPUTracking/Base/opencl/GPUReconstructionOCL.cl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ typedef signed char int8_t;
7373
#include "GPUConstantMem.h"
7474
#include "GPUReconstructionIncludesDeviceAll.h"
7575

76-
// if (gpu_mem != pTracker.GPUParametersConst()->gpumem) return; //TODO!
77-
7876
#define GPUCA_KRNL(...) GPUCA_KRNLGPU(__VA_ARGS__)
7977
#define GPUCA_CONSMEM_PTR GPUglobal() char *gpu_mem, GPUconstant() GPUConstantMem* pConstant,
8078
#define GPUCA_CONSMEM (*pConstant)

GPU/GPUTracking/Definitions/GPUDef.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,6 @@
5858
#define CA_SHARED_CACHE_REF(target, src, size, reftype, ref) GPUglobalref() const reftype* __restrict__ ref = src
5959
#endif
6060

61-
#ifdef GPUCA_TEXTURE_FETCH_CONSTRUCTOR
62-
#define CA_TEXTURE_FETCH(type, texture, address, entry) tex1Dfetch(texture, ((char*) address - tracker.Data().GPUTextureBase()) / sizeof(type) + entry);
63-
#else
64-
#define CA_TEXTURE_FETCH(type, texture, address, entry) address[entry];
65-
#endif
66-
6761
#endif //GPUTPCDEF_H
6862

6963
#ifdef GPUCA_CADEBUG

GPU/GPUTracking/Definitions/GPUDefParametersDefaults.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,6 @@
267267
#define GPUCA_PAR_COMP_GATHER_MODE 3
268268
#define GPUCA_PAR_DEDX_STORAGE_TYPE uint16_t
269269
#define GPUCA_PAR_MERGER_INTERPOLATION_ERROR_TYPE half
270-
// #define GPUCA_USE_TEXTURES
271270
#elif defined(GPUCA_GPUTYPE_OPENCL)
272271
#else
273272
#error GPU TYPE NOT SET

GPU/GPUTracking/Definitions/GPUDefParametersWrapper.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,6 @@ namespace o2::gpu
4343

4444
// #define GPUCA_KERNEL_DEBUGGER_OUTPUT
4545

46-
// Derived parameters
47-
#ifdef GPUCA_USE_TEXTURES
48-
#define GPUCA_TEXTURE_FETCH_CONSTRUCTOR // Fetch data through texture cache
49-
#endif
50-
5146
} // namespace o2::gpu
5247

5348
// clang-format on

GPU/GPUTracking/Global/GPUChain.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ class GPUChain
216216

217217
inline GPUChain* GetNextChainInQueue() { return mRec->GetNextChainInQueue(); }
218218

219-
virtual int32_t PrepareTextures() { return 0; }
220219
virtual int32_t DoStuckProtection(int32_t stream, deviceEvent event) { return 0; }
221220

222221
template <class T, class S, typename... Args>

GPU/GPUTracking/Global/GPUChainTrackingSectorTracker.cxx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -103,17 +103,6 @@ int32_t GPUChainTracking::RunTPCTrackingSectors_internal()
103103
int32_t streamInitAndOccMap = mRec->NStreams() - 1;
104104

105105
if (doGPU) {
106-
for (uint32_t iSector = 0; iSector < NSECTORS; iSector++) {
107-
processorsShadow()->tpcTrackers[iSector].GPUParametersConst()->gpumem = (char*)mRec->DeviceMemoryBase();
108-
// Initialize Startup Constants
109-
processors()->tpcTrackers[iSector].GPUParameters()->nextStartHit = (((getKernelProperties<GPUTPCTrackletConstructor>().minBlocks * BlockCount()) + NSECTORS - 1 - iSector) / NSECTORS) * getKernelProperties<GPUTPCTrackletConstructor>().nThreads;
110-
processorsShadow()->tpcTrackers[iSector].SetGPUTextureBase(mRec->DeviceMemoryBase());
111-
}
112-
113-
if (PrepareTextures()) {
114-
return (2);
115-
}
116-
117106
// Copy Tracker Object to GPU Memory
118107
if (GetProcessingSettings().debugLevel >= 3) {
119108
GPUInfo("Copying Tracker objects to GPU");

0 commit comments

Comments
 (0)