Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,21 @@ if(THEROCK_ENABLE_OCL_RUNTIME)
)

therock_test_validate_shared_lib(
PATH ocl-clr/dist/lib
PATH ocl-clr/dist/lib/opencl
LIB_NAMES
libamdocl64.so
)

# Ensure runtime dependencies of libamdocl64.so (for example,
# libamd_comgr_loader.so) are discoverable by the dynamic loader when
# running the validation test. Some configurations (e.g. Windows) do not
# register this test, so guard the property update accordingly.
if(TEST therock-validate-shared-lib-libamdocl64.so)
set_tests_properties(therock-validate-shared-lib-libamdocl64.so
PROPERTIES
ENVIRONMENT
"LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/core/ocl-clr/dist/lib:$ENV{LD_LIBRARY_PATH}"
)
endif()
Comment on lines 295 to +311
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something feels off here. I think I saw a comment from @stellaraccident saying these build tests weren't necessarily still useful? Is this the right fix for the test if we do want to keep it?

Here are the logs for the test before these changes: https://github.com/ROCm/TheRock/actions/runs/19525189297/job/55965734381#step:13:63

24/26 Test #24: therock-validate-shared-lib-libhiprtc.so ..............   Passed    0.04 sec
      Start 25: therock-validate-shared-lib-libamdocl64.so
25/26 Test #25: therock-validate-shared-lib-libamdocl64.so ............***Failed    0.03 sec
Validating shared library: /__w/TheRock/TheRock/build/core/ocl-clr/dist/lib/libamdocl64.soTraceback (most recent call last):
  File "/__w/TheRock/TheRock/build_tools/validate_shared_library.py", line 24, in <module>
    main(sys.argv[1:])
  File "/__w/TheRock/TheRock/build_tools/validate_shared_library.py", line 20, in main
    run(args)
  File "/__w/TheRock/TheRock/build_tools/validate_shared_library.py", line 12, in run
    so = ctypes.cdll.LoadLibrary(shared_lib)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/python/cp312-cp312/lib/python3.12/ctypes/__init__.py", line 460, in LoadLibrary
    return self._dlltype(name)
           ^^^^^^^^^^^^^^^^^^^
  File "/opt/python/cp312-cp312/lib/python3.12/ctypes/__init__.py", line 379, in __init__
    self._handle = _dlopen(self._name, mode)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: /__w/TheRock/TheRock/build/core/ocl-clr/dist/lib/libamdocl64.so: cannot open shared object file: No such file or directory

      Start 26: therock-examples-cpp-sdk-user
26/26 Test #26: therock-examples-cpp-sdk-user .........................   Passed    4.03 sec

96% tests passed, 1 tests failed out of 26

Total Test time (real) =   4.86 sec

The following tests FAILED:
	 25 - therock-validate-shared-lib-libamdocl64.so (Failed)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a summary, there were two problems as far as I understand:

  1. The test was looking in dist/lib/libamdocl64.so but the actual file was in dist/lib/opencl/libamdocl64.so
  2. Even after pointing the test at the correct libamdocl64.so, the dynamic linker still couldn’t load it because its runtime dependencies (for example libamd_comgr_loader.so.1) weren’t on the library search path when CTest runs.


endif(THEROCK_ENABLE_OCL_RUNTIME)
2 changes: 1 addition & 1 deletion rocm-systems
Submodule rocm-systems updated 579 files
Loading