Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions GPU/Common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,8 @@ if(ALIGPU_BUILD_TYPE STREQUAL "O2")
endif()
install(FILES ${HDRS_INSTALL} DESTINATION include/GPU)
endif()

if(ALIGPU_BUILD_TYPE STREQUAL "Standalone")
install(FILES ${HDRS_INSTALL}
DESTINATION include)
endif()
17 changes: 17 additions & 0 deletions GPU/GPUTracking/Base/cuda/GPUReconstructionCUDAGenRTC.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,23 @@ int32_t GPUReconstructionCUDA::genRTC(std::string& filename, uint32_t& nCompile)
std::string baseCommand = (mProcessingSettings.rtctech.prependCommand != "" ? (mProcessingSettings.rtctech.prependCommand + " ") : "");
baseCommand += (getenv("O2_GPU_RTC_OVERRIDE_CMD") ? std::string(getenv("O2_GPU_RTC_OVERRIDE_CMD")) : std::string(_binary_GPUReconstructionCUDArtc_command_start, _binary_GPUReconstructionCUDArtc_command_len));
baseCommand += std::string(" ") + (mProcessingSettings.rtctech.overrideArchitecture != "" ? mProcessingSettings.rtctech.overrideArchitecture : std::string(_binary_GPUReconstructionCUDArtc_command_arch_start, _binary_GPUReconstructionCUDArtc_command_arch_len));

if (mProcessingSettings.rtctech.loadLaunchBoundsFromFile.size()) {
FILE* fp = fopen(mProcessingSettings.rtctech.loadLaunchBoundsFromFile.c_str(), "rb");
if (fp == nullptr) {
throw std::runtime_error("Cannot open launch bounds parameter module file");
}
fseek(fp, 0, SEEK_END);
size_t size = ftell(fp);
if (size != sizeof(*mParDevice)) {
throw std::runtime_error("launch bounds parameter file has incorrect size");
}
fseek(fp, 0, SEEK_SET);
if (fread(mParDevice, 1, size, fp) != size) {
throw std::runtime_error("Error reading launch bounds parameter file");
}
fclose(fp);
}
const std::string launchBounds = o2::gpu::internal::GPUDefParametersExport(*mParDevice, true);
if (mProcessingSettings.rtctech.printLaunchBounds || mProcessingSettings.debugLevel >= 3) {
GPUInfo("RTC Launch Bounds:\n%s", launchBounds.c_str());
Expand Down
9 changes: 7 additions & 2 deletions GPU/GPUTracking/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ file(GENERATE
if(NOT ALIGPU_BUILD_TYPE STREQUAL "O2")
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include_gpu_onthefly)
endif()
set(HDRS_INSTALL ${HDRS_INSTALL} ${CMAKE_CURRENT_BINARY_DIR}/include_gpu_onthefly/GPUReconstructionKernelList.h ${CMAKE_CURRENT_BINARY_DIR}/include_gpu_onthefly/GPUDefParameters.h)
set(HDRS_INSTALL ${HDRS_INSTALL} ${CMAKE_CURRENT_BINARY_DIR}/include_gpu_onthefly/GPUReconstructionKernelList.h ${CMAKE_CURRENT_BINARY_DIR}/include_gpu_onthefly/GPUDefParameters.h ${CMAKE_CURRENT_BINARY_DIR}/include_gpu_onthefly/GPUDefParametersLoad.inc)
include(kernels.cmake)

# Optional sources depending on optional dependencies
Expand Down Expand Up @@ -376,13 +376,18 @@ if(ALIGPU_BUILD_TYPE STREQUAL "Standalone")

if(GPUCA_CONFIG_ROOT)
ROOT_GENERATE_DICTIONARY(G__${targetName} ${HDRS_CINT_O2} ${HDRS_CINT_DATATYPES} ${HDRS_CINT_O2_ADDITIONAL} GPUTrackingLinkDef_Standalone.h MODULE ${targetName})
INSTALL(FILES
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/lib${targetName}_rdict.pcm
${CMAKE_CURRENT_BINARY_DIR}/lib${targetName}.rootmap
DESTINATION .)
else()
target_compile_definitions(${targetName} PRIVATE GPUCA_NO_ROOT)
endif()
install(FILES ${HDRS_SRCS} ${HDRS_CINT_O2} ${HDRS_CINT_DATATYPES} ${HDRS_INSTALL}
DESTINATION include)
install(DIRECTORY utils
DESTINATION include
FILES_MATCHING PATTERN *.h)
endif()

# GPUReconstructionLibrary needs to know which GPU backends are enabled for proper error messages
Expand Down
1 change: 1 addition & 0 deletions GPU/GPUTracking/Definitions/GPUSettingsList.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ AddOption(printLaunchBounds, bool, false, "", 0, "Print launch bounds used for R
AddOption(cacheFolder, std::string, "./rtccache/", "", 0, "Folder in which the cache file is stored")
AddOption(prependCommand, std::string, "", "", 0, "Prepend RTC compilation commands by this string")
AddOption(overrideArchitecture, std::string, "", "", 0, "Override arhcitecture part of RTC compilation command line") // Part of cmdLine, so checked against the cache
AddOption(loadLaunchBoundsFromFile, std::string, "", "", 0, "Load a parameter object containing the launch bounds from a file")
AddHelp("help", 'h')
EndConfig()

Expand Down
14 changes: 14 additions & 0 deletions GPU/GPUTracking/Standalone/tools/createGeo.C
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

/// \file CreateGeo.C
/// \author David Rohr

#if !defined(__CLING__) || defined(__ROOTCLING__)
#include <TSystem.h>
#include "TRDBase/GeometryFlat.h"
Expand Down
11 changes: 11 additions & 0 deletions GPU/GPUTracking/Standalone/tools/createGeo.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# Copyright 2019-2020 CERN and copyright holders of ALICE O2.
# See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
# All rights not expressly granted are reserved.
#
# This software is distributed under the terms of the GNU General Public
# License v3 (GPL Version 3), copied verbatim in the file "COPYING".
#
# In applying this license CERN does not waive the privileges and immunities
# granted to it by virtue of its status as an Intergovernmental Organization
# or submit itself to any jurisdiction.

#!/bin/bash

PATH=$PATH:/usr/share/Modules/bin/:/home/qon/alice/alibuild
Expand Down
14 changes: 14 additions & 0 deletions GPU/GPUTracking/Standalone/tools/createLUT.C
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

/// \file CreateLUT.C
/// \author David Rohr

#if !defined(__CLING__) || defined(__ROOTCLING__)
#include <TSystem.h>
#include "DetectorsBase/MatLayerCylSet.h"
Expand Down
38 changes: 38 additions & 0 deletions GPU/GPUTracking/Standalone/tools/dumpGPUDefParam.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

/// \file dumpGPUDefParam.C
/// \author David Rohr

// Run e.g. as:
// ROOT_INCLUDE_PATH="`pwd`/include" root -l -q -b src/GPU/GPUTracking/Standalone/tools/dumpGPUDefParam.C'()'

// Logic for testing to load the default parameters
/*#define GPUCA_GPUCODE
#define GPUCA_GPUTYPE_AMPERE
#define GPUCA_DEF_PARAMETERS_LOAD_DEFAULTS
#define GPUCA_MAXN 40
#define GPUCA_ROW_COUNT 152
#define GPUCA_TPC_COMP_CHUNK_SIZE 1024
#include "GPUDefParametersDefault.h"*/

// Load file that sets GPUDefParameters
#include "testParam.h"

#include "GPUDefParametersLoad.inc"
void dumpGPUDefParam()
{
auto param = o2::gpu::internal::GPUDefParametersLoad();
printf("Loaded params:\n%s", o2::gpu::internal::GPUDefParametersExport(param, false).c_str());
FILE* fp = fopen("parameters.out", "w+b");
fwrite(&param, 1, sizeof(param), fp);
fclose(fp);
}
11 changes: 11 additions & 0 deletions GPU/GPUTracking/Standalone/tools/dumpTRDClusterMatrices.C
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

#include "AliCDBManager.h"
#include "AliGeomManager.h"
#include "AliTRDgeometry.h"
Expand Down
26 changes: 0 additions & 26 deletions GPU/GPUTracking/Standalone/tools/switchToAliRootLicense.sh

This file was deleted.