From 34f3ed33ac52ea3d2b95202d4dd47848d417a695 Mon Sep 17 00:00:00 2001 From: Matteo Concas Date: Tue, 3 Sep 2024 19:57:19 +0200 Subject: [PATCH] Update methods --- Detectors/ITSMFT/ITS/tracking/GPU/cuda/TimeFrameGPU.cu | 6 +++--- Detectors/ITSMFT/ITS/tracking/GPU/cuda/TrackerTraitsGPU.cxx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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); }