نمودار کامیت

2595 کامیت‌ها

مولف SHA1 پیام تاریخ
Sam Wu 01c1e91c70 Update rocm-docs-core to 1.8.0
Updating past rocm-docs-core 0.x.x requires Python 3.10 (specified in .readthedocs.yaml config)

Change-Id: I3421aa92cda62d48a1466046f1fdeb0a3abf3ef7


[ROCm/ROCR-Runtime commit: 5506b9af7a]
2024-09-19 19:44:53 +00:00
Tony Gutierrez 29de0df770 rocr/aie: Support VMEM handle creation
Adds support for AllocateMemoryOnly inside XDNA driver.

Move the IsLocalMemory() check inside the KFD driver
since the XDNA driver can, and needs to, create handles
on system memory buffer objects.

Changed handle variable name from thunk_handle to user_mode_driver_handle,
which is more representative if we support non-GPU drivers.

Change-Id: I95db9d575afd1ab0ff2de74cea5175d9a12a721b


[ROCm/ROCR-Runtime commit: 4bf102dc6b]
2024-09-19 19:44:53 +00:00
Tony Gutierrez f58a06c656 rocr/aie: Allocate AIE queue's ring buf
Change-Id: I799a8223d695ec5c0ea2eaea012bc1b5d877e103


[ROCm/ROCR-Runtime commit: 54a459c05c]
2024-09-19 19:44:53 +00:00
Kent Russell 7e130369db hsakmt: Fix BUILD_SHARED_LIBS usage
If BUILD_SHARED_LIBS doesn't get set at all, other projects importing
hsakmt may have an inconsistent state regarding SHARED vs STATIC.
Instead of setting the option and setting it as an option(), just detect
the variable and use it

Change-Id: I9d5a5fc6049ca5351f5e7c63d38ee9bfcb89bdad
Signed-off-by: Kent Russell <kent.russell@amd.com>


[ROCm/ROCR-Runtime commit: 2a9572dda0]
2024-09-19 19:44:53 +00:00
Kent Russell 0dafd65205 hsakmt: Remove unused functions
The fmm_node_[added|removed] functions were added in the initial FMM
support, but weren't used. Remove them now since no one's referencing
them

Change-Id: I1e46e57294a72012227b38f46c7099de0b9263be
Signed-off-by: Kent Russell <kent.russell@amd.com>


[ROCm/ROCR-Runtime commit: 3b61f75f49]
2024-09-19 19:44:53 +00:00
David Yat Sin 75e07cc34d hsakmt: Add debug prints to trace mem allocations
Add extra debug prints to trace memory alloc and register

Change-Id: I03d8d7d415565916a8336db6e7063bb7d4cb9102


[ROCm/ROCR-Runtime commit: 0f241d4061]
2024-09-19 19:44:53 +00:00
Ramesh Errabolu 72dc577172 Do not check default value of SVM attribute Granularity
Change-Id: I3cf97fc551259c873351cfd22fc83e8615cc3e56


[ROCm/ROCR-Runtime commit: 71fa3fa19b]
2024-09-19 19:44:53 +00:00
Ranjith Ramakrishnan 2e97c0d3bd Remove license file from hsa-rocr-devel package
License file is already there in hsa-rocr package .Devel package do not need the same

Change-Id: I08cceeb169d0c061078cd495342f78c089087f0d


[ROCm/ROCR-Runtime commit: d60f56ab32]
2024-09-19 19:44:53 +00:00
Tony Gutierrez db03f1130f rocr/aie: Init mem regions for AIE agents
Change-Id: If180bdbcb3eb659f0d05a710526864494316d7a9


[ROCm/ROCR-Runtime commit: a851f73da5]
2024-09-19 19:44:53 +00:00
Tony Gutierrez f096174cfc rocr/aie: Add AMD AIE Embedded Runtime vendor packets
Adds support for the packet interface for interacting with
the Embedded Runtime (ERT) on AIE agents. The ERT is what
interprets command packets send to the AIE agent work
queues.

Change-Id: Id28fb98056b2c046354c446bdc9568d74385bea1


[ROCm/ROCR-Runtime commit: 6abb993f65]
2024-09-19 19:44:53 +00:00
Tony Gutierrez 1103441d22 rocr/aie: Add support for creating AIE queue context
Adds support for initialzing the XDNA driver so that
a hardware context can be created for an AIE queue.

Right now this initializes the device heap in the driver,
gets the relevant tile parameters for the AIE agent,
and creates a hardware context that backs the AIE queue.

Change-Id: Ib90e1bc67a8637f6db3ff2bebe34677843796417


[ROCm/ROCR-Runtime commit: 931733d51a]
2024-09-19 19:44:53 +00:00
Chris Freehill 297ccd2244 hsakmt: Update amdp2ptest.c license to MIT
Change-Id: I1eb814dbb4b420840d9877fc6a4806708754ac69


[ROCm/ROCR-Runtime commit: f8d63e2fb4]
2024-09-19 19:44:53 +00:00
David Yat Sin 3189a6b827 rocr: Remove unnecessary function declarations
Change-Id: Ia2613ce74cac808f9239fc24049b57b7b1abaed9


[ROCm/ROCR-Runtime commit: d6ec7b6489]
2024-09-19 19:44:53 +00:00
David Yat Sin c4874743ce rocr: Fix compile error
Change-Id: Iae6bf08e834a426f6f97cbc51d2a1a38199015bd


[ROCm/ROCR-Runtime commit: 12e299e8d4]
2024-09-19 19:44:53 +00:00
Shweta Khatri 8fc24427e8 Add rocprofiler-register dependency to build
Ensure rocprofiler-register is linked and added to DEB and RPM package dependencies.
Github ticket - https://github.com/ROCm/ROCm/issues/3654

Change-Id: Iaaaca8bfa81ca33da147673ef1be798109b70aa5


[ROCm/ROCR-Runtime commit: c30ff893a6]
2024-09-19 19:44:53 +00:00
David Yat Sin e000dabf8b rocr: Increase queue size for co-op queues
Increase queue-size for co-op queues to 16K to improve performance on
some workloads

Change-Id: I4d3bf0ecbd30ebb648b68d9c5fdabadc670a386c


[ROCm/ROCR-Runtime commit: 924e11ba7f]
2024-09-19 19:44:53 +00:00
David Yat Sin 97489aa2c2 rocrtst: Add negative test for invalid buffer free
Add a negative test to try to free the ring buffer of a queue and
confirm that a memory error is generated.

Change-Id: I4afd95c69c62f7c3e1138d5d6c4a5fd237631e43


[ROCm/ROCR-Runtime commit: 3cb25e5236]
2024-09-19 19:44:53 +00:00
Wang, Yanyao 564ca754d1 Remove hard-coded llvm-project folder for rocrtst
Signed-off-by: Wang, Yanyao <yanyao.wang@amd.com>
Change-Id: I9ba81c1182da812596d7d314f3a6dae7cbcd0c2d


[ROCm/ROCR-Runtime commit: c064218637]
2024-09-19 19:44:53 +00:00
Jonathan Kim 2ecc057548 rocr: Reverse host-device copy engines on GFX94x
GFX 9.4.x has better performance for CPU-GPU copies when using
engines in reverse order from other devices.

Change-Id: I1eaebf0e837bb7f44712f40d5115df618f6a73d7


[ROCm/ROCR-Runtime commit: 509e8d863a]
2024-09-06 19:02:59 -04:00
Jonathan Kim 9e58f63b9f rocr: Fix backwards compatible host-device copies on target engines
If the KFD doesn't support targeting SDMA engines, ensure that ROCr
selects the correct downstream queue type by using an invalid engine.

Change-Id: Ia6848126f67f3d35ab37248633e8e0e6e2d77fff


[ROCm/ROCR-Runtime commit: 24b25003b0]
2024-09-06 19:02:51 -04:00
Kent Russell 9d797771b5 libhsakmt: Prefix global symbols with hsakmt
To support fully-static library ROCm builds, ensure that all global
symbols are prefixed with something meaningful to avoid collisions with
other libraries

A script was made using" objdump -C -t" to get a list of symbols,
then checking if the global symbols have a meaningful prefix (for thunk:
hsakmt or kmt in various cases)

Change-Id: Ifd353f64a3344eb60d1f6c4e041aa20967b38a59
Signed-off-by: Kent Russell <kent.russell@amd.com>


[ROCm/ROCR-Runtime commit: 3da42a0847]
2024-09-06 09:56:07 -04:00
Chris Freehill f0baa90369 Support for not building ROCr
Add cmake variable BUILD_ROCR so that user can elect to not
build ROCr.

Change-Id: I73bd28cde9430ba86aed50fb88ec2e42b3443dbb


[ROCm/ROCR-Runtime commit: a676d8639c]
2024-09-05 23:27:54 -04:00
Saleel Kudchadker 8d1fe1f7ea rocr: Allocate AQL queue on device memory
- Use HSA_ALLOCATE_QUEUE_DEV_MEM=1 to create AQL queue in device
memory.
- Before writing AQL packet header to the queue use an SFENCE to ensure
that there is no reodering of the writes over PCIE

Change-Id: I5eacdc35108c4a1e245c75ae349b7495451aa60d


[ROCm/ROCR-Runtime commit: 3baaa6e9c0]
2024-09-05 17:48:02 -04:00
David Yat Sin 9cdd382185 kfdtest: Fix ISA buffers not executable
Fix for some places where the ISA buffers are not declared as
executable. Previous code in Thunk was blindly setting exec bit on all
memory allocations so this issue was masked.

Change-Id: Ic7a1169c69fb85ff9e8ea7bcc49a1845b37c08ff


[ROCm/ROCR-Runtime commit: fe8d8c15f1]
2024-09-05 16:57:34 -04:00
Kent Russell 418b4d2006 kfdtest: Check for NULL at MCABackend creation
The function can return NULL if it fails to create the backend, so check
for NULL before using it.

Change-Id: I4d6501bffd6dd0fc0d0f2224720f7d6dca1646f3
Signed-off-by: Kent Russell <kent.russell@amd.com>


[ROCm/ROCR-Runtime commit: 545467be04]
2024-09-05 12:07:11 -04:00
Chris Freehill b56dd0ef3b hsakmt: Fix ROCr static lib build in new layout
Change-Id: Idc71524924b96a44d63be9b1d0fccbe0e328d96e


[ROCm/ROCR-Runtime commit: 7e13b9e62f]
2024-09-05 10:26:06 -04:00
Kent Russell 8b98df2d47 hsakmt: Free alloc'd memory
trace is calloc'd but never freed. Free it.

Change-Id: I5795cbe5738f25a9621d24be86abb35c263fa8b7
Signed-off-by: Kent Russell <kent.russell@amd.com>


[ROCm/ROCR-Runtime commit: 4dc9d49aa6]
2024-09-05 10:20:09 -04:00
Shane Xiao 7ec6819ff5 Revert "gfx11 is able to perform atomic ops even PCI reports no atomic support."
This reverts commit 7daedd5eef.
For APU, the PCIe atomic is supported by default. However, the PCIe
atomic feature needs to checked for dGPU. The kfd driver has already
set PCIe atomic support for APUs, so this patch can be reverted.

Change-Id: I131d5b8e095c1104e1695e7cf8b1ed178bccddde
Signed-off-by: Shane Xiao <shane.xiao@amd.com>


[ROCm/ROCR-Runtime commit: 821f6e58f9]
2024-09-05 01:44:16 -04:00
Jeremy Newton 284a1f1dc4 kfdtest: Drop sp3 licensing comments
This is obsolete and can be dropped.

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


[ROCm/ROCR-Runtime commit: c574c81835]
2024-09-04 11:20:38 -04:00
Xuanteng Huang b1b4d4af59 hsakmt: fix spelling error
This was pulled in from:
https://github.com/ROCm/ROCT-Thunk-Interface/pull/107

Change-Id: Ic30e4552a94a212a9cd138f9311b1c85b0c13867


[ROCm/ROCR-Runtime commit: 7a52a45824]
2024-09-04 10:46:39 -04:00
Tom Rix a11a34468d kfdtest: Improve finding rocm-smi
On Fedora, rocm-smi is a standard package and is installed to /usr/bin
So when run_kfdtest.sh is run this error is produced

find: ‘/opt/rocm*’: No such file or directory

First redirect stderr to dev/null on the original search.
Then fall back to either looking for rocm-smi in BIN_DIR or
look for it in the PATH.

Change-Id: I389ed0b9a4a4507263c9eb19894b25326c9a4222
Signed-off-by: Tom Rix <Tom.Rix@amd.com>
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>


[ROCm/ROCR-Runtime commit: b9c6144f23]
2024-09-04 09:20:32 -04:00
Joseph Greathouse cfb1ab45ac hsakmt: Only set exec flag when requested
Previous code would blindly set executable bit on all allocations.

Change-Id: Id1154f08f6ba21c633905fd46b06053994d6f3cc


[ROCm/ROCR-Runtime commit: 75143555fa]
2024-09-03 15:13:56 -04:00
Jeremy Newton 77b61a6c79 Fix permissions on kfdtest
Using "PROGRAMS" and "FILES" without specifying permissions will
automatically select the right permissions.

PROGRAMS is used for executables, FILES is used for data files

Change-Id: I0fb6eff257a8f936848bd648cf877da6dc0b6906


[ROCm/ROCR-Runtime commit: 8fd1b14a42]
2024-09-03 14:11:01 -04:00
David Yat Sin 1c2d70c796 rocrtst: Fix segfault on p2p copies
Fix segfault on p2p copies when 2 agents cannot access each other's
memory (usually because the PCI BAR's are out of range). The
AcquireAsyncCopyAccess function should return NULL in that case, so that
the test can be skipped.

Change-Id: If018f3609dd21a01c56eaec94de3bca52c385c4d


[ROCm/ROCR-Runtime commit: 4ba4867fa5]
2024-09-03 14:06:48 -04:00
David Yat Sin 68bc54da6e Adding clang format files and strings
Adding files to auto-format code using:
bash format

Change-Id: I6a9edf3ff4d1e6102a44c4106e646ff9d63340cc


[ROCm/ROCR-Runtime commit: f505444aaf]
2024-08-29 15:43:41 -04:00
Tony Gutierrez e58ac6b591 rocr: Generalize AMD::MemoryRegion Allocate and Free
Remove KFD-specific Allocate/Free calls from the AMD::MemoryRegion.
The KFD-driver-specific Allocate/Free calls are now implemented in
the KfdDriver. Future changes will migrate the remaining KFD-specific
calls out of AMD::MemoryRegion.

This allows the MemoryRegion to be used across AMD drivers like the
XDNA driver.

Change-Id: Ib6a2a9e5e1a15e61644d2592beb3a8e6578c3010


[ROCm/ROCR-Runtime commit: 68669f4e1a]
2024-08-28 14:35:07 -07:00
Tony Gutierrez 6e02f63333 rocr/kfd-driver: Add initial KFD driver interface
Adds the initial KFD driver interface and use it to open the
KFD from amd_topology.cpp.

This change is to show the direction of the Driver interface for
initially supporting the KFD and to get feedback on the approach.
For now we wrap relevant ROCt calls behind this generic driver
interface so that we can generalize core ROCr components like
MemoryRegion, Runtime, etc.

Now that ROCt is incorporated into ROCr, we can more fully integrate
ROCt into the Driver interface. Ideally, we get to a point where
the generic Driver interface can support KFD, XDNA, and potential
future drivers.

Change-Id: I4573fd6af1f8398233ee9d3814d9f3139dd0279c


[ROCm/ROCR-Runtime commit: c42ff44a6a]
2024-08-28 14:34:54 -07:00
Tony Gutierrez c75f2d749d rocr/xdna-driver: Initial support for amdxdna driver
Change-Id: I319b55d89dc644e7151228cb6c19d1a633171295


[ROCm/ROCR-Runtime commit: 86f40ae489]
2024-08-28 14:34:39 -07:00
David Yat Sin a7b0f541b7 rocrtst: Skip inaccessible agents when importing dmabuf
If some agents cannot access the memory buffer directly, this will cause
the hsa_amd_interop_map_buffer API call to fail

Change-Id: If2f0e1735c2926440d657831de50775d7f304c8e


[ROCm/ROCR-Runtime commit: 2360253b3b]
2024-08-28 15:58:02 -04:00
Shweta Khatri ed5b2e6661 Set internal cache for rocprofiler-register dependency
Change-Id: I8a661818c11c4de0df9743dacb78b7c5163b6da9


[ROCm/ROCR-Runtime commit: da69ffff0f]
2024-08-28 14:48:51 -04:00
Jonathan Kim 0c5509e7c3 libhsakmt: Fix improper type range check in legacy queue creation
Enum type for compute AQL is defined as larger then targeted SDMAs
enum types.  We should only deny legacy calls for SDMA queues that
require targeted engines.

Change-Id: I6386a8700b3b18af825b6f0d2be27052cc8de0f5


[ROCm/ROCR-Runtime commit: ae99effb29]
2024-08-28 13:55:41 -04:00
Tony Gutierrez 64e2d37be8 rocr/aie: Add initial support for AIE agents
This change adds the initial classes for the AIE agent and AIE AQL
queue.

An AIE agent list is added to the core runtime object.

Change-Id: I84b02f52171b80726dfb2c8431582a3ea2986eb3


[ROCm/ROCR-Runtime commit: 8ea62f1cea]
2024-08-27 14:47:05 -07:00
David Yat Sin 5cb81438c7 Set ELF_GETSHDRSTRNDX when cxx compiler is not loaded
Change-Id: Ia26b8999909f688ce78d9bbe4cb2a7262df2ee02


[ROCm/ROCR-Runtime commit: cb672ebcd1]
2024-08-22 17:20:37 -04:00
Joseph Macaranas 194432d95e External CI: Add support for ROCR+Thunk combined repo.
Change-Id: Ib2305d6ed81f29d146c73a4063e08671c8a8273a


[ROCm/ROCR-Runtime commit: be31cca4df]
2024-08-22 12:40:28 -04:00
David Yat Sin de85c5738e rocr: Handle pthread_create returning errors
Rewriting logic to fix issue where pthread_create would return errors
other than EINVAL, and these errors would be ignored.

Change-Id: I573958724dcf886c20e8c14e6a9182303b3ffa06


[ROCm/ROCR-Runtime commit: c8dd4d2b3b]
2024-08-22 12:15:10 -04:00
Lancelot SIX 38e448df2d libhsakmt: Check for KFD 1.13 for debug ioctl interface
Core dump support relies on debugger related KFD ioctl which have been
introduced in version 1.13 of the interface.  However, the code checks
for KFD_IOCTL_MINOR_VERSION (currently 17), making it impossible to
produce core dumps when using some drivers that should support it.

Update the CHECK_KFD_MINOR_VERSION calls in the debugger related ioctl
wrappers and look for KFD 1.13 or above.

Change-Id: I10a7fd03bf8f678b6318d7c25d6a7ded804dac67


[ROCm/ROCR-Runtime commit: d5acab2b39]
2024-08-21 23:45:25 +01:00
Lancelot SIX 808e8e6900 rocr/amd_core_dump: Fix "arithmetic on a pointer to void"
A recent patch introduced a build failure when building with Clang:

    [ 65%] Building CXX object runtime/hsa-runtime/CMakeFiles/hsa-runtime64.dir/libamdhsacode/amd_core_dump.cpp.o
    […]/runtime/hsa-runtime/libamdhsacode/amd_core_dump.cpp:271:29: error: arithmetic on a pointer to void
      271 |       read = pread(fd_, buf + done, buf_size - done,
          |                         ~~~ ^
    1 error generated.

This patch fixes this by making sure the "void *" pointer is converting
to "char *" before doing arithmetic on it.

Change-Id: Ib1663ed30abce76e05f06d042975eccd7d729823


[ROCm/ROCR-Runtime commit: 3475a45137]
2024-08-21 17:19:28 -04:00
Jonathan Kim b6aa5a4c09 rocr: Memory copy based on recommended SDMA engines
Recommended SDMA engines for DMA copies are now exposed for better
GPU-GPU performance. ROCr can now select those DMA engines.

Also lock-in host-device copies to SDMA0 and device-host copies to
SDMA1 for better stability and performance.

Change-Id: Ideff2e13daf537104efecb8b837bd49ee5096cb5


[ROCm/ROCR-Runtime commit: eb30a5bbc7]
2024-08-20 16:22:32 -04:00
Jonathan Kim 2412b27726 libhsakmt: Extend thunk queue creation with recommended sdma engines
Extend the current Thunk implementation of queue creation to target
specific SDMA engine IDs.

Also expose the new recommend SDMA engines per IO link from the KFD
sysfs.

Change-Id: I51f9a0d83c0f1fc4d5dc837f879a7ae332e7d7e9


[ROCm/ROCR-Runtime commit: 2f588a2406]
2024-08-20 11:13:57 -04:00
Yifan Zhang 45979fdfc7 libhsakmt: add OverrideEngineId property
When HSA_OVERRIDE_GFX_VERSION is used, save the overrided GFX
version to OverrideEngineId instead of original EngineId. There
are places where real GFX properties still needed, e.g. CWSR size
calculation.

Change-Id: I9d9149bae465b7cfe55604fc19e7ca34e48b7b1c
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>


[ROCm/ROCR-Runtime commit: 3f1f68c8cb]
2024-08-20 09:10:52 -04:00