Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding prof primitives generator #967

Merged
merged 5 commits into from Mar 20, 2019
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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