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
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_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
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
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
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
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
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
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
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
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
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
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
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
* Continue with rocminfo even if video and kfd check fail.
* Color code informational lines (white) and warnings (red)
Change-Id: I739034c932fffca0924abc93ae9a929664a3e182