提交線圖

91 次程式碼提交

作者 SHA1 備註 日期
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
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
agunashe 52a1f5dbf7 SWDEV-507967 - Deprecate gfx9, gfx8, gfx7 on Windows
PAL_CLIENT_INTERFACE_MAJOR_VERSION from 872 --> 910

Change-Id: I03dfa2924ccdae4c2f13f09d5f34ee58298e1343


[ROCm/clr commit: ea804e16f8]
2025-02-17 02:59:41 -05:00
victzhan 7cd780c1cb SWDEV-485042 - Remove -I option passed into comgr when file type is not FILE_TYPE_ASM_TEXT
Change-Id: If8e469f881651f7b3dae364e8182ef1ba6f3a0d1


[ROCm/clr commit: ca35d93672]
2025-02-10 11:47:04 -05:00
Juan Manuel Martinez Caamaño 5356f13902 SWDEV-132637: Remove OpenCL cl_khr_depth_images workaround that is not needed anymore
The cl_khr_depth_images associated macro definition is defined twice in
the compiler: in opencl-c.h and automatically by the compiler deduced
from the cl-ext list. These two co-exist and there is no need to remove
cl_khr_depth_images from the cl-ext list.

If we remove cl_khr_depth_images from the cl-ext list, and we do not
include opencl-c.h the macro is not defined.

This fixes conformance test ./test_compiler compiler_defines_for_extensions
when using Comgr with -include opencl-c-base.h -fdeclare-opencl-builtins
without including opencl-c.h.

Before we got the error `ERROR: Supported extension cl_khr_depth_images
not defined in kernel`

This change is needed to eventually get rid of the opencl-c.pch that is embedded in comgr, and that makes implementing a compilation cache in comgr hard.

Change-Id: I76497874ebe7163966420d4ac23a0788b93a36fd


[ROCm/clr commit: 8c9e6d0fa5]
2025-02-04 03:14:31 -05:00
Saleel Kudchadker 954c43d798 SWDEV-503761 - Reintroduce save-temps path for OpenCL
Change-Id: I5e111047242aed7d982b7a25c11ab52293af639d


[ROCm/clr commit: 23c21d5181]
2024-12-11 13:01:29 -05:00
kjayapra-amd f19260d568 SWDEV-480772 - Remove name variable from amd::Monitor class.
Change-Id: Ie2a4fa44f485786227230f8a892e090e718aa30e


[ROCm/clr commit: 12a39fbf22]
2024-09-19 11:55:01 -04: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
Shilei Tian ce4e3ebe04 Revert "SWDEV-459556 - Revert "SWDEV-442724 - Remove uses of -amdgpu-early-inline-all to enable function calls""
This reverts commit e5b6537315ce9b2688ee0269ba0828a703c3e2c9.

The regressions (SWDEV-459556 and SWDEV-460260)  caused by the original patch
has been resolved.

Change-Id: I32344492b4ff88bd7e91ea47983ac15636dc77c1


[ROCm/clr commit: b0930263e5]
2024-05-28 06:31:10 +00:00
Rakesh Roy 0b5525cb38 SWDEV-459556 - Revert "SWDEV-442724 - Remove uses of -amdgpu-early-inline-all to enable function calls"
This reverts commit d90a0d9c57.

Change-Id: I885b9e5910d90fd871ab48f7ee95796b6cd01297


[ROCm/clr commit: 87619af175]
2024-05-28 06:28:17 +00:00
Matt Arsenault 471f9e6d65 SWDEV-1 - Do not pass daz_opt to comgr link options
This no longer does anything.

Change-Id: I0643198a46a534a76454a5b461d010ed1776a89a


[ROCm/clr commit: 67473ba345]
2024-03-19 22:55:44 -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
Shilei Tian d90a0d9c57 SWDEV-442724 - Remove uses of -amdgpu-early-inline-all to enable function calls
Currently we force inlining everything for HIP. Now we'd like to enable function
supports. The first step is to remove uses of `-amdgpu-early-inline-all` in
various places. This patch is to remove all of them from clr.

Change-Id: Ib0cad1f586714c9989778b00746aa4c47a4eec95


[ROCm/clr commit: a09204388a]
2024-03-11 10:02:12 -04:00
Saleel Kudchadker 8d5fa39c5b SWDEV-365820 - Refactor build path
This is an initial change before we refactor the build/link paths for
kernel launches for HIP. This current change is needed as compiler was
setting some dump file which needed fs access which has slowdowns for
NFS mounted file systems

Change-Id: I828f9bb04d789b4f8c05c1ed08767f325efeb47c


[ROCm/clr commit: 3f2f7252aa]
2024-01-04 14:20:59 -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
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
Saleel Kudchadker 44512e3228 SWDEV-301667 - Cleanup log
Change-Id: I9719ec8b19406a062727937471e7a845a522a0be


[ROCm/clr commit: 538d453b86]
2023-05-01 11:07:55 -07:00
Jacob Lambert eda5e6731e SWDEV-1 - Add missing newlines to debug log output
Change-Id: I6c98d482079c34931cdc0615075eba34f87241f3


[ROCm/clr commit: 2a9d8b5862]
2023-04-25 13:10:57 -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
Saleel Kudchadker 95e07af803 SWDEV-381633 - Better log
Change-Id: Ie151d73aa4b1dae7d0d9acd0457e7dbdf35f21ee


[ROCm/clr commit: 7619b53e9b]
2023-02-08 17:54:11 -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
jatang 1f5f1c8708 SWDEV-287018 - Only generate _optimized.bc when both requiredDump and DUMP_BC_LINKED are true
The current code generates a _optimized.bc regardlessly, so put back the original logic.

Change-Id: I3f84d10934b3e983f5f828af8d0943449a6e1d94


[ROCm/clr commit: 6647882773]
2023-01-11 17:51:35 -05:00
jatang fca7b357b8 SWDEV-372791 - Default UniformWorkGroupSize to true for CL1.x
Change-Id: If03396b5a7a3a69e05fdb4c43791a0d84d9f4127


[ROCm/clr commit: 05a8eaaf0f]
2022-12-28 12:59:08 -05:00
Juan Manuel MARTINEZ CAAMAÑO ed84e3c9fa SWDEV-287018 - Generate tempraries for _optimized.bc and _linked.bc if -save-temp-all is passed.
Change-Id: Ie8a7af66f0764f0a94948d45d7deed786f799c96


[ROCm/clr commit: 9b8005d758]
2022-11-15 07:49:07 -05:00
Jaydeep Patel d3daf1ea8b SWDEV-329516 - Don't clear error if setKernels returns false.
Change-Id: I75f69bcdf01bad63a9273dc37afd69644f6b3b22


[ROCm/clr commit: efedf08327]
2022-07-27 06:01:00 +00: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
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
German Andryeyev ae0ca57698 SWDEV-319375 - Avoid global var size query
Currently COMGR doesn't provide global variable size and runtime
parses ELF binary directly. Avoid parsing for HIP. That can save
5% in hipModuleLoad() time.

Change-Id: I47540d1e957bdb0c2406b6b848222de2920b2504


[ROCm/clr commit: 2664d8cf9e]
2022-02-23 21:33:05 -05:00
German Andryeyev bd96ef9a34 SWDEV-307184 - Add support for the new metadata
Metadata in Codeobject version 5 is the extension of CO3 and CO4.
Add the detection of the new fields and program them in
the setup of the kernel arguments.

Change-Id: I27e58df77320ad00f4f16d35912668db803826af


[ROCm/clr commit: be6a06384e]
2022-02-07 14:05:58 -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
Jason Tang b47bd6138e SWDEV-1 - Only check agent-binary ISA compatibility for online device
Change-Id: I5c8395c646280b8316e2f1af9f1e624359166cba


[ROCm/clr commit: e0bd4aad63]
2021-09-23 16:03:01 -04:00
Jason Tang e94aec09bd SWDEV-1 - Some 'delete' clean up
Change-Id: I02564f0f0e349375bde1471e9f82df268703367b


[ROCm/clr commit: 73967c3b17]
2021-09-09 12:12:40 -04: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
Saleel Kudchadker 14d8512375 SWDEV-297448 - Add debug log print
Change-Id: Ieba1b2e5d766e3fbe84dfc875dde8268166b3f99


[ROCm/clr commit: 2e26ed1cbb]
2021-08-22 23:56:08 -07:00
Jatin Chaudhary ff3101ca71 SWDEV-286257 - Check for --save-temps option for HIP. Create Temp files if its present.
Change-Id: Ie5787d03b73081bca1ad03699ed7015badc342c7


[ROCm/clr commit: 751937af14]
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
cjatin 9587f79650 SWDEV-283267 - Fix a bug where rocclr appends compiler options twice
Change-Id: I54ca6e8458cf6414c263df7a8bf61f7ce39a64df


[ROCm/clr commit: 228662bf3f]
2021-08-22 23:56:07 -07:00
Jason Tang af79937953 SWDEV-277566 - Fix LinuxPro build
Change-Id: I3e15ae55591d669a87ce0d69fecf9fa32b85b0a6


[ROCm/clr commit: 8aa89274c8]
2021-05-17 15:18:40 -04:00
Vladislav Sytchenko 83bd216941 SWDEV-273235 - Fix Windows runtime error
Variables passed by reference need to be initialized beforehand.

Change-Id: Ic29e3b7f6e04ef5bb153a2e6bd81419e1955935b


[ROCm/clr commit: 73b833a741]
2021-05-14 15:03:10 -04:00