17 Коміти

Автор SHA1 Повідомлення Дата
Ranjith Ramakrishnan 2b935ed27e SWDEV-502603 - Use RPM_INSTALL_PREFIX variable rather than hard coded install prefix paths in RPM post/prerm scripts
Change-Id: I2699459e1e3730cf045f24f0c90e09f900701a6f


[ROCm/rdc commit: b778a879cb]
2024-12-10 21:44:09 -06:00
Galantsev, Dmitrii 06a1bba81a INSTALL - Fix rdc groups and lock file check
This fixes issues like:

1.

  /run/lock/rdcd.lock: Bad file descriptor
  Failed to determine owner of lock file.: Numerical result out of range

2.

  rdc.service: Failed to determine group credentials: No such process
  rdc.service: Failed at step GROUP spawning rdcd: No such process

Change-Id: I0ef5eb6ab72d036a3ea8dcb81f7a9108d279f7d6
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/rdc commit: c015f0fcaa]
2024-08-12 18:54:43 -05:00
Galantsev, Dmitrii ef73a46c6c INSTALL - Add rdci binary
Change-Id: I2b7047989b650d6a3998d7a5b37fad7ade876b17
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/rdc commit: c22a737ce7]
2024-08-12 16:58:35 -05:00
Galantsev, Dmitrii d541941b4c INSTALL - Always add video group to rdc user
Previously we relied on "render" to be enough and only used "video" as a
fallback. On some systems like SLES this might not be sufficient.

One issue happened when starting rocprofiler as part of RDC
initialization:
  what():  hsa error code: 4104 HSA_STATUS_ERROR_OUT_OF_RESOURCES
The issue only happened when RDC was started with systemd.
Turns out "rdc" user (under which systemctl starts RDC) only had render
but not video group. Adding video group solved the issue.

Change-Id: Idf6a9521ae72a0b28a428869aa7ab1edde3ae259
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/rdc commit: 4ebc34095c]
2024-08-12 16:58:35 -05:00
Ranjith Ramakrishnan 916d40d5bf Remove hard coded ROCm path in rdc.service
The executable rdcd was using an absolute path in rdc.service. Using update-alternatives gives the flexibility to invoke the binary from anywhere and no absolute path is required.

Change-Id: I2f3d6fcbf9dd854870cfc2e00532c504ce6cd6fc


[ROCm/rdc commit: 0ca6d6fa59]
2024-04-09 10:27:19 -05:00
Galantsev, Dmitrii eccb4e202c Add rocmtools support
This commit adds integration with ROCmTools

Additional changes:
- Fix DEB and RPM installation issue when systemd is not present
- Fix typos in rdc.h
- Wrap negative values in parentheses in rdc.h
- CMAKE: Improve rocm_smi searching
- README: Improve formatting, add info about ROCmTools

Metrics added: 700-714
Metrics can be listed with `rdci dmon --list-all`
Majority of the metrics are only supported by Instict (MI) series GPUs
700 RDC_FI_PROF_ELAPSED_CYCLES should be available on most devices
See README for more information

Change-Id: I907d3eacdc92fc5588ca6c76c2fa1ce0ad900770
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/rdc commit: 861a843ed7]
2022-12-16 12:19:59 -06:00
Galantsev, Dmitrii 2b89ab397c Improve CMake and relocate tests
- Respect CMAKE_INSTALL_PREFIX and ignore RDC_CLIENT_INSTALL_PREFIX
- Move example and rdctst from rocm/bin to rocm/share/rdc
- Add README for examples

Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
Change-Id: I0b1d996d206327fd1b51ac6e82d548829bdb1570


[ROCm/rdc commit: f6efd7fbf6]
2022-10-27 13:49:54 -05:00
Galantsev, Dmitrii 9ff80828e5 Compile rdctst and improve CMakeLists
Main CMake improvements:

* Add rdctst with -DBUILD_TESTS=ON
* Set default ROCM_DIR to /opt/rocm/
* Split rdc_libs/CMakeLists.txt into subdirectories
* Package tests into rdc-tests.deb and .rpm

Misc improvements:

* Add .editorconfig to normalize code formatting
* Add .gitignore
* Expand RPATH for gRPC to reduce LD_LIBRARY_PATH usage
* Export compile_commands.json
* Show warning and do not install gRPC if GRPC_ROOT is left as default
* Move .in files into relevant subdirectories
* Move most variables into project CMakeLists.txt to avoid redefinitions
* Normalize CMakeLists.txt formatting (4 spaces indentation)
* Rename DIAGNOSTIC_LIB to RDC_ROCR_LIB
* Update gRPC version in README to 1.44.0
* Remove gtest source
* Pull gtest from github if not installed

Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
Depends-On: I1039ef61247e3f0ff822925cc869fb0c2bf3af85
Change-Id: I879b21428e6642f19fda67092b365d8b78b7ba7b


[ROCm/rdc commit: 2c171767b3]
2022-10-07 13:58:50 -05:00
Ranjith Ramakrishnan 92e6ab4bb8 SWDEV-350674 - Added backward compatibility for binary files and rdc.service
With file reorganization changes binaries are moved to /opt/rocm-ver/bin.
Similarly rdc.service moved to /opt/rocm-ver/libexec/rdc
Test suites still used old paths
Once test suites changes are made, backward compatibility for binaries and rdc.service can be removed
Corrcted binary path in rdc.service.in
Corrected GRPC runpath

Change-Id: I306924d81cedc19586305a79d51eea8af6e70e83


[ROCm/rdc commit: c3ea96dd71]
2022-08-09 17:45:22 -07:00
Ranjith Ramakrishnan 3df8b88ca6 File reorganization with backward compatibility
SWDEV-291455 -  Binary , header files and libraries installed in bin,include and lib folder under /opt/rocm-ver
Prebuilt ras library with updated search path
cmake config files in lib/cmake/rdc
grpc,sp3,hsaco and private libraries installed in lib/rdc
config  installed in share/rdc
authentication and python_binding installed in libexec/rdc
Backward compatibility added for header files and libraries

Depends-On: I3f3d192935923f71737b3fe55ded536654a73dd7
Change-Id: Ia1a6cadc59034b155631a1ee5fdbe692d2a8a71b


[ROCm/rdc commit: 52a3463147]
2022-08-04 23:42:42 -07:00
Bill(Shuzhou) Liu b50c3b485b Add user rdc to render or video group
Add user rdc to render or video group to access KFD for diagnostic.

Change-Id: Ie9b4ea65402319a2aae255063f8c79e56979a47f


[ROCm/rdc commit: d54c5715f0]
2022-03-23 13:53:42 -04:00
Freddy Paul 8761ba13aa RDC:Move rdc deamon to rocm path.
Installing files to standard path across each version and using
ldconfig has issues with side-by-side install.

Usage of RUNPATH/RPATH for ROCm to ensure all ROCm libraries are
picked without the need for ldconfig.

For RDC server to be picked up by systemctl, service config file
shall be a symlink from /lib/systemctl/system/rdc.service to
corresponding RDC file path in a given version of ROCm

For side-by-side install packages of RDC post install scripts
will be removed. Hence Use will have to set the symlink explicitly
for now.

Change-Id: I916da7cf132f0f9c667e2470fac2b0875e3db9d0


[ROCm/rdc commit: fe1593dda5]
2020-12-04 14:43:06 -05:00
Chris Freehill 28df1feb8f Move grpc to ROCm install dir
Having grpc installed outside of ROCm dir is problematic
for multiple, simultaneous ROCm installations.

Change-Id: I5ad458ad01a76786339607d708b48534f15b137b


[ROCm/rdc commit: 0030f27ff8]
2020-10-24 21:46:10 -05:00
Chris Freehill 13cfa9cb31 Add grpc to build
Also:
* fix typo in rpm post install script
* for RPM, tell CPack to exclude intermediate directories
  in rpm file

Change-Id: I9dbb4901298d3699e092b53b339f5cb1d77b4edb
(cherry picked from commit e894cfa757aae8343afb373ce4ae60a1aa950a91)


[ROCm/rdc commit: 9051b752c4]
2020-09-12 09:52:48 -04:00
Chris Freehill caeb82122e Combine client and server packages
Now, only one package is generated. This works with older
versions of cmake.

Also, restore change to postinst scripts for Debian and
RPM, undone in a prevous commit.

Change-Id: Ica005656c5f1df0d01d3071584b97de9f0e61cb3
(cherry picked from commit c14d23843228fa146f38c87cb59514e855725b41)


[ROCm/rdc commit: 9483b74fe4]
2020-08-17 14:09:37 -05:00
Chris Freehill 27b7f174b3 Add .x86_64 and _amd64 suffixes to .rpm and .debs
Also:
* update README documentation
* correct postinst scripts for deb and rpm
* add lib64/ to link_directories (needed for CentOS and others)
* remove a redundant "rdc" from the package names
* rearrange the package names to conform to convention
For example:
rdc-server_1.0.0.0.local-build-0-c3187fb-dirty_amd64.deb
rdc-server_1.0.0.0.local-build-0-c3187fb-dirty.x86_64.rpm

* fix issues that result from having, in essence, 2 different
  install prefixes, 1 for the client and 1 for the server.

Change-Id: I88f0e1b8b72df2793c35ed71534afd91142da012


[ROCm/rdc commit: 4008dd8eac]
2020-08-17 14:09:37 -05:00
Chris Freehill 5c33103352 Make rdcd run as user "rdc"
The rdc account will be created on installation if it does
not already exist. It will be a system account with no
home directory.

rdcd will be started as a systemd service, but change to
user "rdc". The rdc user will drop all priviliges except
CAP_DAC_OVERRIDE, permitted. This means the default mode
will have no special privileges, but have the ability to
gain write access (e.g., to sysfs) when needed.

rdc tests were being inadvertantly added to the
installation. This was adversely impacting the new
functionality, so it was corrected in this commit.

Also included are a few small formatting changes.

Change-Id: I9c6bb132fee28119fd3960594dfb97bd2e7b282a


[ROCm/rdc commit: 5cc498c6aa]
2020-08-17 14:07:25 -05:00