From 002883185d8b5700e8eb52c86e426c676c40cda2 Mon Sep 17 00:00:00 2001 From: Matteo Concas Date: Tue, 3 Sep 2024 19:57:19 +0200 Subject: [PATCH] Update methods --- CMakeLists.txt | 4 +--- Detectors/ITSMFT/ITS/tracking/GPU/cuda/TimeFrameGPU.cu | 6 +++--- Detectors/ITSMFT/ITS/tracking/GPU/cuda/TrackerTraitsGPU.cxx | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f4806fe044bb..d28f191021fdf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,9 +18,7 @@ cmake_minimum_required(VERSION 3.27.1 FATAL_ERROR) project(O2 LANGUAGES C CXX VERSION 1.2.0) include(CTest) -add_definitions(-DGPUCA_NO_FAST_MATH=1) -set(GPUCA_NO_FAST_MATH 1) -set(GPUCA_NO_FAST_MATH_WHOLEO2 1) + # Project wide setup # Would better fit inside GPU/CMakeLists.txt, but include GPU/Common directly diff --git a/Detectors/ITSMFT/ITS/tracking/GPU/cuda/TimeFrameGPU.cu b/Detectors/ITSMFT/ITS/tracking/GPU/cuda/TimeFrameGPU.cu index d3c56ead7de6c..ff9ef6c80b9a3 100644 --- a/Detectors/ITSMFT/ITS/tracking/GPU/cuda/TimeFrameGPU.cu +++ b/Detectors/ITSMFT/ITS/tracking/GPU/cuda/TimeFrameGPU.cu @@ -418,8 +418,8 @@ void TimeFrameGPU::initDevice(IndexTableUtils* utils, // mVerticesInChunks.resize(mGpuParams.nTimeFrameChunks); // mNVerticesInChunks.resize(mGpuParams.nTimeFrameChunks); // mLabelsInChunks.resize(mGpuParams.nTimeFrameChunks); - // LOGP(debug, "Size of fixed part is: {} MB", GpuTimeFrameChunk::computeFixedSizeBytes(mGpuParams) / MB); - // LOGP(debug, "Size of scaling part is: {} MB", GpuTimeFrameChunk::computeScalingSizeBytes(GpuTimeFrameChunk::computeRofPerChunk(mGpuParams, mAvailMemGB), mGpuParams) / MB); + // LOGP(info, "Size of fixed part is: {} MB", GpuTimeFrameChunk::computeFixedSizeBytes(mGpuParams) / MB); + // LOGP(info, "Size of scaling part is: {} MB", GpuTimeFrameChunk::computeScalingSizeBytes(GpuTimeFrameChunk::computeRofPerChunk(mGpuParams, mAvailMemGB), mGpuParams) / MB); // LOGP(info, "Allocating {} chunks of {} rofs capacity each.", mGpuParams.nTimeFrameChunks, mGpuParams.nROFsPerChunk); // for (int iChunk{0}; iChunk < mMemChunks.size(); ++iChunk) { @@ -571,7 +571,7 @@ template void TimeFrameGPU::downloadTrackITSExtDevice(std::vector& seeds) { LOGP(debug, "gpu-transfer: downloading {} tracks, for {} MB.", mTrackITSExt.size(), mTrackITSExt.size() * sizeof(o2::its::TrackITSExt) / MB); - checkGPUError(cudaMemcpyAsync(mTrackITSExt.data(), mTrackITSExtDevice, mTrackITSExt.size() * sizeof(o2::its::TrackITSExt), cudaMemcpyDeviceToHost, mGpuStreams[0].get())); + checkGPUError(cudaMemcpyAsync(mTrackITSExt.data(), mTrackITSExtDevice, seeds.size() * sizeof(o2::its::TrackITSExt), cudaMemcpyDeviceToHost, mGpuStreams[0].get())); checkGPUError(cudaHostUnregister(mTrackITSExt.data())); checkGPUError(cudaHostUnregister(seeds.data())); discardResult(cudaDeviceSynchronize()); diff --git a/Detectors/ITSMFT/ITS/tracking/GPU/cuda/TrackerTraitsGPU.cxx b/Detectors/ITSMFT/ITS/tracking/GPU/cuda/TrackerTraitsGPU.cxx index 13a5b9f1ce9c3..7f1d6812bc6cd 100644 --- a/Detectors/ITSMFT/ITS/tracking/GPU/cuda/TrackerTraitsGPU.cxx +++ b/Detectors/ITSMFT/ITS/tracking/GPU/cuda/TrackerTraitsGPU.cxx @@ -380,7 +380,7 @@ void TrackerTraitsGPU::findRoads(const int iteration) for (int iLayer{startLayer - 1}; iLayer > 0 && level > 2; --iLayer) { lastCellSeed.swap(updatedCellSeed); lastCellId.swap(updatedCellId); - updatedCellSeed.clear(); + std::vector().swap(updatedCellSeed); /// tame the memory peaks updatedCellId.clear(); processNeighbours(iLayer, --level, lastCellSeed, lastCellId, updatedCellSeed, updatedCellId); }