Skip to content

Commit

Permalink
adding prof primitives generator (#967)
Browse files Browse the repository at this point in the history
* adding prof primitives generator

* minor change, renaming

* minor cosmetic changes, comments correcting and dead code removing

* minor changes and renaming

* minor chane, fixing comments
  • Loading branch information
eshcherb authored and mangupta committed Mar 20, 2019
1 parent 24d08be commit 673cdee
Show file tree
Hide file tree
Showing 4 changed files with 471 additions and 2,381 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -13,5 +13,6 @@ bin/hipInfo
bin/hipBusBandwidth
bin/hipDispatchLatency
bin/hipify-clang
include/hip/hcc_detail/hip_prof_str.h

samples/1_Utils/hipInfo/hipInfo
19 changes: 16 additions & 3 deletions CMakeLists.txt
Expand Up @@ -160,9 +160,22 @@ if(NOT DEFINED COMPILE_HIP_ATP_MARKER)
endif()
add_to_config(_buildInfo COMPILE_HIP_ATP_MARKER)

################
# Detect profiling API
################
#############################
# Profiling API support
#############################
# Generate profiling API macros/structures header
set(PROF_API_STR "${CMAKE_CURRENT_SOURCE_DIR}/include/hip/hcc_detail/hip_prof_str.h")
set(PROF_API_HDR "${CMAKE_CURRENT_SOURCE_DIR}/include/hip/hcc_detail/hip_runtime_api.h")
set(PROF_API_SRC "${CMAKE_CURRENT_SOURCE_DIR}/src")
set(PROF_API_GEN "${CMAKE_CURRENT_SOURCE_DIR}/hip_prof_gen.py")
add_custom_command(
OUTPUT ${PROF_API_STR}
COMMAND ${PROF_API_GEN} ${OPT_PROF_API} ${PROF_API_HDR} ${PROF_API_SRC} ${PROF_API_STR}
DEPENDS ${PROF_API_GEN} ${PROF_API_HDR}
)
add_custom_target(prof ALL DEPENDS ${PROF_API_STR})

# Enable profiling API
if(USE_PROF_API EQUAL 1)
find_path(PROF_API_HEADER_DIR prof_protocol.h
HINTS
Expand Down

0 comments on commit 673cdee

Please sign in to comment.