Skip to content

Adds rocprofiler-sdk.#89

Merged
stellaraccident merged 1 commit intomainfrom
add_rocprofiler_sdk
Feb 13, 2025
Merged

Adds rocprofiler-sdk.#89
stellaraccident merged 1 commit intomainfrom
add_rocprofiler_sdk

Conversation

@stellaraccident
Copy link
Collaborator

@stellaraccident stellaraccident commented Feb 13, 2025

* Fixes a hard-coded minor/patch HIP version (which was lower than what rocprofiler-sdk was looking for).
* Adds a PROFILER group and a PROFILER_SDK feature to gate.
* Adds rocprofiler-(compute|systems) to fetch list but does not wire them up yet.
* Includes a patch for some build issues: ROCm/rocprofiler-sdk#46
@stellaraccident
Copy link
Collaborator Author

Deps that need isolation:

2025-02-13T03:13:03.8005255Z -- Checking for module 'libelf'
2025-02-13T03:13:03.8005709Z --   Found libelf, version 0.190
2025-02-13T03:13:03.8006164Z -- Found libelf: elf  
2025-02-13T03:13:03.8007340Z -- Resolving system find_package(libdw) (not found in super-project AMDDeviceLibs;Clang;LLD;LLVM;amd_comgr;rocm-core;rocprofiler-register;hsakmt;hsa-runtime64;hip;HIP;hip-lang;hiprtc)
2025-02-13T03:13:03.8009387Z -- Resolving system find_package(PkgConfig) (not found in super-project AMDDeviceLibs;Clang;LLD;LLVM;amd_comgr;rocm-core;rocprofiler-register;hsakmt;hsa-runtime64;hip;HIP;hip-lang;hiprtc)
2025-02-13T03:13:03.8010642Z -- Checking for module 'libdw'
2025-02-13T03:13:03.8011157Z --   Package 'libdw', required by 'virtual:world', not found
2025-02-13T03:13:03.8012474Z CMake Error at /opt/_internal/pipx/venvs/cmake/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
2025-02-13T03:13:03.8013860Z   Could NOT find libdw (missing: libdw_LIBRARY libdw_INCLUDE_DIR)
2025-02-13T03:13:03.8014656Z Call Stack (most recent call first):
2025-02-13T03:13:03.8015937Z   /opt/_internal/pipx/venvs/cmake/lib/python3.10/site-packages/cmake/data/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
2025-02-13T03:13:03.8017351Z   cmake/Modules/Findlibdw.cmake:68 (find_package_handle_standard_args)
2025-02-13T03:13:03.8018428Z   /__w/TheRock/TheRock/cmake/therock_subproject_dep_provider.cmake:34 (find_package)
2025-02-13T03:13:03.8019287Z   cmake/rocprofiler_config_interfaces.cmake:213 (find_package)
2025-02-13T03:13:03.8019868Z   CMakeLists.txt:99 (include)
2025-02-13T03:13:03.8020142Z 
2025-02-13T03:13:03.8020148Z 
2025-02-13T03:13:03.8020338Z -- Configuring incomplete, errors occurred!

@stellaraccident
Copy link
Collaborator Author

stellaraccident commented Feb 13, 2025

Still having this problem:

2025-02-13T05:53:27.0992770Z FAILED: lib/librocprofiler-sdk-roctx.so.0.6.0 
2025-02-13T05:53:27.0996348Z : && /opt/rh/gcc-toolset-12/root/usr/bin/c++ -fPIC -O3 -DNDEBUG  -Wl,-rpath-link,/__w/TheRock/TheRock/build/compiler/amd-llvm/stage/lib/llvm/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/base/rocprofiler-register/stage/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/core/ROCR-Runtime/stage/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/core/clr/stage/lib   -rdynamic -shared -Wl,-soname,librocprofiler-sdk-roctx.so.0 -o lib/librocprofiler-sdk-roctx.so.0.6.0 source/lib/rocprofiler-sdk-roctx/CMakeFiles/rocprofiler-sdk-roctx-shared-library.dir/abi.cpp.o source/lib/rocprofiler-sdk-roctx/CMakeFiles/rocprofiler-sdk-roctx-shared-library.dir/roctx.cpp.o  -Wl,-rpath,"\$ORIGIN:/__w/TheRock/TheRock/build/base/rocprofiler-register/dist/lib:"  /__w/TheRock/TheRock/build/base/rocprofiler-register/dist/lib/librocprofiler-register.so.0.4.0  lib/librocprofiler-sdk-common.a  /usr/lib64/libpthread.so  /usr/lib64/libdl.so  /usr/lib64/librt.so  lib/libglog.a  lib/libfmt.a  lib/libyaml-cpp.a  lib/libptl.a  -lpthread  -latomic && :
2025-02-13T05:53:27.1000089Z /opt/rh/gcc-toolset-12/root/usr/libexec/gcc/x86_64-redhat-linux/12/ld: cannot find -latomic: No such file or directory

@marbre feel free to take a stab and land if you figure it out

Looks like it is coming from here:

cmake/rocprofiler_config_interfaces.cmake:target_link_libraries(rocprofiler-sdk-atomic INTERFACE atomic)

I think this needs a patch to rocprofiler-sdk which only includes it if a check says that atomic is available. I think it was just phased out of some toolchains and it is not a good practice to unconditionally include it.

@stellaraccident
Copy link
Collaborator Author

Ok, I think our build docker is just missing a package it should have: gcc-toolset-12-libatomic-devel

I'm not sure why that one part of the gcc-toolset isn't available by default, but it should be. Added to the dockerfile.

@stellaraccident stellaraccident marked this pull request as ready for review February 13, 2025 06:42
@stellaraccident
Copy link
Collaborator Author

Looks like it's going to go this time. Feel free to review/land.

@marbre marbre self-requested a review February 13, 2025 17:23
@stellaraccident stellaraccident merged commit 79f7dc3 into main Feb 13, 2025
1 check passed
@stellaraccident stellaraccident deleted the add_rocprofiler_sdk branch February 13, 2025 18:23
ScottTodd added a commit that referenced this pull request Feb 13, 2025
Progress on #36.

This dependency which was added in
#89 contains file paths that are
not valid on Windows. Full error logs:
https://gist.github.com/ScottTodd/0304483dca863cf6b8b74c15e14dbd85.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants