55 Commits

Auteur SHA1 Bericht Datum
Sourabh U Betigeri fdc1660dfa SWDEV-565304 - Pass numa node to migrate pages correctly (#1729)
* SWDEV-565304 - Pass cpuId of the the thread currently running

* SWDEV-565304 - Numa id to be returned

* SWDEV-565304 - Numa id to be returned
2025-12-19 13:36:53 -08:00
systems-assistant[bot] b002c6a739 SWDEV-538607 - Add SIMDe as a build dependency, remove naked intrinsic use. (#500)
Co-authored-by: Alex Voicu <alexandru.voicu@amd.com>
Co-authored-by: Ioannis Assiouras <Ioannis.Assiouras@amd.com>
2025-12-15 17:40:51 +00:00
MachineTom fb006546d0 SWDEV-1 - Fix a typo (#1615)
* SWDEV-1 - Fix a typo

Fix a typo.
Remove unnecessary log.

* Removing patch

---------

Co-authored-by: geomin12 <geomin12@amd.com>
Co-authored-by: Scott Todd <scott.todd0@gmail.com>
2025-11-03 12:59:00 -08:00
MachineTom eb69a455ed SWDEV-558844 - Cleanup Os header (#1530)
Remove codes that aren't used in Os header.
2025-10-27 11:52:31 -04:00
MachineTom 5f76cb916d SWDEV-555888 - Refactor Numa code (#1191)
1. Create a set of mini numa interface.
In Linux, the interface is based on system call rather than libnuma.
In Windows, the interface can also work, but the policy class is dummy.
Different from Linux, Windows doesn't provide numactl tool or numa lib to setup numa policy, thus
the default policy is followed in Windows, that is, using the closest host numa node to allocate
pinned host memory in hipHostMalloc().
To get the closest host numa node of a GPU device, you need query the new attribute
hipDeviceAttributeHostNumaId. Then you can create a thread with CPU affinity on the numa node.
For example, reference the test in hip-tests/catch/perftests/memory/hipPerfHostNumaAllocWin.cc.

2. Remove pfnSetThreadGroupAffinity and pfnGetNumaNodeProcessorMaskEx as the functions have been exposed since Win7 and Win server 2008.

3. Other minor fixes.
2025-10-23 21:56:15 -04:00
Danylo Lytovchenko 2ff2316227 Adjust clang format to the new versions, revert broken macro layout (#714) 2025-08-22 17:23:22 +02:00
Danylo Lytovchenko f7338717ae SWDEV-470698 - fix formatting, add format check workflow (#657) 2025-08-20 19:58:06 +05:30
Andryeyev, German 72b9408fed SWDEV-547108 - Fix compilation errors under Windows (#867)
Interop and numa are not enabled.

[ROCm/clr commit: 0ac913e64c]
2025-08-17 02:33:31 -04:00
Assiouras, Ioannis a7ed228997 SWDEV-543340 - Remove shared memory objects after IPC event cleanup (#745)
This change ensures that shared memory objects (e.g., files in /dev/shm)
are unlinked once all related IPC events have been destroyed.

[ROCm/clr commit: dc34af61d7]
2025-08-12 21:23:09 +01:00
GunaShekar, Ajay 8e1f5f50cd SWDEV-541623 - do not print hip library path on console (#707)
DeviceTest.exe Unit_Uuid_FntlTstsFor_SetEnv_HIP_VISIBLE_DEVICES

[ROCm/clr commit: b568971718]
2025-07-10 12:07:03 -07:00
Kudchadker, Saleel 13117b0ecd SWDEV-535490 - Fix build break on windows (#618)
[ROCm/clr commit: 4c2405b108]
2025-06-24 18:34:55 -07:00
Kudchadker, Saleel 3c9f80b4e4 SWDEV-535490 - Improve logging (#441)
- Include HIP version/githash in the logs
- Add a new method to print library path

[ROCm/clr commit: 5d53c83806]
2025-06-24 13:00:00 -07:00
Tim Gu 8fcbc2acfe SWDEV-502248 - Parse file path with space characters
Signed-off-by: Tim Gu <Tim.Gu@amd.com>
Change-Id: I67fb9cf5559c9c06f24627a1b25fec3e89b2d1cf


[ROCm/clr commit: 84a867fb73]
2025-02-18 10:31:21 -05:00
German Andryeyev 74d80fb509 SWDEV-440746 - Remove obsolete code
The "optimized" version of memcpy is outdated and
was used in win32 only.

Change-Id: I7f2e0e9051e37cec95438266824b5b0025c324c6


[ROCm/clr commit: 7448113cfc]
2024-04-22 09:56:42 -04:00
Ajay c9c3d951f2 SWDEV-421102 - make clr compatible with c++20
Change-Id: Ia692817232caa3ee97dc0b2139645a0474b582e1


[ROCm/clr commit: 2bae1b1387]
2023-09-18 11:28:29 -04:00
Satyanvesh Dittakavi 92c16d7d04 SWDEV-419034 - Use MADV_HUGEPAGE for large host allocations
Change-Id: I80bb1839cdd47eb64a97467c8b01fcdf37195ad5


[ROCm/clr commit: 94e70bee26]
2023-08-30 14:03:26 -04:00
Jaydeep Patel dcaa21376f SWDEV-417691 - Error handling for MemoryMap OS calls.
Change-Id: I0a823289b274e118c8440f2d372a5216bf4ba6aa


[ROCm/clr commit: 7a10423a44]
2023-08-21 00:01:06 -04:00
German af5944dc71 SWDEV-311270 - Add IPC support for memory pools
Initial implementation for hipMemPoolExportToShareableHandle,
hipMemPoolImportFromShareableHandle,
hipMemPoolExportPointer and hipMemPoolImportPointer

Change-Id: I0ebdc48e9163b394ded560adca6c38bbc5aee7d1


[ROCm/clr commit: 1a0c3e4dc4]
2023-06-15 11:36:52 -04:00
Saleel Kudchadker 4fca5a6655 SWDEV-355540 - Do not reset core affinities
- Do not reset core affinities when spawning new threads

Change-Id: I26a12075a1ff197bc217aafb9ba18ffbb019ef43


[ROCm/clr commit: 4a73fbec00]
2023-04-26 16:52:37 -04:00
Ioannis Assiouras 57b1f696ec SWDEV-369548 - Added getProcessId function in Os:: and change log functions to use that.
Change-Id: Ib64ee4d65a5212af7a4a95f80173b7ff8382340f


[ROCm/clr commit: 7631ba8b4d]
2022-12-05 23:59:25 -05:00
kjayapra-amd c5c1b7fd56 SWDEV-241902 - Using COMGR APIs for extracing code object.
Change-Id: I96f1cee9c28f89f0b0fa5af0c2ae7966beb3207d


[ROCm/clr commit: 0d9e1de4e3]
2022-11-17 11:09:59 -05:00
Julia Jiang a8c33d177a SWDEV-357122 - fix failure in vdi so as to handle unreasonable input size in MallocManagedNegativeTest
Change-Id: I1ed1916b652afc67327b0935c3c60fc2a404df30


[ROCm/clr commit: dacd55f3d7]
2022-10-20 12:19:22 -04:00
haoyuan2 6ed700cca8 SWDEV-333187 - Support IPC in HIP runtime on Windows
enable shared memory based IPC

Change-Id: Ic1ad8d426863c2137747a3d468fe02d073f5d248


[ROCm/clr commit: 424c4ce5c4]
2022-04-27 23:05:56 -04:00
Maxime Chambonnet 38928e85c1 SWDEV-1 - ROC CLR typos
This is cherry-picked from this github issue:
https://github.com/ROCm-Developer-Tools/ROCclr/issues/28

Change-Id: I236f4f25a2dabe05883159af0fab0bad06ab0fd0


[ROCm/clr commit: d45794e985]
2022-04-11 14:24:39 -04:00
Jeremy Newton 2e2f21df24 SWDEV-323669 - Improve arch detection
- Clean up detection by using visual studio macros to detect arch; I
  didn't list all possible ARM platforms (can be done later if desired)
- Fixed two incorrect uses of !defined(ATI_ARCH_ARM) to instead use
  defined(ATI_ARCH_X86), as they contain X86 specific code
- Fixed one use of __ARM_ARCH_7A__ to use ATI_ARCH_ARM instead

This is an improvement to the fixes in the last patch for SWDEV-323669

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


[ROCm/clr commit: 00efdc1cd6]
2022-04-08 12:21:58 -04:00
Saleel Kudchadker f99304adcd SWDEV-322225 - Use numa_allocate_bitmask
- Fix a crash with AMD_CPU_AFFINITY=1 as numa_bitmask_alloc isnt the
right api to allocate bitmask
- Do not set affinity for ROCr thread. It worsens performance rather
than any improvement.
- Fix regression from my previous change for event handler.

Change-Id: I3ea75adc2a6333f29752283eddd5b555e9b58cc5


[ROCm/clr commit: 802c2c8a9f]
2022-03-26 13:24:51 -04:00
Satyanvesh Dittakavi 85c2cac111 SWDEV-306939 - Fix vdi errors/warnings by CppCheck
Change-Id: I56d910f8363787f1050d5d7e8064ed553c5827fd


[ROCm/clr commit: e20dd61932]
2022-01-12 00:22:16 -05:00
Saleel Kudchadker dc7a87fad8 SWDEV-299893 - Fix PAL/lnx build
Change-Id: If4408a81d2dc8686c8e805a7697a7d9b2589c864


[ROCm/clr commit: 1e6cc5a2fa]
2021-11-23 08:09:33 -08:00
Saleel Kudchadker 04a391004a SWDEV-299893 - Set preferred node affinity
Set affinity to the closest node of the current GPU. This reduces
the latency to fetch kernel args since device would query the CPU cache
of core which did the dispatch. This behavior is controlled with
AMD_CPU_AFFINITY env var(disabled by default)

Change-Id: I65afba62cb818ea25a311b88d1c0dd5c51330292


[ROCm/clr commit: b192beea52]
2021-11-19 04:42:42 -05:00
vpykhtin f6946fb86d SWDEV-1 - fix line endings for .asm files
Change-Id: I8cf23829184618e41789220e43c00acc0e408fa5


[ROCm/clr commit: 4be447ab8d]
2021-08-22 23:56:08 -07:00
agunashe 49f0546637 SWDEV-293742 - Update copyright end year VDI repo
Change-Id: I69d2fea4a7a43adf96ccea794270e4af991c5261


[ROCm/clr commit: d96481fb36]
2021-08-22 23:56:07 -07:00
Saleel Kudchadker ce26a73ca9 SWDEV-260448 - Honor NUMACTL for Direct Dispatch
Setting AMD_CPU_AFFINITY=1 will keep Async Handler thread within the
bounds set by numactl.

Change-Id: Id01b30df5127d65c29ac072bf74a04986b7128de


[ROCm/clr commit: cd21af757e]
2021-08-22 23:56:07 -07:00
Saleel Kudchadker f42ed0672d SWDEV-280773 - Log affinity reset
Change-Id: I101c14174097d262d5d5b924cb31a69483a49c04


[ROCm/clr commit: df5b6cf202]
2021-05-11 15:52:55 -07:00
Saleel Kudchadker 4b03f02a61 SWDEV-280773 - Honor CPU affinity with env var
Setting AMD_CPU_AFFINITY = 1 will make runtime honor core affinity that
the process may set. This is disabled by default as it can prevent
worker thread or any thread that runtime creates from getting scheduled
thus affecting performance.

Change-Id: Ibe4cc95e7b99caee5ce750b7bf66e09e999cc9a3


[ROCm/clr commit: 1398719b0d]
2021-05-11 18:21:56 -04:00
Jason Tang 64f4e4c01c SWDEV-3 - Backport M0 changes
Change-Id: I36f676713442479ede142b7e887656f0b658bc7b


[ROCm/clr commit: 8d01cbddbe]
2021-03-10 10:25:42 -05:00
Jason Tang 318c9e1080 SWDEV-1 - Fix warnings when building with clang++
Change-Id: Idebd2b618b9a3360147984a0e33852dbe2e65818


[ROCm/clr commit: 0d47b06928]
2021-02-18 10:02:46 -05:00
German Andryeyev d43cf72481 SWDEV-271888 - Remove an explanation link
Change-Id: I157adac7a248d50ee8db677c19be20c00fcd5ecc


[ROCm/clr commit: 47f8d55313]
2021-02-05 17:28:28 -05:00
kjayapra-amd 552218f005 SWDEV-261215 - Updating file handle APIs with file sharing option to accomodate back to back hipModuleLoad calls.
Change-Id: I8fd833b678ca38c60e2d7d02295fd01df0af5592


[ROCm/clr commit: e8208de6c1]
2021-01-28 09:47:41 -05:00
Rahul Garg 22fb358b02 Add MemoryMapFileTruncated function
Change-Id: I26d2a9fbac668cbac284bdfad0d7912db521dc70


[ROCm/clr commit: 5ff3010e1b]
2020-10-20 20:25:27 -04:00
Jason Tang 091f1e8e85 Change file mode 755 back to 644
Change-Id: I4ba5d66997ffd3331c56674d4bf805160dcdf049


[ROCm/clr commit: 25cc965c76]
2020-10-19 15:09:32 -04:00
Vladislav Sytchenko f092eeb18e Fix Windows legacy LLVM build
The os.hpp header gets added to the include path of legacy llvm via the compiler lib. Having "windows.h" included causes a lot conflicts with LLVM headers, as they forward declare many Windows types. Best to not include it here.

Change-Id: I60c44a8d28660368f1a4a95741e1053ef3528fa1


[ROCm/clr commit: e1b916260a]
2020-09-21 11:52:01 -04:00
kjayapra-amd b3e8c5cdb0 SWDEV-252542 - Fixing Win Compilation on SWDEV-241902.
Change-Id: If76f79002b265dccf6da4acef1ff9372d8b0a2ff


[ROCm/clr commit: 7462e39954]
2020-09-18 12:11:56 -04:00
kjayapra-amd 3e6cf63a83 SWDEV-241902 - Changes to pass file descriptor and offset to load code object.
Change-Id: I0243cccdeaa533b2a56fde42f12d5424c3b63a3b


[ROCm/clr commit: a66c56d641]
2020-09-15 07:54:24 -04:00
Laurent Morichetti c863b2074b Use std::atomic
Replace amd::Atomic with std::atomic. Remove make_atomic uses by
converting the variable to std::atomic and making sure the memory
order is relaxed when synchronizes-with is not needed.

Delete utils/atomic.hpp.

Change-Id: I0b36db8d604a8510ac6e36b32885fd16a1b8ccfa


[ROCm/clr commit: 5d4b6f74d3]
2020-09-09 14:55:29 -04:00
Tao Sang f3b85497ae Replace private libelf with elfio
Change-Id: I4c630d78f7bf23dda85ec8480bb2790864405657


[ROCm/clr commit: e986f5c820]
2020-08-26 12:32:13 -04:00
Tao Sang 44eb207f8d Apply constexpr on global constant varaibles
When HIP_ENABLE_DEFERRED_LOADING=0, many global variables will be
referenced but they are not initialized in that early time. The patch
will use constexpr to initialze global constant varables in compile
time.

Change-Id: I9d538b7abc6a0ce700ec3332b97fc144db5fc1ef


[ROCm/clr commit: fdef6f722f]
2020-07-22 22:14:13 -04:00
Payam a1d94580ca clean up warnings
Change-Id: I5421ab90234278920e6080599bb40ffcb3eaa04d


[ROCm/clr commit: 94e623181b]
2020-07-16 09:36:26 -04:00
Payam 4e766cc4b2 Reset each thread's affinity to all avilable cpus
reset happens at the start of the thread  SWDEV-240685

Change-Id: I6c35473bab67d02f76a8013ab9394f293c6f2b07


[ROCm/clr commit: 55b5f5f06c]
2020-07-15 09:41:50 -04:00
kjayapra-amd 08036e1ffe SWDEV-232464 - Use Fstat to retrieve file size.
Change-Id: I4051645cd322c2afaf89e014452657db1a1fdc2c


[ROCm/clr commit: c97ef9f84a]
2020-05-12 08:53:51 -04:00
Michael LIAO b785d25506 Clear executable permission.
Change-Id: Ia0d363b1ba89d7947e5b5a55cb67edba86f0515e


[ROCm/clr commit: 503ef06555]
2020-05-07 10:38:58 -04:00