Граф коммитов

30 Коммитов

Автор SHA1 Сообщение Дата
Jiadong Zhu d1efacb47f Do not print to console for which command
The command which would print warnings on some
platform. Redirect both stdout and stderr to
/dev/null while running the command.

Signed-off-by: Jiadong Zhu <Jiadong.Zhu@amd.com>
Change-Id: Ibc377681a31a14a3e306ab4fcb14d8d0c853fa86
2024-05-22 09:43:21 -04:00
Jiadong Zhu 049ab55393 Add WSL support for rocminfo
This includes detecting the running environment,
skipping kfd dependency check if in wsl platform
and disabling unavailable information on wsl.

V2: Use wslinfo to detect the environment.
V3: Add back some queries for wsl, as the not_supported
value shall be returned from hsa_runtime.

Signed-off-by: Jiadong Zhu <Jiadong.Zhu@amd.com>
Suggested-by: Tianci Yin <tianci.yin@amd.com>
Change-Id: I686d551c795cb5c5532591623022856f59512205
2024-05-09 14:37:15 +08:00
David Yat Sin 7e159e6d76 Add query for memory properties
Change-Id: I07c084c56b15c499ec564860b2a514e909ab7ca4
2024-02-13 14:28:30 -05:00
David Yat Sin 7b59f24005 Add query for HSA Ext interface version
Change-Id: Ibfac8c23b173793f7302f926c4695a1f99b328fe
2024-01-04 19:53:02 +00:00
Gregory Rodgers b249107c6a Print amdgpu version
Change-Id: Ibab6e51489d436b66c3bac4bbd0f52a400ad6b0b
2023-10-03 18:48:47 +00:00
David Yat Sin f1f463d818 Add recommended granule query
Change-Id: I7eb10e267d0272759321ee30feddf2d6464d9443
2023-08-25 01:04:34 +00:00
David Yat Sin 23c483ca65 Adding coherent host access query
Change-Id: I34030ab193b5e7890cf10c6a0c6ad493ac0e0283
2023-08-14 20:21:23 +00:00
David Yat Sin 3f97bbda93 Support extended scope fine-grained memory
Add display flag for extended scope fine-grained memory

Change-Id: I73f965e12a7a68afcd71f93a7b6a1af453de0510
2023-07-20 22:30:16 +00:00
David Yat Sin 2d34dc31f2 Add query to check DMABuf support
Add query to check whether DMAbuf export is supported on this system

Change-Id: I28caa87b67135d67ffcc94695e4656e7b691d259
2023-05-29 17:38:10 +00:00
David Yat Sin eb1283f377 Add query for mwaitx support
Change-Id: I775234ff570e3cedacd68adb4617e62dce76bd9e
2023-03-28 12:11:55 -04:00
David Yat Sin 2c92e790f0 Add display for IOMMU Support
Change-Id: I5af127ef1f9c1ae4b3b86b9e38272eb4f032191a
2023-01-20 02:56:45 +00:00
David Yat Sin c6b1707d0e Add fields for CP firmware and SDMA engine ucode
Change-Id: I796b5a1c1e8be7fedda6207bcb740e3956aef8b2
2023-01-05 23:42:03 +00:00
Johannes Dieterich 94b4b3f0a6 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
2022-11-21 18:11:31 +00:00
Sean Keely 4f1b5ed4b8 Correct include paths for new directory layout.
Depends-On: I5e11e72848633dcc749d1e92705a8e3be67f793d
Change-Id: If743d015bb9c7c6fb179e259e2d4eb69be60e383
2022-05-06 01:15:21 -04:00
Mike Li b6dc27f0b3 Add ASIC revision
Signed-off-by: Mike Li <Tianxinmike.Li@amd.com>
Change-Id: I8f6bbf39e4cf85bb03fd6c0de7afe5f9e6666ba5
2022-03-16 00:51:33 -05:00
Shweta Khatri cf92f649ab Fixed some errors in rocminfo reported by lint tool
Change-Id: Ie7852c2003c10847226a5df23c4e85fbe89dad43
2022-02-16 17:05:21 -05:00
Sean Keely 7766360dd6 Close /dev/kfd after access check.
Cleanup dangling file handle.

Change-Id: I37bc42a2ffb7122f441cbf8a09c141d4396db928
2021-10-29 20:23:32 -05:00
Chris Freehill 10da0a71da Exit earlier if prerquisites are not met
Change-Id: I1c861234986013742ce606ecffb5d9a7db697d05
2020-11-11 20:49:26 -05:00
Ashutosh Mishra 605b3a5105 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
2020-07-09 18:38:46 +05:30
Chris Freehill 7624cc1008 Correct spelling of output message
Change-Id: Id7789e622ea76cc53c3be719798c3c1f90ede6e2
2020-05-01 13:22:50 -04:00
Matt Arsenault cd4b7cea85 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
2020-05-01 10:14:21 -04:00
Ramesh Errabolu a1b4a580fc Extend rocminfo to print UUID of ROCm devices
Change-Id: I258962046e6d05dda91a8c48af646e50500b2d53
2020-04-13 20:42:43 -05:00
Wilfried Holzke 6f140e5391 Fixed sizeof(err_val) to return the number of characters in the array
Change-Id: I7e4f04d10b2f9cc9dbed2431e53b5ebc540acf56
2019-08-21 16:12:55 -05:00
Chris Freehill 141592e4f3 Correct check for video group membership
* Continue with rocminfo even if video and kfd check fail.
* Color code informational lines (white) and warnings (red)

Change-Id: I739034c932fffca0924abc93ae9a929664a3e182
2019-07-15 23:14:12 -05:00
Ramesh Errabolu 84039ef53f Improve error message reporting (#13) 2019-06-19 13:44:12 -05:00
Chris Freehill 7b98323823 Add some missing HSA info. fields 2019-06-19 13:44:12 -05:00
Chris Freehill ad54c50aba Add hex representation of some values to output 2019-06-19 13:44:12 -05:00
Siu Chi Chan 6ccaea7580 change naming from Dim[n] to (x,y,z)
print out the max grid/group size before the "per Dimension" info
2019-06-19 13:44:12 -05:00
Siu Chi Chan 590f612fd5 fix incorrect tyep casting for workgroup_max_dim and grid_max_dim 2019-06-19 13:44:12 -05:00
Chris Freehill 5c6e06c80f Rename to rocminfo
Change-Id: Ifd0ba9aaa4078dc2771e15bb254ba1c4ec2acf1e
2017-11-03 14:04:51 -05:00