Skip to content
Closed
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()
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
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);
}