Fix rocprofiler installation (#73)

- install rocprofiler library
- define AMD_INTERNAL_BUILD when including hsa/hsa.h
- install include/rocprofiler/registration.h header
- fix samples/pc_sampling cmake via installed rocprofiler
- fix samples/api_callback_tracing cmake via installed rocprofiler
- fix samples/api_buffered_tracing cmake via installed rocprofiler
- set cmake_minimum_required in samples/CMakeLists.txt
- find dependent packages in rocprofiler-config.cmake.in
  - AMDDeviceLibs
  - amd_comgr
  - hsa-runtime64
  - hip
- export rocprofiler-hip and rocprofiler-hsa-runtime libraries
- add Test Install Build step to CI workflow
This commit is contained in:
Jonathan R. Madsen
2023-09-21 10:07:07 -05:00
committed by GitHub
parent 78425069e8
commit 8be4ca1a04
10 changed files with 101 additions and 6 deletions
@@ -28,6 +28,7 @@ set(ROCPROFILER_HEADER_FILES
marker.h
pc_sampling.h
profile_config.h
registration.h
spm.h
${CMAKE_CURRENT_BINARY_DIR}/version.h)
+14
View File
@@ -22,12 +22,26 @@
#pragma once
// without AMD_INTERNAL_BUILD defined, including the hsa/hsa.h looks for headers in inc/ folder
// so we always want it defined but we set ROCPROFILER_DEFINED_AMD_INTERNAL_BUILD to 1 to tell
// us that after this include, we should undefine it
#ifndef AMD_INTERNAL_BUILD
# define AMD_INTERNAL_BUILD
# ifndef ROCPROFILER_DEFINED_AMD_INTERNAL_BUILD
# define ROCPROFILER_DEFINED_AMD_INTERNAL_BUILD 1
# endif
#endif
#include <rocprofiler/hsa/api_args.h>
#include <rocprofiler/hsa/api_id.h>
#include <rocprofiler/hsa/table_api_id.h>
#include <hsa/hsa.h>
#if defined(ROCPROFILER_DEFINED_AMD_INTERNAL_BUILD) && ROCPROFILER_DEFINED_AMD_INTERNAL_BUILD > 0
# undef AMD_INTERNAL_BUILD
#endif
#include <stdint.h>
typedef struct hsa_kernel_dispatch_packet_s hsa_kernel_dispatch_packet_t;