SWDEV-236864 : packaging of generated headers

Change-Id: Ifda69eecf3697f6b69c978b3c4c2ffe9835edeb8
This commit is contained in:
Evgeny
2020-05-18 15:34:40 -05:00
parent ad1abf7d20
commit 074306d997
16 changed files with 51 additions and 47 deletions
-5
View File
@@ -4,12 +4,7 @@
*.exe
*.swp
*.Po
b
build
inc/hsa_prof_str.h
inc/kfd_prof_str.h
inc/basic_ostream_ops.h
inc/kfd_ostream_ops.h
test/hsa
test/MatrixTranspose/MatrixTranspose
test/MatrixTranspose_test/MatrixTranspose
+12 -3
View File
@@ -89,13 +89,22 @@ add_subdirectory ( ${TEST_DIR} ${PROJECT_BINARY_DIR}/test )
## pbulic headers
set ( PUBLIC_HEADERS
roctx.h
roctracer.h
roctracer_hip.h
roctracer_hcc.h
roctracer_ext.h
roctracer_hcc.h
roctracer_hip.h
roctracer_hsa.h
roctracer_kfd.h
roctracer_roctx.h
roctracer_cb_table.h
basic_ostream_ops.h
hip_ostream_ops.h
hsa_prof_str.h
kfd_ostream_ops.h
kfd_prof_str.h
ext/prof_protocol.h
ext/hsa_rt_utils.hpp
roctx.h
)
## Installation and packaging
+4 -4
View File
@@ -389,8 +389,8 @@ void roctracer_stop();
## 4. rocTracer Usage Code Examples
### 4.1. HIP API and HCC ops, GPU Activity Tracing
```
#include <inc/roctracer_hip.h>
#include <inc/roctracer_hcc.h>
#include <roctracer_hip.h>
#include <roctracer_hcc.h>
// HIP API callback function
void hip_api_callback(
@@ -610,8 +610,8 @@ int main() {
/////////////////////////////////////////////////////////////////////////////
// HIP/HCC Callbacks/Activity tracing
/////////////////////////////////////////////////////////////////////////////
#include <inc/roctracer_hip.h>
#include <inc/roctracer_hcc.h>
#include <roctracer_hip.h>
#include <roctracer_hcc.h>
// Macro to check ROC-tracer calls status
#define ROCTRACER_CALL(call) \
+1 -1
View File
@@ -42,7 +42,7 @@ THE SOFTWARE.
#include <stdbool.h>
#endif
#include "ext/prof_protocol.h"
#include <ext/prof_protocol.h>
#define ROCTRACER_VERSION_MAJOR 3
#define ROCTRACER_VERSION_MINOR 0
+1 -1
View File
@@ -23,7 +23,7 @@ THE SOFTWARE.
#ifndef CB_TABLE_H_
#define CB_TABLE_H_
#include "ext/prof_protocol.h"
#include <ext/prof_protocol.h>
#include <mutex>
+1 -1
View File
@@ -32,7 +32,7 @@ THE SOFTWARE.
#ifndef INC_ROCTRACER_EXT_H_
#define INC_ROCTRACER_EXT_H_
#include "roctracer.h"
#include <roctracer.h>
typedef void (*roctracer_start_cb_t)();
typedef void (*roctracer_stop_cb_t)();
+1 -1
View File
@@ -40,6 +40,6 @@ typedef const char* (hipGetOpName_t)(unsigned op);
}
#endif
#include "roctracer.h"
#include <roctracer.h>
#endif // INC_ROCTRACER_HCC_H_
+2 -2
View File
@@ -23,11 +23,11 @@ THE SOFTWARE.
#ifndef INC_ROCTRACER_HIP_H_
#define INC_ROCTRACER_HIP_H_
#include "inc/hip_ostream_ops.h"
#include <hip_ostream_ops.h>
#include <hip/hip_runtime.h>
#include <hip/hcc_detail/hip_prof_str.h>
#include "roctracer.h"
#include <roctracer.h>
#ifdef __cplusplus
extern "C" {
+2 -2
View File
@@ -26,7 +26,7 @@ THE SOFTWARE.
#include <hsa.h>
#include <hsa_ext_amd.h>
#include "roctracer.h"
#include <roctracer.h>
// HSA OP ID enumeration
enum hsa_op_id_t {
@@ -143,5 +143,5 @@ typedef void* hsa_amd_queue_intercept_handler;
typedef void* hsa_amd_runtime_queue_notifier;
#endif //! __cplusplus
#include "inc/hsa_prof_str.h"
#include <hsa_prof_str.h>
#endif // INC_ROCTRACER_HSA_H_
+4 -4
View File
@@ -23,12 +23,12 @@ THE SOFTWARE.
/////////////////////////////////////////////////////////////////////////////
#ifndef INC_ROCTRACER_KFD_H_
#define INC_ROCTRACER_KFD_H_
#include "roctracer.h"
#include "hsakmt.h"
#include <roctracer.h>
#include <hsakmt.h>
#ifdef __cplusplus
#include "inc/kfd_ostream_ops.h"
#include <kfd_ostream_ops.h>
#endif
#include "inc/kfd_prof_str.h"
#include <kfd_prof_str.h>
#endif // INC_ROCTRACER_KFD_H_
+1 -1
View File
@@ -59,7 +59,7 @@ typedef struct roctx_api_data_s {
} roctx_api_data_t;
#ifdef __cplusplus
#include "cb_table.h"
#include <roctracer_cb_table.h>
namespace roctx {
// ROCTX callbacks table type
typedef roctracer::CbTable<ROCTX_API_ID_NUMBER> cb_table_t;
+3 -3
View File
@@ -283,8 +283,8 @@ class API_DescrParser:
self.content_h += '#include <dlfcn.h>\n'
self.content_h += '#include <string.h>\n'
self.content_h += '#include \"roctracer_kfd.h\"\n'
self.content_h += '#include \"hsakmt.h\"\n'
self.content_h += '#include <roctracer_kfd.h>\n'
self.content_h += '#include <hsakmt.h>\n'
self.content_h += '#define PUBLIC_API __attribute__((visibility(\"default\")))\n'
@@ -293,7 +293,7 @@ class API_DescrParser:
self.content_h += '\n'
self.content_h += '#if PROF_API_IMPL\n'
self.content_h += '#include \"cb_table.h\"\n'
self.content_h += '#include <roctracer_cb_table.h>\n'
self.content_h += 'namespace roctracer {\n'
self.content_h += 'namespace kfd_support {\n'
+1 -1
View File
@@ -55,7 +55,7 @@ file( GLOB UTIL_SRC "${HSA_TEST_DIR}/util/*.cpp" )
set ( TEST_LIB "tracer_tool" )
set ( TEST_LIB_SRC ${TEST_DIR}/tool/tracer_tool.cpp ${UTIL_SRC} )
add_library ( ${TEST_LIB} SHARED ${TEST_LIB_SRC} )
target_include_directories ( ${TEST_LIB} PRIVATE ${HSA_TEST_DIR} ${ROOT_DIR} ${HSA_RUNTIME_INC_PATH} ${HSA_RUNTIME_HSA_INC_PATH} ${HIP_INC_DIR} ${HCC_INC_DIR} ${HSA_KMT_INC_PATH} )
target_include_directories ( ${TEST_LIB} PRIVATE ${HSA_TEST_DIR} ${ROOT_DIR} ${ROOT_DIR}/inc ${HSA_RUNTIME_INC_PATH} ${HSA_RUNTIME_HSA_INC_PATH} ${HIP_INC_DIR} ${HCC_INC_DIR} ${HSA_KMT_INC_PATH} )
target_link_libraries ( ${TEST_LIB} ${ROCTRACER_TARGET} ${HSA_RUNTIME_LIB} c stdc++ dl pthread rt )
## Build HSA test
+1 -1
View File
@@ -26,7 +26,7 @@ THE SOFTWARE.
#include <hip/hip_runtime.h>
#include "roctracer_ext.h"
// roctx header file
#include <inc/roctx.h>
#include <roctx.h>
#define WIDTH 1024
@@ -32,9 +32,9 @@ using namespace std;
#endif
// roctx header file
#include <inc/roctx.h>
#include <roctx.h>
// roctracer extension API
#include <inc/roctracer_ext.h>
#include <roctracer_ext.h>
const size_t msg_size = 512;
char* msg_buf = NULL;
@@ -225,11 +225,11 @@ int main() {
// HIP Callbacks/Activity tracing
//
#if 1
#include <inc/roctracer_hip.h>
#include <inc/roctracer_hcc.h>
#include <inc/roctracer_hsa.h>
#include <inc/roctracer_kfd.h>
#include <inc/roctracer_roctx.h>
#include <roctracer_hip.h>
#include <roctracer_hcc.h>
#include <roctracer_hsa.h>
#include <roctracer_kfd.h>
#include <roctracer_roctx.h>
#include <unistd.h>
#include <sys/syscall.h> /* For SYS_xxx definitions */
+10 -10
View File
@@ -32,18 +32,18 @@ THE SOFTWARE.
#include <sys/types.h>
#include <unistd.h> /* usleep */
#include <inc/roctracer_ext.h>
#include <inc/roctracer_roctx.h>
#include <inc/roctracer_hsa.h>
#include <inc/roctracer_hip.h>
#include <inc/roctracer_hcc.h>
#include <inc/roctracer_kfd.h>
#include <inc/ext/hsa_rt_utils.hpp>
#include <src/core/loader.h>
#include <src/core/trace_buffer.h>
#include <util/xml.h>
#include <roctracer_ext.h>
#include <roctracer_roctx.h>
#include <roctracer_hsa.h>
#include <roctracer_hip.h>
#include <roctracer_hcc.h>
#include <roctracer_kfd.h>
#include <ext/hsa_rt_utils.hpp>
#include "src/core/loader.h"
#include "src/core/trace_buffer.h"
#include "util/hsa_rsrc_factory.h"
#include "util/xml.h"
#define PUBLIC_API __attribute__((visibility("default")))
#define CONSTRUCTOR_API __attribute__((constructor))