174 Коммитов

Автор SHA1 Сообщение Дата
David Yat Sin 218d9d2a30 Add support for HSA_OVERRIDE_GFX_VERSION env var
Change-Id: Iab75cbbba7da654dbf56f4206900d9c2ff5e4565


[ROCm/rocminfo commit: 3670ff2103]
2023-08-24 18:43:30 +00:00
David Yat Sin 69f90c8f05 Adding coherent host access query
Change-Id: I34030ab193b5e7890cf10c6a0c6ad493ac0e0283


[ROCm/rocminfo commit: 23c483ca65]
2023-08-14 20:21:23 +00:00
David Yat Sin cf369d6388 Support extended scope fine-grained memory
Add display flag for extended scope fine-grained memory

Change-Id: I73f965e12a7a68afcd71f93a7b6a1af453de0510


[ROCm/rocminfo commit: 3f97bbda93]
2023-07-20 22:30:16 +00:00
Mark Searles be0e6048cf Removing __linux__ definition in CMake
Removing this definition as this should already be defined by compiler.
This is causing compile errors on newer versions of llvm because the
macro is being redefined.

Change-Id: I3bf03617970d4b76dabce36ed980523673afadc5


[ROCm/rocminfo commit: c8db38ede2]
2023-06-02 16:39:42 -07:00
David Yat Sin 47fafdac89 Add query to check DMABuf support
Add query to check whether DMAbuf export is supported on this system

Change-Id: I28caa87b67135d67ffcc94695e4656e7b691d259


[ROCm/rocminfo commit: 2d34dc31f2]
2023-05-29 17:38:10 +00:00
David Yat Sin d2f2927350 Add query for mwaitx support
Change-Id: I775234ff570e3cedacd68adb4617e62dce76bd9e


[ROCm/rocminfo commit: eb1283f377]
2023-03-28 12:11:55 -04:00
Mark Searles ee2eb9e46d Fix parsing of rocminfo output for ISAs with no features defined
Patch is an internal port of
 https://github.com/RadeonOpenCompute/rocminfo/pull/59

Change-Id: Iea84f49a60abce73716a7451960c20ee0d2b7bca


[ROCm/rocminfo commit: 34cc693bef]
2023-03-27 08:56:00 -07:00
David Yat Sin 34499a0855 Add display for IOMMU Support
Change-Id: I5af127ef1f9c1ae4b3b86b9e38272eb4f032191a


[ROCm/rocminfo commit: 2c92e790f0]
2023-01-20 02:56:45 +00:00
David Yat Sin 6c54d189a3 Add fields for CP firmware and SDMA engine ucode
Change-Id: I796b5a1c1e8be7fedda6207bcb740e3956aef8b2


[ROCm/rocminfo commit: c6b1707d0e]
2023-01-05 23:42:03 +00:00
Johannes Dieterich 2f3b22dc90 Fix rocminfo when run within docker environments
Currently, rocminfo will fail when executed inside a docker container
due to being unable to lsmod inside docker. This has impacts on
rocprofiler use.

Fix this behavior by querying initstate of the amdgpu module from
/sys/module/amdgpu instead. If initstate is marked "live" everything if
fine - error out with either "not loaded" (initstate file does not
exist) or "not live" (initstate file does not contain "live" string).

Change-Id: I6f2e9655942fd4cf840fd3f56b7d69e893fa84d7


[ROCm/rocminfo commit: 94b4b3f0a6]
2022-11-21 18:11:31 +00:00
Mike Li 1c1a0f299c Check permission and handle PermissionError exception
Signed-off-by: Mike Li <Tianxinmike.Li@amd.com>
Change-Id: If7cb8464d0b761e4be45c85eb7147ceed609da61


[ROCm/rocminfo commit: 3a4d533a1e]
2022-08-17 12:23:30 -04:00
David Salinas 66bdb04f62 Handle case with no GPUs
Change-Id: I35b8d4d0c0b6e63d9851d56163686794c7bb8c1e


[ROCm/rocminfo commit: d8f236cd81]
2022-06-17 14:40:44 -04:00
Ranjith Ramakrishnan 324e7b83e9 SWDEV-321112: Use GNUInstallDir variable DOCDIR
Replaced install path 'share/doc/project_name' with gnuinstalldir variable CMAKE_INSTALL_DOCDIR

Change-Id: Id9fc7599e6893a604f9d965b952ab27413e1c0d6


[ROCm/rocminfo commit: 0b270afafc]
2022-05-24 23:29:54 -07:00
Sean Keely 2845859126 Correct include paths for new directory layout.
Depends-On: I5e11e72848633dcc749d1e92705a8e3be67f793d
Change-Id: If743d015bb9c7c6fb179e259e2d4eb69be60e383


[ROCm/rocminfo commit: 4f1b5ed4b8]
2022-05-06 01:15:21 -04:00
Mike Li 337b190219 Add ASIC revision
Signed-off-by: Mike Li <Tianxinmike.Li@amd.com>
Change-Id: I8f6bbf39e4cf85bb03fd6c0de7afe5f9e6666ba5


[ROCm/rocminfo commit: b6dc27f0b3]
2022-03-16 00:51:33 -05:00
Shweta Khatri 78a6413986 Fixed some errors in rocminfo reported by lint tool
Change-Id: Ie7852c2003c10847226a5df23c4e85fbe89dad43


[ROCm/rocminfo commit: cf92f649ab]
2022-02-16 17:05:21 -05:00
Ashutosh Mishra e785dbbcd5 changeing major_ver of targetlist to decimal
Change-Id: Iada6cf9d2ba3bce4c042dffbf97f1588ffe10a8a


[ROCm/rocminfo commit: 6b4d69d011]
2022-02-03 23:38:24 +05:30
Nirmal Unnikrishnan a4c14fb921 Adding license file to rocminfo package
Change-Id: Ibc3b53922c366944a404982ed977ede50c6f36c7


[ROCm/rocminfo commit: 31e6575e9f]
2022-01-15 06:32:38 -06:00
Sean Keely d3d331e691 Update README.
Document use of sysfs for gfx arch lookup.

Change-Id: Ic326769be3e23d627e16fb1aae56c0d16ce99d78


[ROCm/rocminfo commit: b83efe00a4]
2021-10-29 20:24:11 -05:00
Sean Keely 512dee81c5 Close /dev/kfd after access check.
Cleanup dangling file handle.

Change-Id: I37bc42a2ffb7122f441cbf8a09c141d4396db928


[ROCm/rocminfo commit: 7766360dd6]
2021-10-29 20:23:32 -05:00
Sean Keely 2328e07883 Handle high levels of concurrency in rocm_agent_enumerator.
rocm_agent_enumerator may invoke rocminfo.  Rocminfo opens the
GPU device which allocates limited resource.  Beyond 254
concurrent processes this resource will be exhausted and rocminfo
will return an error.

This patch loops rocm_agent_enumerator when recieving a failure
message from rocminfo indicating KFD is out of memory.

Change-Id: I8637e214f5fa012642975c28578ae6bf9200eda8


[ROCm/rocminfo commit: b57c02d131]
2021-10-29 20:22:19 -05:00
Joseph Greathouse eed38e469d Add capability to pull gfx architecture from KFD topology
New versions of amdkfd include the gfx architecture version number
for all GPUs surfaced in the HSA topology. This patch adds this as
the preferred way for rocm_agent_enumerator to check for supported
gfx architecture numbers.

Kernels that are missing this feature will not have the value in
the topology. rocm_agent_enumerator will fall back to checking
against the PCI IDs in this case. If PCI IDs fail, we fall back
to the heavyweight rocminfo method.

Change-Id: I5cf22e1069114675092e97ae52331b829cfafb04


[ROCm/rocminfo commit: f419b81bdf]
2021-10-29 20:20:04 -05:00
Joseph Greathouse 0bc0584f0f Switch order of lspci and rocminfo for gfx arch query
rocminfo is a very heavyweight mechanism for learning a lot of
information about the GPUs that are attached to the system.
It opens up the limited /dev/kfd resource to gather lots of
information about each device, while rocm_agent_enumerator really
only wants the gfx number of AMD devices attached to the system.

To avoid this heavyweight lookup in most cases, this patch switches
the order of tests. Rather than starting with rocminfo and then
falling back to a poorly-maintained PCI ID list, this patch changes
the agent enumerator to start by checking in the PCI ID list (fast
case) and then falling back to rocminfo (slow case) if the PCI ID
list is out of date.

Change-Id: If24b8bc3baeeb6adad362abbb288ef3728383bce


[ROCm/rocminfo commit: e9b7de43be]
2021-10-29 20:16:22 -05:00
Joseph Greathouse 3d4449f0c8 Update cmake to include pciutils dependencies
When building packages, add in pciutils as a dependency because
rocm_agent_enumerator uses this as a mechanism for looking up
what GPUs exist on the system.

Change-Id: I10ac088c461c6d0bca435b61fbc90b685556fdf4


[ROCm/rocminfo commit: 0e1807c72d]
2021-10-29 18:45:32 -05:00
Joseph Greathouse fc4a486d66 Add better PCI ID backup in rocm_agent_enumerator
The PCI ID backup method in rocm_agent_enumerator, where the
tool uses lspci to find all AMD GPU devices in the system and
manaully match them to gfx version, is extremely outdated. The
PCI ID list did not include anything after Vega 10, and the
actual call to lspci no longer returned anything due to some
missing conversions.

The patch adds all GPUs that might be needed by ROCr up through
Navy Flounder. The PCI ID to gfx matching pulls from the amdgpu
driver and libhsakmt.

Change-Id: I58b77bb6aa631f575352fc444d2542f265909706


[ROCm/rocminfo commit: ea5ce46fb4]
2021-10-29 18:45:23 -05:00
Sean Keely b289416285 Add dependency on kmod.
rocminfo uses lsmod to check for loaded drivers.  Use of sysfs is
possible but sysfs' stable interface does not allow for easy parsing.
Use of lsmod avoids needing to walk the sysfs tree and avoids issues
of permissions to examine sysfs.

Both Debian and Fedora list lsmod under kmod.  Presumption is that
CentOS and RHEL also follow this.

Change-Id: Ic5033e0b780100c54d2fe0b4f501c40acbc237fb


[ROCm/rocminfo commit: 2b4b0c8862]
2021-10-29 16:23:01 -05:00
Sean Keely a665dc415f Correct and simplify package dependencies.
Package should depend on hsa-rocr, not hsa-rocr-dev.  Also
Remove negative path for dependency rocm-core (unconditional add +
conditional remove simplified to conditional add).

Change-Id: I6ead202f4f3f2f77b1da2ffed77feee956caf2e9


[ROCm/rocminfo commit: 86560046de]
2021-10-29 16:23:01 -05:00
Sean Keely 029c8a02aa Don't touch CMAKE_CXX_FLAGS.
Cmake manages CMAKE_CXX_FLAGS in standard ways from user inputs,
env vars, and target properties.  Use target properties for our
options and let cmake handle the rest.

Change-Id: I20ef738e4df7880258d770f4ec13c09d8b323fba


[ROCm/rocminfo commit: e32a4d9bed]
2021-10-29 16:23:01 -05:00
Yi Qian 97c4ab42f4 Add a new rocm_agent_enumerator option '-name' which lists target names obtained from the output of rocminfo.
Change-Id: Iea366c744e2f03a46fd5c902ae4faa94b96f6942


[ROCm/rocminfo commit: e1df81cb8f]
2021-10-29 16:23:01 -05:00
Ashutosh Misra 633405914f Adding package dependency
SWDEV-260294:Rocminfo shall explicitly depend on hsa-rocr for package installation

Signed-off-by: Ashutosh Mishra <ashutosh.mishra@amd.com>
Change-Id: I9a6d1691cd5a821f135a1d1cff599e9a2c40d06f


[ROCm/rocminfo commit: 2bd7657503]
2021-10-29 16:23:01 -05:00
Chris Freehill 18be0dc298 Append CXXFLAGS env. variable to CMAKE_CXX_FLAGS
This facilitates address sanitizer builds via env. variable.

Change-Id: I69fc9a5782ca80d7bdbf2b1ec0c89cccc4a5ca11


[ROCm/rocminfo commit: 102f22f974]
2021-10-29 16:23:01 -05:00
Icarus Sparry cad2d9733e Add dependency on rocm-core
Signed-off-by: Icarus Sparry <icarus.sparry@amd.com>
Change-Id: I2b0e330698ed19a2474734e33a1215644ec6f1cc


[ROCm/rocminfo commit: 1452f8fa24]
2021-07-19 21:25:55 +00:00
Chris Freehill 5aed7f55eb Exit earlier if prerquisites are not met
Change-Id: I1c861234986013742ce606ecffb5d9a7db697d05


[ROCm/rocminfo commit: 10da0a71da]
2020-11-11 20:49:26 -05:00
Ashutosh Mishra d89689c978 Standardizing Package name
Enables standards compliant package naming for debian and rpm

Signed-off-by: Ashutosh Mishra <ashutosh.mishra@amd.com>
Change-Id: I38af7b31f0c17d0c38ea7c2eb143770e7f1d74b2


[ROCm/rocminfo commit: e7b43b970f]
2020-10-24 10:08:00 +05:30
Ashutosh Mishra 59b2c3308d Adapting to latest HSA changes
JIRA : SWDEV-234471
With this change rocminfo exe shall be created using using hsa-runtime64::hsa-runtime64 which
internally decides whether static or shared libs based on its cmake build options

S. Keely:
Update patch to use find_package for rocr dependency.

Removed deadcode now supported by find_package.

Removed "hsa/" prefix from include statements since find_package
points to the target (ie rocr) include directory.

Removed typedef on structs due to new clang-11 warning.

Adapting to the comments : Removed PATHS for hsa find_package

Change-Id: I1ec65cdbce3085e44f1839da196eb4ae5c9ff30d


[ROCm/rocminfo commit: 605b3a5105]
2020-07-09 18:38:46 +05:30
Matt Arsenault c41682dc99 Refer explicitly to python3 in shebang line
On Ubuntu 20.04, there is no more python or python2. Currently I get
this: /usr/bin/env: ‘python’: No such file or directory

Change-Id: Ib310b8aa7c1bd62973ef3cc8bcaf571831ad4435


[ROCm/rocminfo commit: 5d6be5b808]
2020-05-04 09:40:11 -04:00
Chris Freehill 2ca29819a6 Correct spelling of output message
Change-Id: Id7789e622ea76cc53c3be719798c3c1f90ede6e2


[ROCm/rocminfo commit: 7624cc1008]
2020-05-01 13:22:50 -04:00
Matt Arsenault de4494c3ed Change check for /dev/kfd permissions
On newer kernels, it seems the group was changed from "video" to
"render". The check for video group misled me for quite some time, so
relax this check. Rather than specifically checking for video group
ownership, first see if /dev/kfd can be open as read-write. Then
diagnose whether the user belongs to the group that owns it, rather
than hardcoding the video group.

Change-Id: I9e65427363e9a5cdba802e09cee2f40fb80520ed


[ROCm/rocminfo commit: cd4b7cea85]
2020-05-01 10:14:21 -04:00
Chris Freehill aa4f01d778 Fix rocm_agent_enumerator on RHEL
This fixes SWDEV-231760

Change-Id: If704c8ff76548e10ddbda1b5c1ad0c28df7ab6f0


[ROCm/rocminfo commit: 373d8abdec]
2020-04-16 16:39:51 -05:00
Ramesh Errabolu 3419887e38 Extend rocminfo to print UUID of ROCm devices
Change-Id: I258962046e6d05dda91a8c48af646e50500b2d53


[ROCm/rocminfo commit: a1b4a580fc]
2020-04-13 20:42:43 -05:00
Chris Freehill 7d36b45731 Fix ennumerator id parser.
Fixes SWDEV-226018

Change-Id: I14144cdd316c19fe29dcd70b406a52aac8a741cd


[ROCm/rocminfo commit: 70ebe13a89]
2020-03-06 19:50:35 -05:00
Wilfried Holzke 86e8ee885c Added documentation for the new env var.
Change-Id: I0407a5dd36e91a1ea205ce4dda9a7fca906e1266


[ROCm/rocminfo commit: a134847069]
2019-12-16 10:38:47 -06:00
Wilfried Holzke 3960cc7d49 Added env var to set target.lst
Change-Id: Ie6aefba6ef79360e65d4a64a6be1ec50e59b5741


[ROCm/rocminfo commit: 12736c6fd8]
2019-12-16 10:37:33 -06:00
Chris Freehill 8eeb8d3e5f Fix for running rocminfo on wider variety of CPUs
Change-Id: I7acc46d2fec97ae1026643f79e59dd632444ce2e


[ROCm/rocminfo commit: 9b0cd9e428]
2019-12-09 14:59:57 -06:00
Chris Freehill 3f0aab31d5 Update README to include instruction to fetch git tags
Also, slight reformatting.

Change-Id: I7c35343556e48cadccd266b41465fb5ea04ace29


[ROCm/rocminfo commit: 831f3ab124]
2019-12-09 14:51:53 -06:00
Chris Freehill 7be9165a61 Require >= CMake3.5 instead of 2.8
Change-Id: I5e0045fad2ecc028c2dcb9fd78805dfb42a9e2ed


[ROCm/rocminfo commit: 2afaae2fbe]
2019-12-09 11:57:09 -06:00
Craig Andrews 7b18eda121 Install to standard locations using GNUInstallDirs
Change-Id: I6bafae15d2a0dfb70389673e03b6f72737786501


[ROCm/rocminfo commit: f1181e0569]
2019-08-22 23:02:30 -05:00
Chris Freehill 48e4985f5b Update versioning to new uniform standards
Change-Id: I93eb3170fedeee98caf7b3fd8f63a8c0fef5fd78


[ROCm/rocminfo commit: 9842beb770]
2019-08-22 12:01:49 -05:00
Craig Andrews 96fdd37b2c Use CACHE variables, allow overriding ROCR_LIB_DIR/ROCR_INC_DIR
CACHE variables allow for variables to be documented, and
ROCR_LIB_DIR/ROCR_INC_DIR should be overridable as they'll
have different values on different Linux distributions.

Change-Id: I0bba633c184df2da55bdbe6aabbd53346d098b83


[ROCm/rocminfo commit: 04dc08664e]
2019-08-22 08:02:31 -05:00
Craig Andrews a013e37c8f Messages indicating fatal errors should be fatal
Change-Id: Ib071d3f6ed216c817daa637fc784680ef9d123f8


[ROCm/rocminfo commit: 9f5349806a]
2019-08-21 22:28:54 -05:00