Wykres commitów

23 Commity

Autor SHA1 Wiadomość Data
Galantsev, Dmitrii 9702d0f2d7 SWDEV-439576 - rocmsmi -> amdsmi
- Migrate to amdsmi library
- NOTE: raslib still uses rocmsmi
- Remove unused rocmsmi service
- Remove unused RDC client code
- Remove RSMI calls from protos/rdc.proto

Change-Id: Ifc34a264c506b0ec5792307ee56b34526268762d
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2024-04-09 20:19:28 -05:00
Ranjith Ramakrishnan 0ca6d6fa59 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
2024-04-09 10:27:19 -05:00
Galantsev, Dmitrii 6e52a113a2 SYSTEMCTL: Check if running before stopping
When uninstalling the RDC application - the user is greeted with an
annoying "Failed to stop rdc.service..." message if the RDC is not
running.
This change makes sure RDC is active before trying to stop it.

Change-Id: I6fa57bfd4b9c348514cd6c38e60ed3930d32b62c
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-05-31 11:41:25 -05:00
Ranjith Ramakrishnan f962d0959a SWDEV-366831 - Compile time flag to switch between #warning and #error message
Using backward compatibility paths will provide an #error message. Compile time option added to enable/disable the #error message.
Disabling the same will provide a #warning message

Change-Id: I45f987b572a306036a72525d2b90d366459117ad
2023-03-10 13:19:00 -08:00
Ranjith Ramakrishnan 32844ddfee SWDEV-366831 - File reorg backward compatibility message changed to #error
Change-Id: Ic6fceb5cf92cca0a3c0a7a78c81cbb69ca82dd5e
2023-02-08 22:55:49 -08:00
Galantsev, Dmitrii 2787767bf0 SYSTEMD: Remove set -e to allow failure
'set -e' flag doesn't allow to fall back to 'return 0' when a command
fails. As installation/removal should not fail in most cases - 'set -e'
flag has been removed.

Below page recommends to be careful with 'set -e' usage:
https://www.debian.org/doc/debian-policy/ch-opersys.html#writing-the-scripts

Change-Id: If4439aaff66747bceabd3beb7e00ae12ce950e43
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-01-09 13:18:47 -06:00
Galantsev, Dmitrii 861a843ed7 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>
2022-12-16 12:19:59 -06:00
Ranjith Ramakrishnan 9c4ce805cf SWDEV-366823 - Change pragma message to warning
File reorganization feature was implemented with backward compatibility
The backward compatibility support will be deprecated in future release.
Changed the #pragma message to #warning for a smooth transition

Change-Id: Ib616bf4b7358a0607832a8af423c75e0bf2ab72d
2022-11-21 00:59:02 -08:00
Galantsev, Dmitrii f6efd7fbf6 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
2022-10-27 13:49:54 -05:00
Galantsev, Dmitrii 2c171767b3 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
2022-10-07 13:58:50 -05:00
Galantsev, Dmitrii 69a5a1d6bc Remove __pycache__ before uninstall
`__pycache__` might be created when a python script is ran. Which
prevents `rpm -e` and `dpkg --remove` from completely removing the
application. This patch removes `__pycache__` early in the uninstall
process.

A similar issue is resolved in:
rocm_smi_lib Change-Id: I695bd085d4a43b678b563b4c35f6d2e8ddfa7d7c

Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
Change-Id: I9fe0cd61570c2bd83cf9a45c95837ee6ad11e84b
2022-08-15 17:23:19 -04:00
Ranjith Ramakrishnan c3ea96dd71 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
2022-08-09 17:45:22 -07:00
Ranjith Ramakrishnan 52a3463147 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
2022-08-04 23:42:42 -07:00
Bill(Shuzhou) Liu d54c5715f0 Add user rdc to render or video group
Add user rdc to render or video group to access KFD for diagnostic.

Change-Id: Ie9b4ea65402319a2aae255063f8c79e56979a47f
2022-03-23 13:53:42 -04:00
Saravanan Solaiyappan 6a345a064e Consider apt/yum upgrade operation check in package scripts.
Include the upgrade operation check in the prerm and postun scripts
in package.

Signed-off-by: Saravanan Solaiyappan <saravanan.solaiyappan@amd.com>
Change-Id: Ide29b84e59eea6154276f790e353a25506dd3bdb
2022-02-24 13:31:03 -05:00
Chris Freehill 7a05145542 Fix some lintian errors
Fix lintian errors related to maintainer, postinst script and
permissions.

Change-Id: I6924ff92ff5453fa7e562a6188c2c91cea87df68
2021-03-03 19:35:24 -06:00
Freddy Paul fe1593dda5 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
2020-12-04 14:43:06 -05:00
Chris Freehill 0030f27ff8 Move grpc to ROCm install dir
Having grpc installed outside of ROCm dir is problematic
for multiple, simultaneous ROCm installations.

Change-Id: I5ad458ad01a76786339607d708b48534f15b137b
2020-10-24 21:46:10 -05:00
Chris Freehill 9051b752c4 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)
2020-09-12 09:52:48 -04:00
Chris Freehill 9483b74fe4 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)
2020-08-17 14:09:37 -05:00
Chris Freehill 4008dd8eac 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
2020-08-17 14:09:37 -05:00
Chris Freehill 5cc498c6aa 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
2020-08-17 14:07:25 -05:00
Chris Freehill 5898345d17 Initial RDC commit
Includes server, client and example targets.

Change-Id: I30596fb0453af71d49b8390a8468a6d073200836
2020-01-09 17:57:29 -06:00