114 Commity

Autor SHA1 Wiadomość Data
Loganaden Velvindron bf36e5f620 Fix disabled fortify source security flag (#2570)
Fix spurious character that caused CI issue.
2026-01-28 22:30:24 -06:00
arvindcheru 21afa807a9 Enable Lintian Support for ROCM-SMI, ROCMINFO (#1650)
* Enable Lintian Support for ROCM-SMI

* Enable Lintian Support for ROCMINFO

* Updated Lintian Override File Processing

* Update UT Fix for Lintian rocmsmi,rocminfo

* Update UT Fixes, Review Comments

* Update Review Comments - removed extra white spaces, added error check for gzip, date commands

* Update Review Comments - Correcting License Type

* Sync Lintian ChangeLog

* Changelog data sync enhanced

* Update Review Comments, UT fix

* white space cleanup - precommit check
2025-12-15 14:35:28 -06:00
systems-assistant[bot] 857e5ef3ce chore: unset executable permission (#213)
Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Co-authored-by: systems-assistant[bot] <systems-assistant[bot]@users.noreply.github.com>
Co-authored-by: Maisam Arif <Maisam.Arif@amd.com>
2025-09-16 11:06:54 -05:00
Joseph Macaranas 696881ae82 LICENSE clean up (#919)
- Clean up and standardization of MIT licenses after discussion with legal team.
- Update README.md with blurb for top-level files.
- MIT License explicitly mentioned for relevant projects.
- Removal of years.
- Copyright attribution should be to `Advanced Micro Devices, Inc.` and not `AMD ROCm(TM) Software`
- Removal of `All rights reserved.`
- Reduce line width of the text for readability.
- Add clear visual separators for additional licenses.
- Convert text files to markdown format for aforementioned separators.
- Update build scripts to point to renamed files.
- Fixed SMI doc references

Co-authored-by: Maisam Arif <Maisam.Arif@amd.com>
2025-09-10 12:06:14 -04:00
GabrPham a1052e7598 Updated Tool and Lib Version
Signed-off-by: GabrPham <gabrpham_amdeng@amd.com>


[ROCm/rocm_smi_lib commit: 25aec994a0]
2025-08-06 12:38:08 -05:00
Cheruvally, Aravindan d1c281a87e SWDEV-530465 Update share/doc/<pkgnm> License folder (#86)
Update share/doc/ folder for license/docs to reflect correct package name.
Signed-off-by: Cheruvally, Aravindan <Aravindan.Cheruvally@amd.com>

[ROCm/rocm_smi_lib commit: 55ab9b2bda]
2025-07-03 01:56:50 -05:00
Stella Laurenzo a768477da4 [PATCH] Miscellaneous CMake fixes.
Change-Id: Ibca31745d2e9375523193310bc1ca5994c87aa32


[ROCm/rocm_smi_lib commit: 92db324944]
2025-05-27 12:12:42 -05:00
Afzal Patel 29602fec52 add interface drm include directory
add interface drm include directory


[ROCm/rocm_smi_lib commit: f3c6e80fab]
2025-05-27 12:06:56 -05:00
Ramakrishnan, Ranjith 623a6452e5 SWDEV-532478 - Add rocm-core dependency to RPM packages (#67)
rocm-core dependency was missing for rpm packages and fixed the same

[ROCm/rocm_smi_lib commit: d32ff28ebf]
2025-05-20 14:41:38 -07:00
Arif, Maisam a2443a5efe Revert "Correct the dependencies of rocm_smi package."
This reverts commit 93ff9b3547.


[ROCm/rocm_smi_lib commit: 40671be7c9]
2025-05-18 10:34:28 -05:00
Arif, Maisam a9ddb0dcea Revert "Use devel in RPM package requires field"
This reverts commit 22777b75b5.


[ROCm/rocm_smi_lib commit: a0ad4a3fcd]
2025-05-18 10:34:28 -05:00
Arif, Maisam afc87ee2f8 Revert "Use the alphabetic 'or' in the CPack RPM package Requires field."
This reverts commit edd6134d16.


[ROCm/rocm_smi_lib commit: c7797b19a3]
2025-05-18 10:32:12 -05:00
Ranjith Ramakrishnan edd6134d16 Use the alphabetic 'or' in the CPack RPM package Requires field.
Using the OR symbol "|" is causing error in cpack


[ROCm/rocm_smi_lib commit: 4d201ad2c2]
2025-05-15 15:28:26 -07:00
Ranjith Ramakrishnan 22777b75b5 Use devel in RPM package requires field
[ROCm/rocm_smi_lib commit: cea68cd940]
2025-05-13 18:03:14 -05:00
Ranjith Ramakrishnan 93ff9b3547 Correct the dependencies of rocm_smi package.
Added libdrm/libdrm_amdgpu to the package requires/depends list and removed the same from suggests list.
The rocm smi header files are using drm.h


[ROCm/rocm_smi_lib commit: 6d53d9f9cf]
2025-05-13 18:03:14 -05:00
Ranjith Ramakrishnan e4f50f06cb SWDEV-531400 - Remove file reorganization backward compatibility code
The backward compatibility is already disabled and no longer required


[ROCm/rocm_smi_lib commit: 532f4be8be]
2025-05-13 17:54:20 -05:00
Galantsev, Dmitrii 142d42392e CMAKE - Fix libc6 RPM dep issue
Change-Id: Id68e8a268f1b7e8561b9c9f741ae6e10b4ad7d8a
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/rocm_smi_lib commit: 6d33c08346]
2025-05-08 10:56:38 -05:00
Galantsev, Dmitrii e0b9bf1dcb CMAKE - Fix lintian issues
Change-Id: Ie0099a27986eec017ea1e554c15dc06e6bd35c76
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/rocm_smi_lib commit: a355bb6664]
2025-05-07 00:35:09 -05:00
Poag, Charis efb37d89bc [SWDEV-522992] Make libdrm / libdrm_amdgpu load dynamically (#43)
Changes:
- Now load libdrm/libdrm_amdgpu dynamically

Change-Id: I49fb1f3540b3235a25370f7cfcfb9778db34c2a5
Signed-off-by: Charis Poag <Charis.Poag@amd.com>

[ROCm/rocm_smi_lib commit: ce405476ca]
2025-04-16 16:03:42 -05:00
Galantsev, Dmitrii bf7a2eab27 [SWDEV-508785] Bump version number to 7.6.0
Change-Id: I084f139802f73311f15c68f94bc98f631c7f2bd8
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/rocm_smi_lib commit: ceb47b0b04]
2025-02-21 14:46:56 -06:00
Charis Poag 7b867182f3 [SWDEV-504146] Fix Device Name
Changes: - Fixed Device Name (market name)
  - Added new API rsmi_dev_market_name_get()
  - Updated tests
  - Updated amdgpu_drm.h to match latest mainline kernel
  - Fixed subsystem ID to only show hex value (not subsystem name)
  - rocm_smi_lib now has a recommended requirement for libdrm
Change-Id: Ic438529e16c8c3dbbdd620da664918148c40c997


[ROCm/rocm_smi_lib commit: 6a5e94c451]
2025-02-19 08:49:50 -06:00
Galantsev, Dmitrii 809ef97d3c Fix warnings on CXX/linker flags (#12)
1) When `clang` is used as system compiler, libraries were built without respecting LDFLAGS. For example, this affected LTO flags, if any (and it only affected clang, not gcc).

2) Linker flags are registered as CXX flags, which produces warnings during compilation:
```
clang++: warning: -Wl,-z,noexecstack: 'linker' input unused [-Wunused-command-line-argument]
clang++: warning: -Wl,-znoexecheap: 'linker' input unused [-Wunused-command-line-argument]
clang++: warning: -Wl,-z,relro: 'linker' input unused [-Wunused-command-line-argument]
clang++: warning: -Wl,-z,now: 'linker' input unused [-Wunused-command-line-argument]
```

3) Clang does not support `-Wtrampolines` flag:
```
warning: unknown warning option '-Wtrampolines' [-Wunknown-warning-option]
```

4) No linkers support `noexecheap` anymore. `noexecheap` linker flag was a part of PaX patches to GNU ld, (which were dropped in 2017)[https://www.gentoo.org/support/news-items/2017-08-19-hardened-sources-removal.html]. Now ld/ld.lld/ld.gold don't support it and protection of heap is managed by NX bit. Therefore every compiler produces this warning:
```
ld.lld: warning: unknown -z value: noexecheap
```

Closes #210.

Co-authored-by: Sv. Lockal <lockalsash@gmail.com>

[ROCm/rocm_smi_lib commit: 4dbc2b6d57]
2025-02-04 22:16:57 -06:00
Ranjith Ramakrishnan c2692ad0a9 SWDEV-480347 - Don't terminate build for cpack bytecompile errors
In centos-7, python2 is used for cpack bytecompile. Using f strings in code will result in syntax error.
Setting _python_bytecompile_errors_terminate_build to 0 will ignore the errors

Change-Id: I43ecc99ae16627f4f5f91d0cca0398f6a003fa3c


[ROCm/rocm_smi_lib commit: 4ceffdca68]
2024-08-23 13:43:32 -07:00
Ranjith Ramakrishnan 6908160870 SWDEV-476075 - Prevent the modification of interpreter directives
CPACK is converting /usr/bin/env python3 to /usr/libexec/platform-python in RHEL8.
Undefining __brp_mangle_shebangs will prevent the same

Change-Id: Id285e2cea1de583853cec17eccf0a3a794cca643


[ROCm/rocm_smi_lib commit: 1b828b735b]
2024-08-05 09:50:04 -07:00
Maisam Arif 96fd0e1ea4 Bump version lib:7.3.0 tool:2.3.0+hash
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I637b34e03580d5b5efb1e12805a9cdeb7778de74


[ROCm/rocm_smi_lib commit: db4d81b944]
2024-07-10 19:55:15 -05:00
Ranjith Ramakrishnan 0e2b7a7623 SWDEV-468081 - Remove package provides field from RPM and DEB package
The provides tag is required when the package provides a virtual package.
Package name along with version will be provided by default and the provides tag is not required for this.
Using the tag for providing the name, but without version was resulting in package upgrade issues.

Change-Id: I74506d8c3bbd75d028bcdc03525c29541dce2b4c


[ROCm/rocm_smi_lib commit: d54bade574]
2024-06-18 18:27:53 -04:00
Galantsev, Dmitrii 0d40412479 SWDEV-464886 - Fix ASAN REGEX error in cmake
Change-Id: Iaa5deed3ac833ebf1a010b98cfd4493359653ffe
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/rocm_smi_lib commit: 10f3c2325c]
2024-05-30 16:42:00 -05:00
Galantsev, Dmitrii bd1b14c176 SWDEV-464886 - Fix REGEX error in cmake
Simplify rocm-core dependency handling

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


[ROCm/rocm_smi_lib commit: 2096c8225c]
2024-05-30 14:54:44 -05:00
Ranjith Ramakrishnan 10a438406a SWDEV-442738 - Static package generation for rocm_smi_lib
Package name will have suffix static-dev/devel

Change-Id: Ia273a66c663c56b023f6d765d024b30f1c35639d


[ROCm/rocm_smi_lib commit: 9f7e69bd5e]
2024-05-21 13:31:00 -04:00
Maisam Arif d68a3ffc8f Bump version lib:7.2.0 tool:2.2.0+hash
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I07138dad67d796fb8c2dd418a384f663dd8532c0


[ROCm/rocm_smi_lib commit: 9c16cc8baf]
2024-05-07 21:04:29 -05:00
Maisam Arif 5764275b71 Bump version lib:7.1.0 tool:2.1.0+hash
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I6f3d7c64aacf36c9d33d663e23559a7f50cd8db6


[ROCm/rocm_smi_lib commit: c425848141]
2024-05-02 03:30:48 -04:00
Daniel Martinez 6477ccfc05 change CMAKE_HOST_SYSTEM_PROCESSOR to CMAKE_SYSTEM_PROCESSOR
Change-Id: I8e379676091903e2af3909e6d90daf6d62b8232c
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/rocm_smi_lib commit: 38d1275d64]
2024-04-05 11:15:14 -04:00
Galantsev, Dmitrii 3564c1a430 CMAKE - Default to lib instead of lib64
Change-Id: Ib21d41018b091d92c2ed408ff0c4d28e6a74c903
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/rocm_smi_lib commit: de9eaaac8c]
2024-02-12 20:16:28 -06:00
Oliveira, Daniel e2a833f347 rocm_smi_lib: Fix GPU Metrics Max Elements Read Exceeded
Code changes related to the following:
  * Check smallest copy size for multi-valued metrics
  * Unit tests: gpu_metric_read
  * ROCMSMI examples

Build changes related to the following:
  * CMakeLists.txt

Change-Id: Ieb2363020fa21c93fbacd0edcc1d394eed183051
Signed-off-by: Oliveira, Daniel <daniel.oliveira@amd.com>


[ROCm/rocm_smi_lib commit: 8e0d3d5a39]
2023-12-04 17:01:08 -06:00
Galantsev, Dmitrii 7fc67c88ce Fix ASAN for tests and log metrics better
Change-Id: Ib495cfc28c48a4d291a89673a3b6fc13313845c7
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/rocm_smi_lib commit: a128867497]
2023-11-30 15:39:05 -05:00
Galantsev, Dmitrii a435423020 Bump version lib:7.0.0 tool:2.0.0+hash
Change-Id: I7f2fd5605a93d07f61b997a25e1fbcf2780ea5cb
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/rocm_smi_lib commit: e1c972a193]
2023-11-21 17:19:41 -06:00
Galantsev, Dmitrii a854fbe9f6 Add version hash
Change-Id: I6cf18b00a45ebd106f981e92681cab2ef25924e2
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/rocm_smi_lib commit: d61aaf44e1]
2023-11-21 17:14:38 -06:00
Galantsev, Dmitrii 92e2857be9 Fix issues introduced in e89751e202
- std=c++.. is not required because CMAKE_CXX_STANDARD is set
- nullptr check breaks the test because we rely on nullptr as an api for
  checking feature availability.
- enum number setting is unnecessary

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


[ROCm/rocm_smi_lib commit: a099f0682a]
2023-11-03 17:54:35 -05:00
Galantsev, Dmitrii 3126d1461c CMake - Bump version
Change-Id: Ibe62c0059262bcb9937ae856b796392b1fe362a0
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/rocm_smi_lib commit: 7d629c5959]
2023-11-02 18:26:00 -05:00
Charis Poag e89751e202 Partition EBUSY with RSMI_STATUS_BUSY & invalid GPU Metrics check
* Updates:
   - [API/CLI] rsmi_dev_*_partition_set &
     rsmi_dev_*_partition_reset - exposed RSMI_STATUS_BUSY for
     EBUSY writes + cleaned up accidental map insertions
     (maplookup[] can insert values that are not in the map,
     map.at(key) fixes this potential issue)
   - [API] rsmi_dev_gpu_metrics_info_get() - returns
     RSMI_STATUS_NOT_SUPPORTED for unsupported metric tables
     outside of 1v1/1v2/1v3
   - [API] writeDevInfoStr() - exposes RSMI_STATUS_BUSY for
     EBUSY write errors; kept backward compatibility
     for other writes which do not care about these states
   - [API] rsmi_dev_od_volt_info_get()
      & rsmi_dev_od_volt_curve_regions_get() have better logging
     + Expose more details on why they are erroring
   - [Utils/logs/example] Expose AMD GPU gfx target version to aid in
     system troubleshooting
   - [Utils] Added test methods that look at od volt
     freq & regions into here - for easier access across
     several tests
   - [Utils] Updated getRSMIStatusString(new argument - fullstatus;
     default to true for backwards compatibility)
     -> true shows shortened RSMI STATUS response
   - [Utils] Added splitString to cut out noisy return responses
     (used in getRSMIStatusString(), when fullstatus = true)
   - [Utils] Added getFileCreationDate() to expose build date
     of the library - helpful for local builds or experimental builds
   - [Utils] Macro cleanup
   - [Example] Added a few gpu_metric checks - helpful for upcoming
     updates
   - [Device] SYSFS/DebugFS - now have better r/w displayed in logs
   - [LOGS] Expose library build date - see above for details
   - [Tests] Add more warnings/errors to test builds
   - [Tests] Moved up Partition tests for ordered test runs - helped
     identify issues with GPU BUSY writes
   - [Tests] compute_partition_read_write - handles RSMI_STATUS_BUSY
     with waits for busy status found & cleaned up how we checked
     for partition changes - with RSMI responses exposed more clearly
   - [Tests] perf_determinism - multi gpu now properly runs through
     with full resets as needed
   - [Tests] volt_freq_curv_read - better error handling with more
     verbose output

Change-Id: Ie94c6abb6a9aab95c345996d3ad3843cf6734977
Signed-off-by: Charis Poag <Charis.Poag@amd.com>


[ROCm/rocm_smi_lib commit: 57b6135e54]
2023-10-27 14:52:02 -04:00
Étienne Mollier dcaf4a292e CMake - do not enforce -fPIE.
When built with LTO enabled, the linking of liboam.so chokes on the
following error, which is somewhat similar to the Debian bug #1030876
affecting PA-RISC, although the symptoms subtly differs in that it
suggests to build using -fPIC:

	/usr/bin/ld: /tmp/cc0wF8Kx.ltrans0.ltrans.o: relocation R_X86_64_PC32 against symbol `_ZTVSt9exception@@GLIBCXX_3.4' can not be used when making a shared object; recompile with -fPIC

The -fPIC argument is passed appropriately down to the build command,
however it looks to be erased by the late introduction of -fPIE flag
by upstream build system.  Erasing this flag allows the build to go
through, both with LTO and on PA-RISC.

Bug: https://github.com/RadeonOpenCompute/rocm_smi_lib/issues/111
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1015653
Change-Id: I8b35fd4b62cfa1a9ddb145362464df5dd276e2f5
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/rocm_smi_lib commit: c4c19e7917]
2023-10-23 16:37:37 -05:00
Galantsev, Dmitrii 86088ab63d CMake - Prevent failure to build on non-amd64 targets
Change-Id: Ifaa59fb672ea01c07cffea6cd2429bec15a5deaf
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>

Co-authored-by: Étienne Mollier <emollier@debian.org>
Change-Id: Ia691ab1db0061f04662e10e112da4b9ef06c4256


[ROCm/rocm_smi_lib commit: 1cf05dd9c7]
2023-10-23 16:36:17 -05:00
Oliveira, Daniel 5e444f87ad rocm_smi_lib: Fix Modernize and refactor gpu_metrics
Adds support for 'gpu_metrics_v1_4' and new counters

Code changes related to the following:
  * rsmi gpu_metrics APIs
  * rsmi gpu_metrics Logs
  * The new gpu_metrics are now part of the Device

Build changes related to the following: None

Change-Id: Ie748e977cd0a01c6a2fb82260014c0699605dbb3
Signed-off-by: Oliveira, Daniel <daniel.oliveira@amd.com>


[ROCm/rocm_smi_lib commit: 4e4ebde640]
2023-10-09 21:43:22 -05:00
Galantsev, Dmitrii fce4f5fa08 Update package version
Change-Id: Ie094f75d028a09f862729094815f8a2b6ea8ad78
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/rocm_smi_lib commit: 8244a677db]
2023-10-05 12:49:11 -05:00
Galantsev, Dmitrii f60b02916b Upgrade to CXX-17 gtest-1.14 and cmake-3.14
Also change the TARGET from amd_smi_libraries to rocm_smi_libraries
This helps reduce confusion between rocm-smi and amd-smi

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


[ROCm/rocm_smi_lib commit: cf6bcbbb27]
2023-09-28 12:44:51 -05:00
Oliveira, Daniel a75b7f741c Fix rsmitstReadWrite.TestPowerReadWrite test failure
Code changes related to the following:
  * All reinforcement work moved to their own files
  * Self contained changes only to support them
  * New files added to CMakeLists.txt

Change-Id: I761e91f54392824df9145eaed8b9805986861285
Signed-off-by: Oliveira, Daniel <daniel.oliveira@amd.com>


[ROCm/rocm_smi_lib commit: cc5ab079df]
2023-08-09 21:51:05 -05:00
Ranjith Ramakrishnan 9d347e9e2f SWDEV-366827 - Disable file reorg backward compatibility support by default
Change-Id: I1de06d0d6a30c8c862d768b58460ef1b49d15e29


[ROCm/rocm_smi_lib commit: 9406cdd832]
2023-08-07 09:21:19 -07:00
Jeremy Newton 367d83b5e1 Only install asan license if enabled
Change-Id: I79c6fce84c23ed12e65db8e234a29dbfedd11f68
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>


[ROCm/rocm_smi_lib commit: 828f46b445]
2023-06-30 23:34:43 -04:00
Jeremy Newton 0998343abd Actually fix version string
There seems to be a scope issue with the existing variables, but just
putting in the pkg version string seems sufficient.

Change-Id: I4ccef872ff848a70cb2abc07bf605c5f29a608e8
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>


[ROCm/rocm_smi_lib commit: 4f481dd7f3]
2023-06-30 23:34:14 -04:00
Jeremy Newton 54d51a154b Update default version to match tags
When building from github, these tags don't exist, so the defaults
should try to match the internal tags

Change-Id: Id570341f27e21916b1a7f3605ee2b5b9716cad9b
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>


[ROCm/rocm_smi_lib commit: 74dc98114f]
2023-06-30 00:16:22 -04:00