27 Commit

Autore SHA1 Messaggio Data
Danylo Lytovchenko 7f906ced10 Revert "rocr: SVMPrefetch to a particular numa node (#1063)" (#2792)
This reverts commit 0ba5a01baa.
2026-01-22 17:26:19 +01:00
Sunday Clement 0ba5a01baa rocr: SVMPrefetch to a particular numa node (#1063)
In order for hipMemPrefetchAysnc_v2() api to work, we need rocr to
migrates the ranges of pages requested to the particular NUMA node in
question, via move_pages().

Signed-off-by: Sunday Clement <Sunday.Clement@amd.com>
2026-01-21 16:52:15 -05:00
Maneesh Gupta 4a9833e70e Revert "Add HasExpertSchedMode device prop (#2241)" (#2371)
This reverts commit c0b4aef5ad.
2025-12-17 21:26:44 -08:00
Filip Jankovic c0b4aef5ad Add HasExpertSchedMode device prop (#2241)
* Add HasExpertSchedMode device prop

* Add unit tests for HasExpertSchedMode

* Add gfx12 check for HasExpertSchedMode prop

* Update gfx major version check and test for ExpertSchedMode

* Minor fix and ROCr version bump

* Update projects/rocr-runtime/runtime/hsa-runtime/inc/hsa_ext_amd.h

* Update projects/rocr-runtime/runtime/hsa-runtime/inc/hsa_ext_amd.h

* Apply suggestion from @dayatsin-amd

* Apply suggestion from @dayatsin-amd

---------

Co-authored-by: Stefan Sokolovic <stefan.sokolovic2@amd.com>
Co-authored-by: David Yat Sin <77975354+dayatsin-amd@users.noreply.github.com>
2025-12-17 17:06:08 +01:00
Mario Limonciello bc5d48e76c Run pre-commit's whitespace related hooks on projects/rocr-runtime (#2130)
* Run pre-commit's whitespace related hooks on projects/rocr-runtime

In order for pre-commit to be useful, everything needs to meet a common
baseline.

Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>

* Add missing semicolon which would block compilation on big endian CPUs

Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>

---------

Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
2025-12-08 07:56:50 -06:00
jonatluu 6b8aae3796 Enable Lintian Support rocm-systems (#1578)
* draft testing fix for no copyright file and no changelog

* test fix no-changelog no-copyright

* changelog copyright fixt

* remove utils.cmake

* rocr lintian

* lintian overrides, copyright, changelog install

* fix lintian overrides install

* comp_type static fix and remove debug logs

* syntax error

* update static build check

* update file permissions to 0755 to fix error control-file-has-bad-permissions 0664 != 0755

* fix lintian errors in rdc and remove logs from roctracer

* lintian error fix rocprofiler

* fix lintian error

* mmove lintian overrides install

* lintian errors fix

* move lintian overrides install

* use changelog already provided by rdc

* fix formatting use existing changelog if provided

* fix formatting use changelog in rocprofiler

* draft testing fix for no copyright file and no changelog

* test fix no-changelog no-copyright

* changelog copyright fixt

* lintian overrides, copyright, changelog install

* fix lintian overrides install

* comp_type static fix and remove debug logs

* fix lintian errors in rdc and remove logs from roctracer

* lintian error fix rocprofiler

* fix lintian error

* mmove lintian overrides install

* lintian errors fix

* move lintian overrides install

* use changelog already provided by rdc

* fix formatting use existing changelog if provided

* fix formatting use changelog in rocprofiler

* remove overrides. Use existing changelog and copyright

* resolve merge conflict

* update license for hsa-rocr. Use NCSA license

* install license

* install license
2025-11-20 11:38:39 -05:00
German Andryeyev 913743d433 Add windows build support into ROCr (#912)
Make sure ROCR can be compiled under windows. Extra setup for the windows build environment is required. The change should not have any functional changes under Linux.
2025-09-19 10:10:17 -04:00
jonatluu 6bc1ea966f fix lintian warning (#696)
* fix lintian warning

* fix lintian warning
2025-08-27 13:53:54 -04:00
Honglei Huang 5e68bd163a libhsakmt/virtio: add virtio support for libhsakmt
This patch adds VirtIO support to the libhsakmt library, enabling communication
 with AMD GPUs via VirtIO.

Details
- CMakeLists.txt: Added a new CMakeLists.txt file for the VirtIO component
of libhsakmt.
- hsakmt_virtio.c/h: Implemented the core VirtIO functionality, including
VirtIO GPU device initialization, command execution, and memory management.
- virtio_gpu.c/h: Contains the implementation of the VirtIO GPU device,
including ioctl handling, shared memory management, and command execution.
- hsakmt_virtio_events.c: Implements event handling for VirtIO, such as event
creation, destruction, setting, resetting, and querying event states.
- hsakmt_virtio_memory.c: Manages memory operations for VirtIO, including memory
allocation, freeing, mapping, and unmapping.
- hsakmt_virtio_queues.c: Implements queue management for VirtIO, including
queue creation, destruction, and updating.
- hsakmt_virtio_topology.c: Handles system and node properties for VirtIO.
- hsakmt_virtio_vm.c: Manages VM-related operations for VirtIO, such as
reserving and dereserving VA space.
- include/linux/virtgpu_drm.h: Contains DRM definitions for VirtIO GPU.

Key Features
- VirtIO GPU Initialization: The library can now initialize a VirtIO GPU device
and communicate with it.
- Command Execution: Supports executing commands on the VirtIO GPU device.
- Memory Management: Provides functions for allocating, freeing, mapping, and
unmapping memory for VirtIO operations.
- Event Handling: Implements a comprehensive event system for VirtIO.
- Queue Management: Allows for creating, destroying, and updating queues
on the VirtIO GPU device.
- System and Node Properties: Retrieves and manages system and node
properties for VirtIO.

Signed-off-by: Honglei Huang <Honglei1.Huang@amd.com>


[ROCm/ROCR-Runtime commit: 48d3719dba]
2025-07-24 23:20:36 +08:00
Chris Freehill 0e860e73b0 rocr/rocrtst: Update to c++17
[ROCm/ROCR-Runtime commit: f1bd89bd0d]
2025-06-30 14:02:24 -05:00
David Yat Sin 39bddd8b9d rocr: support reserving non-registered VA
Extend hsa_amd_vmem_address_reserve/hsa_amd_vmem_address_reserve_align
to support HSA_AMD_VMEM_ADDRESS_NO_REGISTER flag. This allocation can be
used to reserve virtual address ranges that can later be used by
hsa_amd_svm_attributes_set for SVM based memory allocations.


[ROCm/ROCR-Runtime commit: b3c48cc68c]
2025-06-18 18:21:11 -04:00
Chris Freehill 287986ab65 rocr: Add hsa_amd_portable_export_dmabuf_v2
The original version of hsa_amd_portable_export_dmabuf() did not
consider the conditions under which a dmabuf could be shared.
In the new version (hsa_amd_portable_export_dmabuf_v2()), the caller
can specify the flag HSA_AMD_DMABUF_MAPPING_TYPE_PCIE, which means they
want to share the dmabuf over PCIe. In that case, the new code will check
that if it is a PCIe GPU and it is not in a XGMI Hive then if
large-BAR is not supported, we will return an error.


[ROCm/ROCR-Runtime commit: 3a9d14bb66]
2025-06-09 15:42:58 -05:00
Saleel Kudchadker 945d6da90b rocr: return preferred SDMA engine mask
- Add a new AMD extension API to return preferred SDMA engine mask.
This can use used in conjunction with copy_on_engine API to get
optimal bandwidth.


[ROCm/ROCR-Runtime commit: 57c0c643ce]
2025-04-22 13:28:38 -07:00
Cheruvally, Aravindan 69c014290d Enable/Disable rocprofiler-register pkg dependency based on build type (#30)
Co-authored-by: Yat Sin, David <David.YatSin@amd.com>

[ROCm/ROCR-Runtime commit: 20e6c87a09]
2025-02-20 11:07:35 -05:00
Ranjith Ramakrishnan e8b8e92ce3 CMake: Add package conflict for the deprecated package hsakmt
For debian use cases, package conflict is required to remove the
deprecated package during package upgrade Also removed the duplicate
setting of package obseletes in RPM usecase.


[ROCm/ROCR-Runtime commit: 3be9c49b63]
2025-02-07 11:57:32 -05:00
sonadeem 02edf09f87 cmake: Fix BUILD_SHARED_LIBS option and README for it
BUILD_SHARED_LIBS is a global flag so we don't need to set a default
option for it in both libhsakmt and hsa-runtime, only the top level
CMakeLists file. Also updated README to reflect that libhsakmt is
always built statically and gets linked to libhsa-runtime.

Change-Id: I1511f68a268032bec9758bc731d8074f33ec980f


[ROCm/ROCR-Runtime commit: ff01f62777]
2025-01-30 14:17:27 -05:00
David Yat Sin a4ca610829 Set default build to shared libraries
Change-Id: I73eeac3652a69a71b2c0dc2daeabc9af2c0cfd14


[ROCm/ROCR-Runtime commit: 0aebe7f3d0]
2025-01-29 21:24:59 +00:00
Tony Gutierrez ff52d6fc13 rocr: Add WaitMultiple to core Signal
Replaces WaitAny with WaitMultiple to more closely align with the
underlying driver API for waiting on multiple events.

WaitMultiple adds a single parameter, wait_on_all, to the WaitAny
interface providing a single function for waiting on multiple
events when we only need AND and OR semantics for the signal
checking logic.

Change-Id: I68a4a45d48151d9d69aef02fd8f7263b9e6c0e75


[ROCm/ROCR-Runtime commit: 8a38f121ea]
2025-01-27 09:21:43 -05:00
Ranjith Ramakrishnan 0954cb2724 Correct the provides field of hsa-rocr and has-rocr-devel package
runtime and devel packages are providing the hsakmt packages. Only devel package need to provide the same
Change the package replaces/obsoletes field accordingly

Change-Id: Ia1a4f128a1f6928faf57faee5f301a77c21acca2


[ROCm/ROCR-Runtime commit: 2970545ded]
2024-11-08 13:51:10 -05:00
Ranjith Ramakrishnan 7b21e011d2 cmake component grouping should not be ignored
In static build, the dev and binary components are grouped to generate static package
Removed the line that was ignoring the component grouping

Change-Id: Ie0ca9db109f2002891260985634f2e6b1ea7f236


[ROCm/ROCR-Runtime commit: f27ae44b8c]
2024-10-01 14:22:21 -07: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
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
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
Chris Freehill ee266668ab Add PROVIDES "hsa-rocr-dev,hsa-ext-rocr-dev" for RPMs
Change-Id: If2c4ef2dfdb89d4f2287b81e421815b27d0bcfb9


[ROCm/ROCR-Runtime commit: bdefad8028]
2024-07-09 22:51:32 -05:00
Chris Freehill 4bcdb4a2db Fix hsakmt-roct-devel REQUIRES/PROVIDES CPack handling
Change-Id: If8bac85f2f7a23bce1b967fcec25216603b4c7bd


[ROCm/ROCR-Runtime commit: 9830e32e7a]
2024-07-03 16:46:00 -05:00
Chris Freehill c7538dba4e Add preinstall script for build_hsa.sh
This is to fix the situation where libhsa-runtime exists in
/usr/lib. The preinstall script will check for this and ask
the user if they want to delete the old version, or else
abandon install.

Change-Id: I0976b6ec95b9752c95031f1a73fc49a150b02b23
Signed-off-by: Chris Freehill <cfreehil@amd.com>


[ROCm/ROCR-Runtime commit: 4474dcff2c]
2024-06-25 12:50:03 -05:00
Chris Freehill 76d33c555f Changes to build ROCr & thunk (optionally tests) in rocr-runtime repo
Create a new top-level CMakeLists.txt file to control building thunk
and ROCr. kfdtest and rocrtest are built separately.

Most of the cmake code that existed for thunk, ROCr, rocrtst and kfdtest
still reside in their respective CMakeLists.txt files, except the
CPack packaging directives which have been moved to the top-level
CMakeLists.txt.

Change-Id: I1a537359029504af8b1abb324bc6f0d75d98471e


[ROCm/ROCR-Runtime commit: 662f6817d7]
2024-06-24 14:26:21 -05:00