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

Fix miopen package dependency roctracer etc #2508

Merged
merged 11 commits into from
Dec 24, 2023
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ if(MIOPEN_USE_MLIR)
math(EXPR rocMLIR_VERSION_FLAT "(${rocMLIR_VERSION_MAJOR} * 1000 + ${rocMLIR_VERSION_MINOR}) * 100000 + ${rocMLIR_VERSION_PATCH}")
endif()

set(MIOPEN_PACKAGE_REQS "hip-rocclr")

# Online assembler
find_program(MIOPEN_AMDGCN_ASSEMBLER
Expand All @@ -377,6 +378,7 @@ message(STATUS "AMDGCN assembler: ${MIOPEN_AMDGCN_ASSEMBLER}")
if(MIOPEN_USE_COMGR)
find_package(amd_comgr REQUIRED CONFIG)
message(STATUS "Build with comgr ${amd_comgr_VERSION}")
set(MIOPEN_PACKAGE_REQS "${MIOPEN_PACKAGE_REQS}, amd_comgr")
endif()

if(MIOPEN_USE_HIPRTC)
Expand Down Expand Up @@ -418,7 +420,12 @@ else()
endif()
set(MIOPEN_SYSTEM_FIND_DB_SUFFIX "${MIOPEN_BACKEND}" CACHE PATH "Filename suffix for the system find-db files")

set(MIOPEN_PACKAGE_REQS "hip-rocclr")
# PR-2391 Add the ability to log function calls to roctx.
# This allows attached profilers to see which MIOpen calls are being called by application and which kernels are being invoked by MIOpen.
# Enabled via the MIOPEN_ENABLE_LOGGING_ROCTX env var.
if(NOT WIN32)
set(MIOPEN_PACKAGE_REQS "${MIOPEN_PACKAGE_REQS}, roctracer")
junliume marked this conversation as resolved.
Show resolved Hide resolved
endif()

junliume marked this conversation as resolved.
Show resolved Hide resolved
if(MIOPEN_USE_ROCBLAS)
set(MIOPEN_PACKAGE_REQS "${MIOPEN_PACKAGE_REQS}, rocblas")
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated \
python3-pip \
python3-venv \
rocblas \
rocm-developer-tools \
rpm \
software-properties-common && \
apt-get clean && \
Expand Down
6 changes: 5 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,11 @@ if(NOT WIN32 AND NOT APPLE)
endif()

if(NOT WIN32)
target_link_libraries(MIOpen PRIVATE roctx64)
find_library(rocTracer roctx64)
if(rocTracer)
MESSAGE(STATUS "rocTracer: " ${rocTracer})
target_link_libraries(MIOpen PRIVATE roctx64)
endif()
endif()

############################################################
Expand Down