Coder Social home page Coder Social logo

rocm-cmake's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rocm-cmake's Issues

Add cotire

This can help speed up building in many targets.

Incorrect tests

https://github.com/RadeonOpenCompute/rocm-cmake/blob/48121ade0e70b89d393112642d8f394289fe680f/share/rocm/cmake/ROCMCreatePackage.cmake#L20

Using
if(${inout_variable})
where the value of inout_variable might be CPACK_DEB_WIBBLE looks up the truthfulness of the variable CPACK_DEB_WIBBLE.
However the cmake idea of true does not include strings like
N
0
FALSE
so this function givens incorrect results for

set(X FALSE)
rocm_join_if_set("," X "he said")

the function ought to be fixed to compare to the empty string or else renamed to rocm_join_if_true to reflect its nature. Of course the latter function is much less useful.

Release stable version

Can this project have a release for the stable version that could be used and linked to another project?

Possibility of INSTALL_PREFIX ?

I've failed to use cmake -DCMAKE_INSTALL_PREFIX=$pkgdir/opt/rocm --build . --target install

to package rocm-cmake for my distro. How to correctly use it?

Error installing rocm-cmake

I am trying to install rocm-cmake on Ubuntu 20.04. I am getting the following error;

:~/rocm-cmake/build$ cmake --build . --target install
Install the project...
-- Install configuration: ""
-- Up-to-date: /opt/rocm/./share
CMake Error at cmake_install.cmake:41 (file):
file INSTALL cannot set permissions on "/opt/rocm/./share": Operation not
permitted.

make: *** [Makefile:119: install] Error 1

rocm-cmake version cannot be used by cmake

The version specified in rocm-cmake is not written to a file detectable by cmake, so other packages cannot require a specific version of rocm-cmake. Attempting to require version 0.5 (the latest version on master) results in the error message:

[cmake]   Could not find a configuration file for package "ROCM" that is compatible
[cmake]   with requested version "0.5".
[cmake] 
[cmake]   The following configuration files were considered but not accepted:
[cmake] 
[cmake]     /opt/rocm/share/rocm/cmake/ROCMConfig.cmake, version: unknown

Please enable two factor authentication in your github account

@cgmb

We are going to enforce two factor authentication in (https://github.com/RadeonOpenCompute/) organization on 8th April , 2022 . Since we identified you as outside collaborator for this organization, you need to enable two factor authentication in your github account else you shall be removed from the organization after the enforcement. Please skip if already done.
To set up two factor authentication, please go through the steps in below link:

https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/configuring-two-factor-authentication

Please reach out to "[email protected] " for queries

find_package (ROCM is confusing

Invoking
find_package( ROCM 0.5 CONFIG QUIET PATHS ${ROCM_PATH} /opt/rocm )
to include rocm-cmake is confusing.

We should consider changing the name to ROCM-CMAKE.

Prevent installation of tests component

ROCm/ROCm#1905 discussed that currently rocm packages install test binaries as tests component. ROCm/ROCm#1905 (comment) pointed out that it may be used in cpack, but for distos which does not use cpack, the default installation includes test binaries (if they are built).

Is it possible that rocm-install function add an EXCLUDE_FROM_ALL option when COMPONENTS matches tests? This requires minimum cmake version of 3.6 (https://cmake.org/cmake/help/latest/command/install.html)

CI Failure: failures in `pass-doc-sphinxdoxygen` test on macOS

Problem Description

See failure in https://github.com/ROCm/rocm-cmake/actions/runs/7493947898/job/20400783726.
Unknown failure in Doxygen when running the doc-sphinxdoxygen test on macOS.

(CPU/GPU irrelevant)

Failure log:

[...]
[100%] Building html documentation with Sphinx
Running Sphinx v5.3.0
making output directory... done

Extension error (rocm_docs.doxygen):
Handler <function _run_doxygen at 0x[109](https://github.com/ROCm/rocm-cmake/actions/runs/7493947898/job/20400783726#step:7:110)b42940> for event 'config-inited' threw an exception (exception: Failed when running doxygen)
make[3]: *** [CMakeFiles/useful-sphinx-HTML] Error 2
make[2]: *** [CMakeFiles/useful-sphinx-HTML.dir/all] Error 2
make[1]: *** [CMakeFiles/doc.dir/rule] Error 2
make: *** [doc] Error 2
CMake Error at /Users/runner/work/rocm-cmake/rocm-cmake/test/test.cmake:88 (message):
  Process failed: COMMAND
  /Users/runner/hostedtoolcache/cmake/3.20.0/x64/cmake-3.20.0-macos-universal/CMake.app/Contents/bin/cmake
  --build
  /Users/runner/work/rocm-cmake/rocm-cmake/cget/cget/build/_url_L1VzZXJzL3J1bm5lci93b3JrL3JvY20tY21ha2Uvcm9jbS1jbWFrZQ__/build/test/tmp/pass-doc-sphinxdoxygen-QV4JI/builds/EA1Dz
  --target doc
Call Stack (most recent call first):
  /Users/runner/work/rocm-cmake/rocm-cmake/test/test.cmake:[115](https://github.com/ROCm/rocm-cmake/actions/runs/7493947898/job/20400783726#step:7:116) (test_exec)
  /Users/runner/work/rocm-cmake/rocm-cmake/test/test.cmake:133 (configure_dir)
  /Users/runner/work/rocm-cmake/rocm-cmake/test/pass/doc-sphinxdoxygen.cmake:5 (install_dir)
  /Users/runner/work/rocm-cmake/rocm-cmake/test/test.cmake:171 (include)
[...]

Operating System

macOS-11

CPU

N/A

GPU

AMD Radeon VII

ROCm Version

ROCm 6.0.0

ROCm Component

rocm-cmake

Steps to Reproduce

No response

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

No response

Additional Information

No response

Does uinstalling rocm-cmake remove other major packages ?

sudo apt remove rocm-cmake
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  hip-dev hip-doc hip-samples hipcub-dev hipfort-dev hipify-clang rocm-device-libs rocm-ml-libraries rocprim-dev
  rocthrust-dev rocwmma-dev
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  rocm-cmake rocm-hip-runtime-dev rocm-hip-sdk rocm-ml-sdk
0 upgraded, 0 newly installed, 4 to remove and 170 not upgraded.
After this operation, 168 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 276855 files and directories currently installed.)
Removing rocm-ml-sdk (5.5.1.50501-74~22.04) ...
Removing rocm-hip-sdk (5.5.1.50501-74~22.04) ...
Removing rocm-hip-runtime-dev (5.5.1.50501-74~22.04) ...
Removing rocm-cmake (0.8.1.50501-74~22.04) ...

circular symlink issue: link <package>/lib/lib<package>.so to /opt/rocm/lib/lib<package>.so

https://github.com/RadeonOpenCompute/rocm-cmake/blob/bd4e360c73fa366f817f5aa013433e799d8cd659/share/rocm/cmake/ROCMInstallTargets.cmake#L175-L177

The symlink seems to be wrong.
It creates the symlink in package library with link-destination /opt/rocm/lib/.. and overwrites the original library file. The library also creates symlink in /opt/rocm/lib/ in reversed way.

Use hipFFT as example,
\${LINK_PATH}/$<TARGET_LINKER_FILE_NAME:${TARGET}> is ../../lib/libhipfft.so
\${LINK_DIR}/${ROCM_INSTALL_LIBDIR}/$<TARGET_LINKER_FILE_NAME:${TARGET}> is /opt/rocm/hipfft/lib/libhipfft.so
/opt/rocm/hipfft/lib/libhipfft.so -> ../../lib/libhipfft.so (i.e. /opt/rocm/lib/libhipfft.so)
It overwrites the original library.
and hipFFT also creates /opt/rocm/lib/libhipfft.so -> /opt/rocm/hipfft/lib/libhipfft.so to lead circular symlink

[googletest] Possible False Positive of ROCMChecks WARNING

[Observations]
with googletest v1.14.0 (latest version as of 10/31/2023)

FetchContent_Declare(
    googletest
    GIT_REPOSITORY https://github.com/google/googletest.git
    GIT_TAG f8d7d77c06936315286eb55f8de22cd23c188571
)

We observe multiple ROCMChecks WARNING warnings like

*******************************************************************************
*------------------------------- ROCMChecks WARNING --------------------------*
  Options and properties should be set on a cmake target where possible. The
  variable 'CMAKE_C_FLAGS' may be set by the cmake toolchain, either by
  calling 'cmake -DCMAKE_C_FLAGS=""'
  or set in a toolchain file and added with
  'cmake -DCMAKE_TOOLCHAIN_FILE=<toolchain-file>'. ROCMChecks now calling:
CMake Warning at /opt/rocm/share/rocm/cmake/ROCMChecks.cmake:46 (message):
  'CMAKE_C_FLAGS' is set at
  /home/junliu/MIOpen/build/_deps/googletest-src/googletest/CMakeLists.txt:<line#>
  shown below:
Call Stack (most recent call first):
  build/_deps/googletest-src/googletest/cmake/internal_utils.cmake:9223372036854775807 (rocm_check_toolchain_var)
  build/_deps/googletest-src/googletest/cmake/internal_utils.cmake:52 (string)
  build/_deps/googletest-src/googletest/cmake/internal_utils.cmake:72 (fix_default_compiler_settings_)
  build/_deps/googletest-src/googletest/CMakeLists.txt:83 (config_compiler_and_linker)


*-----------------------------------------------------------------------------*
*******************************************************************************


*******************************************************************************
*------------------------------- ROCMChecks WARNING --------------------------*
  Options and properties should be set on a cmake target where possible. The
  variable 'CMAKE_CXX_FLAGS' may be set by the cmake toolchain, either by
  calling 'cmake -DCMAKE_CXX_FLAGS=""'
  or set in a toolchain file and added with
  'cmake -DCMAKE_TOOLCHAIN_FILE=<toolchain-file>'. ROCMChecks now calling:
CMake Warning at /opt/rocm/share/rocm/cmake/ROCMChecks.cmake:46 (message):
  'CMAKE_CXX_FLAGS' is set at
  /home/junliu/MIOpen/build/_deps/googletest-src/googletest/CMakeLists.txt:<line#>
  shown below:
Call Stack (most recent call first):
  build/_deps/googletest-src/googletest/cmake/internal_utils.cmake:9223372036854775807 (rocm_check_toolchain_var)
  build/_deps/googletest-src/googletest/cmake/internal_utils.cmake:38 (string)
  build/_deps/googletest-src/googletest/cmake/internal_utils.cmake:72 (fix_default_compiler_settings_)
  build/_deps/googletest-src/googletest/CMakeLists.txt:83 (config_compiler_and_linker)


*-----------------------------------------------------------------------------*
*******************************************************************************

[Likely Root Cause]:

https://github.com/google/googletest/blob/b10fad38c4026a29ea6561ab15fc4818170d1c10/googletest/cmake/internal_utils.cmake#L25

It is likely that rocm-cmake grep the keywords from

    foreach (flag_var
             CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
             CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO
             CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
             CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)

such as CMAKE_CXX_FLAGS and CMAKE_C_FLAGS

Should this be a false positive? How can we disable or suppress warning like this one?

TOT CMake Failure

cmake ../ && make -j8 && sudo make install
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /usr/share/cmake-3.10/Modules/WriteBasicConfigVersionFile.cmake:35 (message):
  Bad COMPATIBILITY value used for WRITE_BASIC_CONFIG_VERSION_FILE():
  "SameMinorVersion"
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/CMakePackageConfigHelpers.cmake:207 (write_basic_config_version_file)
  CMakeLists.txt:21 (write_basic_package_version_file)


-- Configuring incomplete, errors occurred!
See also "/home/kiriti/develop/docker/rocm/rocm-cmake/build/CMakeFiles/CMakeOutput.log".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.