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

44 Коммитов

Автор SHA1 Сообщение Дата
Danylo Lytovchenko f7338717ae SWDEV-470698 - fix formatting, add format check workflow (#657) 2025-08-20 19:58:06 +05:30
Xie, Pengda 9cbbee4d6e SWDEV-520384 - Improve Fat Binary loading latency (#390)
Init and fini kernel needs to be launched when we load and unload code object. Avoid looping through all kernels within a code object just to run the init and fini kernels. Compiler currently only generates 1 init and fini kernel.

[ROCm/clr commit: cd46294b31]
2025-08-05 14:02:05 -07:00
MartinezFernandez, Juan 966157cd5b Remove PCH code: the code related to PCH is dead and not used (#66)
cherry-pick of compute/ec/clr/+/1184122

Co-authored-by: Juan Manuel Martinez Caamaño <juamarti@amd.com>

[ROCm/clr commit: f580632174]
2025-03-28 10:36:19 +01:00
Ioannis Assiouras 407d1346f2 SWDEV-463865 - changed device,roc and pal namespaces to be nested under amd
Change-Id: Icad342843c039c634e249a13a7aa31400730b1dd


[ROCm/clr commit: 775dc204aa]
2024-06-07 12:23:06 -04:00
Jacob Lambert 6733795fee SWDEV-371628 Use integrated Comgr action to link ROCm device libs
Previously, we used the following approach and Comgr actions
for device lib linking:

    AMD_COMGR_COMPILE_SOURCE_TO_BC (compile with clang driver)
    AMD_COMGR_ADD_DEVICE_LIBRARIES (link in device libs with
      llvm-link API)

However, the clang driver can link in device libraries as part
of compilation, assuming a --rocm-path is set. In this context,
this is accomplished by using the following Comgr action instead:

  AMD_COMGR_COMPILE_SOURCE_WITH_DEVICE_LIBS_TO_BC (compile and
    link in device libs with clang driver)

Change-Id: Ie0bbee7d9a12672536b6d751056a941128ed58be


[ROCm/clr commit: 6311ed8a8e]
2024-03-13 20:34:59 -04:00
German Andryeyev a8b35c3a18 SWDEV-404889 - Don't report trap handler
Trap handler shouldn't be reported for debugger and RGP

Change-Id: I149dacfed49584503c1874120d5f552fdec323a7


[ROCm/clr commit: 8f9a20738e]
2024-02-22 14:49:54 -05:00
German c3d48d80fa SWDEV-404889 - Debugger support, trap handler
Add trap handler code into runtime and compile/load during
device initialization. The current interface for trap handler in
PAL is obsolete and the new interface will be provided later.

Change-Id: I1fa702c5d1f2e6731f781369c980d546cf422328


[ROCm/clr commit: e1d34cb24f]
2023-09-19 16:05:02 -04:00
German 5d9912f48b SWDEV-407533 - [ABI Break]Remove Wavelimiter
Change-Id: I6a2f6fb5a0c3acea93fa0200a69679783e76f5bd


[ROCm/clr commit: 7be3a5e33e]
2023-09-07 09:58:41 -04:00
Jacob Lambert 1ed5b0b9c5 Revert "SWDEV-410182: Link device-libs when compiling source to bitcode"
This reverts commit 58e62063f3.

Reason for revert: There are currently some outstanding issues with the COMPILE_SOURCE_WITH_DEVICE_LIBS Comgr action (https://ontrack-internal.amd.com/browse/SWDEV-386072). Once these LLVM issues have been resovled, we can safely re-apply this patch

Change-Id: I8501967af8496ea50d6e4a97399e45db51bbed1e


[ROCm/clr commit: 19526e46e6]
2023-09-06 21:34:03 -04:00
Juan Manuel Martinez 58e62063f3 SWDEV-410182: Link device-libs when compiling source to bitcode
This is related to SWDEV-410182, but it's not enough to fix it.

Functions from device-libs are precompiled into llvm-ir in a "target agnostic" way
(in reality, it's not 100% target agnostic, which brings us many headaches).

When linking builtins (like device-libs) from the command line, we use the flag
-mlink-builtin-bitcode. The difference between regular linking of bitcode and
this flag is that the later propagates target-specific attributes. If this
attributes are not propagated, we can end up with incosistent target attributes.

Comgr provides the action AMD_COMGR_ACTION_COMPILE_SOURCE_WITH_DEVICE_LIBS_TO_BC
for this exact reason. The old action is currently deprecated and this one should
be used.

Change-Id: I518415214debdf4fedf0b1d81456d6e9fb8a3d19


[ROCm/clr commit: f3dc04a50d]
2023-08-30 04:24:17 -04:00
Jacob Lambert 52eaffa1a4 Revert "SWDEV-371628 - Shift device lib linking into clang driver"
This reverts commit 2e664d2492.

Reason for revert: Performance regressions and failures observed. Need to investigate those and before re-applying patch

Change-Id: I42ba0605797f9bdcfb5d5102927dd01405cf05e3


[ROCm/clr commit: 8047d8e3e8]
2023-06-15 00:56:08 -04:00
Jacob Lambert 2e664d2492 SWDEV-371628 - Shift device lib linking into clang driver
Previously, we used the following approach and Comgr actions
for device lib linking:

    AMD_COMGR_COMPILE_SOURCE_TO_BC (compile with clang driver)
    AMD_COMGR_ADD_DEVICE_LIBRARIES (link in device libs with
      llvm-link API)

However, the clang driver can link in device libraries as part
of compilation, assuming a --rocm-path is set. In this context,
this is accomplished by using the following Comgr action instead:

  AMD_COMGR_COMPILE_SOURCE_WITH_DEVICE_LIBS_TO_BC (compile and
    link in device libs with clang driver)

Change-Id: I661465865365afecc44aa15d4df91bfab361af8d


[ROCm/clr commit: a4c5c44008]
2023-05-17 17:40:56 -04:00
taosang2 632822bdf5 SWDEV-380903 - Add program lock
Create seperate locks for program and HSAIL

Change-Id: I7c826ed9c2f2d839d359e5158f578830655616fd


[ROCm/clr commit: 82d2213cfa]
2023-04-05 07:50:16 +00:00
Juan Manuel MARTINEZ CAAMAÑO d2cae2aa50 SWDEV-286150 - [NFC] Refactor setLanguage method into a static function called getCOMGRLanguage
* Return the result by value and not through a pointer passed by
parameter

Change-Id: I8f872c95c4a330bebe299d486fb73f36660b469c


[ROCm/clr commit: 37849a0726]
2023-04-05 07:47:02 +00:00
Jacob Lambert c013a1c39b SWDEV-376413 - Revert "SWDEV-376413 - Replace deprecated Comgr device-lib action"
This reverts commit 8da846db0a.

Reason for revert: Test failures with Luxmark, blender, and Indigobench. Need to investigate before re-applying

Change-Id: I6b08273a8f9c8bcaa4e7a06cd42d15048e52ca2a


[ROCm/clr commit: 5168485d23]
2023-02-09 10:02:47 -05:00
Jacob Lambert 8da846db0a SWDEV-376413 - Replace deprecated Comgr device-lib action
The Comgr ADD_DEVICE_LIBRARIES action has been deprecated. In place
of the previous two-action approach:

    AMD_COMGR_COMPILE_SOURCE_TO_BC
    AMD_COMGR_ADD_DEVICE_LIBRARIES

We can now use a single combined action:

    AMD_COMGR_COMPILE_SOURCE_WITH_DEVICE_LIBS_TO_BC

This new action more closely alings with how device library
management is done by the clang driver.

Change-Id: Id844e9031a1896dedeacec453440b9babc4b111a


[ROCm/clr commit: 0969056f66]
2023-01-20 15:52:00 -05:00
Juan Manuel MARTINEZ CAAMAÑO 16a5bfd654 SWDEV-287018 - Remove requiredDump argument from Program::linkLLVMBitcode
Weirdly, the `requiredDump` argument to linkLLVMBitcode was used to enable/disable
the keeping temporary bytecode files (those generated by -save-temps=all) after linking.

This patch removes this argument as there is no obvious benefit from keepeing it
(the user would only rely on -save-temps=all to control this).

Change-Id: I0c00486f95eb1d4e296b5247c488407c47f0b2d9


[ROCm/clr commit: 8ab3fd58cf]
2023-01-16 03:34:21 -05:00
Maneesh Gupta 92f6e1a0d2 SWDEV-350289 - Fix build warnings due to file re-org
Change-Id: I0066fa163b9f25fdde4c5b3baed1ef0654390c06


[ROCm/clr commit: 289062682a]
2022-08-10 03:05:56 -04:00
German Andryeyev eccf328c14 SWDEV-307184 - Make sure runtime passes CO version into comgr
Disable devlib linking when runtime links multiple objects from
the app. Otherwise devlibs will be linked twice and may cause
undefined behavior with COv5.

Change-Id: I3b8640c64ff898893225fe3af5b4b4a32d42bf40


[ROCm/clr commit: c275d9b4b3]
2022-04-25 09:53:59 -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
anusha GodavarthySurya 02e46ec231 SWDEV-284895 - Adding kind metadata and launch init/fini marked kernels
Change-Id: If2b21c4b98567632c426943e0b69aca8d6f1ec2a


[ROCm/clr commit: 102aa9d6d9]
2021-12-01 08:17:44 -08:00
Jatin Chaudhary f020572d6e SWDEV-299162 - Add new comgr API to demangle names
Change-Id: I84174d7e40e9afff9a8ea135abadb69d580478e0


[ROCm/clr commit: b5a57327bb]
2021-09-08 00:35:34 -04:00
Jason Tang 9dd3967661 SWDEV-1 - Correct class name
Change-Id: I20d7092e010cabae6ac1a4eb39a62112fe4c6629


[ROCm/clr commit: 75cafd85b8]
2021-08-25 16:31:46 -04:00
Jason Tang 91dc2d93f9 SWDEV-297294 - Make sure the binary ISA is compatible with the agent ISA
Change-Id: Idf86714d1a494d24faa665c9fede1e776ce253f1


[ROCm/clr commit: cb41710384]
2021-08-22 23:56:08 -07:00
vpykhtin a3b0a8aed0 SWDEV-1 - OpenCL binary substituion feature based on source program text hash matching.
This patch allows to substitute binary for the opencl program. It supposed to be used as:

1. Run the opencl program with -save-temps.

2. Open the cl temp and find the following text in the program header:
    Hash to override:
	Source: 0xd66bcfa20e69e605
	Source + clang options: 0x656a9dd8aedcbfb6

3. Create config file (ascii text) with a pair(s):

    <hash> <path_to_binary_to_substitute>

    where hash is the hex value from step 2 (without leading 0x), you can use either hash
    depending on what you're going to match:
	only the source text of the program or along with it's clang options.

4. Set the env variable AMD_OCL_SUBST_OBJFILE to the path of your config file.

5. Rerun the opencl program.

Change-Id: I977c80fe529ea14458194918c6ddfbe2de6a8857


[ROCm/clr commit: 51cc9c2f8c]
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
Jason Tang 6cd1f5854e SWDEV-277566 - Separate code object loading from building
Change-Id: I87b8178f55e8ef23762dfe11fab71665ba680f00


[ROCm/clr commit: 211ba25b4e]
2021-05-13 08:41:35 -04:00
Vladislav Sytchenko 7b3014ec69 SWDEV-280473 - Remove HSAIL support from the ROCm backend
In adition to removing the HSAIL logic from the ROCm backend, guard all
of the HSAIL includes in the common layer behind the WITH_COMPILER_LIB
define. This is to avoid including HSAIL headers when building with
no support for it.

In common logic replace the use of the aclType enum with the new
Program::file_type_t enum. This is essentially a local copy of the HSAIL
enum to avoid including any HSAIL headers.

Change-Id: Ica0651d1b29dfccc255cc584eb82a5cb35e1b520


[ROCm/clr commit: cbeb372e46]
2021-04-12 14:55:06 -04:00
cjatin 43a470093d SWDEV-252745 - Adding precompiled headers to build option
Change-Id: Iab03e8a75215d80c91817ee0227d034fefa9dfad


[ROCm/clr commit: 5cfea2981b]
2021-02-09 23:33:55 -05:00
Tony Tye 902cf1a239 Update code object handling for GSL, PAL and ROCm
- Correct GSL path to report targets using the TargetID syntax.

- Correct GSL path to check compatibility of code objects when
  loading.

- Add concept of an device isa and create a registery used by ROCm,
  PAL and GSL.

- Support XNACK and SRAMECC target features consistently for PAL and ROCm.

- Correct logic for NullDevices and asserts to avoid memory coruption.

- Allow all NullDevices to be created for HIP.

- Numerous other code improvements.

Change-Id: I40abf3d2b22249c1492d1af5919665f8184f4e0e


[ROCm/clr commit: c7e8d91e14]
2021-01-14 11:11:51 -05: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
kjayapra-amd a3212c53b7 SWDEV-241896 - Remove extern support in ROCclr/HIP since compiler added Texture Reference support.
Change-Id: I2cf27e13a53860fe11e9245c9cbdcb8bd88a7872


[ROCm/clr commit: 4071cf1a16]
2020-09-25 10:20:16 -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
Tao Sang f3b85497ae Replace private libelf with elfio
Change-Id: I4c630d78f7bf23dda85ec8480bb2790864405657


[ROCm/clr commit: e986f5c820]
2020-08-26 12:32:13 -04:00
Jason Tang fdf3ebad76 SWDEV-232197 - Use TargetID for action_info_set_isa_name()
Change-Id: I6661a2bbc2e55586c1b5029694d67cb54a4f23a6


[ROCm/clr commit: 65f4230494]
2020-07-22 13:47:17 -04:00
kjayapra-amd 701914416e SWDEV-243423 - Avoid repeated metadata processing if the unbundled binary_ptr is same.
Change-Id: I71e008021b728dec61187d9ff29483ad8c4cad5c


[ROCm/clr commit: e993bf9f47]
2020-07-10 10:35:16 -04:00
Matt Arsenault d2cb056d06 Remove include/ from #includes
These are unnecessary and an obstacle to producing a relocatable
package.

Change-Id: I0059bf7a2d11fcece0cd7ab47d7545d0df4d7099


[ROCm/clr commit: 1d267c9c08]
2020-05-19 19:35:09 -04:00
Michael LIAO b785d25506 Clear executable permission.
Change-Id: Ia0d363b1ba89d7947e5b5a55cb67edba86f0515e


[ROCm/clr commit: 503ef06555]
2020-05-07 10:38:58 -04:00
kjayapra-amd 68fc604f5d SWDEV-216213 - Function to lookup module functions from COMGR.
Change-Id: I3890fb188b5b3ae44d2bb161d1b7e75228e30942


[ROCm/clr commit: d961c64b00]
2020-03-18 12:45:21 -04:00
German Andryeyev 801fe99636 SWDEV-222307 - Add CMake support for PAL
Remove dependency on COMGR headers from backends.
Remove GFX103 PAL defines.

Change-Id: I6ff76dca2a0c84bc191e8fc8b639f2f5872d2085


[ROCm/clr commit: 1be1e69f2a]
2020-02-18 10:56:31 -05:00
Laurent Morichetti b3297f189d Replace cl_* integral types with standard types.
cl_bool -> bool
cl_int -> int32_t
cl_uint -> uint32_t
cl_long -> int64_t
cl_ulong -> uint64_t
cl_float -> float
cl_double -> double
cl_bitfield -> uint64_t

Change-Id: I840c8993b55f98f5b745d21e27f5f28233647a58


[ROCm/clr commit: d9d9c69399]
2020-02-12 13:16:06 -08:00
Laurent Morichetti e284923583 Update copyright info
Change-Id: Ia4f9ff0f5f873b4223a8cca154188bb0d2f1abba


[ROCm/clr commit: b4c6143a2f]
2020-02-04 09:26:14 -08:00
Laurent Morichetti 011f3e945b Merge branch 'origin/pghafari/vdi-prototype' into lmoriche/amd-master
Change-Id: Id3b833d405596735becb3346f3b08c6da57033fe


[ROCm/clr commit: 20c7173849]
2020-01-30 20:12:13 -08:00