52 Commits

Author SHA1 Message Date
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
Deshpande, Chinmay Diwakar 670a73e331 SWDEV-548352 - Remove logging limit in cltrace (#830)
* SWDEV-548352 - Add environment var to disable logging limit in cltrace

* SWDEV-548352 - Fix formatting

* SWDEV-548352 - Remove logging limit entirely

* SWDEV-548352 - Change logging limit to 6000

---------

Co-authored-by: Chinmay Deshpande <chdeshpa@amd.com>

[ROCm/clr commit: cc99d17ddd]
2025-08-13 11:18:56 -07:00
Alex Xie a381538161 SWDEV-444098 remove "rocm-ocl-icd" package
This is the first step to remove rocm-ocl-icd.
We don't build amd icd after this commit.
We still need to remove header files usage in future steps.

Change-Id: Ic4ac5476180f9ef2ce87b62891c08b28d6c9bfd2


[ROCm/clr commit: 5f775b8b7f]
2024-08-07 11:29:41 -04:00
cadolphe 02330a5324 SWDEV-443537 - fix make build warning message
Add cltrace compile definition for CL_TARGET_OPENCL_VERSION to OpenCL 2.2

Change-Id: Ie868ab0a6e86951afc6d07da58be942c3b736d15


[ROCm/clr commit: f7b1398361]
2024-04-02 16:42:01 -04:00
Julia Jiang 08e18077cc Revert "SWDEV-444098 - remove rocm-ocl-icd packaging"
This reverts commit 6c46d696ae.

Reason for revert: due to windows staging branch using Opencl-icd-loader master

Change-Id: I9cca7564a21de1733665a34da6f0322aa3b886e7


[ROCm/clr commit: f44ca70bb7]
2024-03-22 16:59:23 -04:00
Julia Jiang 6c46d696ae SWDEV-444098 - remove rocm-ocl-icd packaging
Change-Id: If0234ff03cf86e1f0435e743c1df75a3e179d48c

Jenifer helped trigger a combined PSDB for the below three changes
https://gerrit-git.amd.com/c/compute/ec/prototype/+/1020194
https://gerrit-git.amd.com/c/compute/ec/clr/+/1003601
https://gerrit-git.amd.com/c/compute/ec/OpenCL-ICD-Loader/+/1012373

Combined PSDB was successful:
http://rocm-ci.amd.com/job/compute-psdb-staging/27382/
Change-Id: If0234ff03cf86e1f0435e743c1df75a3e179d48c


[ROCm/clr commit: 5f68a4531a]
2024-03-15 10:46:07 -05:00
taosang2 1196e76a6c SWDEV-448792 - Fix clinfo local buffer type
Change-Id: I0228c5e97ce7c466983fd4af71d25e7f8161c2c8


[ROCm/clr commit: dd43dc930d]
2024-03-12 13:48:59 -04:00
Todd tiantuo Li f506eebd90 SWDEV-391224 - cltrace support for MEDIUM_PRIORITY queue and RT queue with their number of dedicated CUs
Change-Id: Ifec6e0995e324887f8df02f27cb61e2a035e6a82


[ROCm/clr commit: 42e7cb77d9]
2023-04-25 04:29:20 -04:00
Maneesh Gupta 90da0eaee4 SWDEV-361630 - Enable opencl build
Change-Id: I19f8aa2e8157b8bfa053c502dcd63c52f0b6f104


[ROCm/clr commit: d9ceb6a3a3]
2023-03-26 15:42:33 +00:00
jatang fe3c49c51a SWDEV-384646 - Clean up clinfo includes
Change-Id: I7cc8a877fd7a61fea58331b5ca1792022df3194d


[ROCm/clr commit: a7f8964a20]
2023-03-02 16:03:52 -05:00
Ranjith Ramakrishnan ee63dd0dc5 SWDEV-383843 - Use relative path for RUNPATH
Build script was passing relative path for setting the RUNPATH. But clinfo is overriding it and using absolute paths
Removed the same from source code

Change-Id: I505e7fdc84c53d147f3afbc6c4133f906de2110f


[ROCm/clr commit: 067beca608]
2023-02-17 11:31:48 -05:00
Jeremy Newton 713ac5ab4e SWDEV-1 - cltrace: Add missing include
Newer GCC's seem to require this.

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


[ROCm/clr commit: 158e79358c]
2023-02-08 14:26:47 -05:00
Ashutosh Mishra c8eadd18af SWDEV-362882 - Unable to run clinfo/opencl tests
The explicit RUNPATH addtion has been
revoked after the file reorg. Hence
the rpath for discovery of the libs
has to be taken care by individual binaries
Current patch adds the run path for
descovery of the libOpenCL.so

Signed-off-by: Ashutosh Mishra <ashutosh.mishra@amd.com>
Change-Id: Ia3bf9202bea78ecfdb881e40b0eb7a0d4a303ed3


[ROCm/clr commit: 1754b043a3]
2022-10-19 15:03:07 -04:00
Jason Tang 2590bfd491 SWDEV-307023 - Fix cltrace build
Change-Id: I75fd953668dc576c3132ae463e34ecb4ae2fb0c7


[ROCm/clr commit: 5c13f33da2]
2021-10-14 09:26:27 -04:00
Vladislav Sytchenko 60cf342ae0 SWDEV-301289 - Treewide macro rename
ATI_OS_WIN -> _WIN32
ATI_OS_LINUX -> __linux__

We should not rely on non-standard macros for platform detections.

Change-Id: If1d06e2e1187268df62a59609ea5496ab7eb709d


[ROCm/clr commit: c4aa6febe5]
2021-09-26 12:13:37 -04:00
Alex Xie 99cd3788c4 SWDEV-302875 - OpenCL build failure
clinfo should rely on OpenCL interface, headere file and library only

Change-Id: I8e09aa73b55f1a28c2e4403f52740803d0338c12


[ROCm/clr commit: 19ca123460]
2021-09-16 22:16:06 -04:00
jujiang 40cc9aee95 SWDEV-286322 - clean up trailing white space
Change-Id: Ie47bc977e1598356b455957d96f9afa37794c1fd


[ROCm/clr commit: 422a26142d]
2021-09-01 14:53:14 -04:00
agunashe 65362abf36 SWDEV-293742 - Update copyrights end year for opencl repo
Change-Id: I0ce8369a7ef569ac82c6e20266d0c98331a43e08


[ROCm/clr commit: 5a0ecc8e48]
2021-07-08 21:55:55 -07:00
Vladislav Sytchenko 43b6294afb SWDEV-273235 - Do not use target_link_options()
Some CI systems have a somewhat out of date version of cmake, which
does not have this functionality. Fall back to using
target_link_libraries() instead.

Change-Id: I2410b24bcb6f1be2c2c3303ccd0019b10c914d2e


[ROCm/clr commit: 58c93c8047]
2021-06-02 21:03:28 -04:00
Vladislav Sytchenko 208c198d71 SWDEV-273235 - Correct linker export file usage
CMake doesn't handle linker export files in a general way well. On
Windows it is able to recognize a .def file and pass it to the linker.
Unfortunately it cannot do the same thing on Linux, so we have to
manually specify it.

Note that CMake can't recognize the current Windows export file due to
the .in suffix, hence why the amdocl.def file is being added. The
amdocl.def.in file will be removed later, as the Makefile build still
uses it.

Change-Id: I33a4151af0257d56d46cd27cbd028b34b77b706b


[ROCm/clr commit: 75b232eea2]
2021-06-02 12:56:14 -04:00
Vladislav Sytchenko 9f54cba1ed SWDEV-273235 - Cleanup OpenCL installation logic
Don't use hardcoded install destinations. CMake will decide where things
should be installed based on platform.

Change-Id: Ifcf956181d3efb32d4ce6191a89c1ea225d0e8cc


[ROCm/clr commit: d53c19cfa5]
2021-06-01 14:31:14 -04:00
Vladislav Sytchenko f7bbb7b988 SWDEV-273235 - Initial support for Windows CMake
This change is tied to the ROCclr cmake rework. ROCclr will now be built
as part of OpenCL itself.

All the dependencies on comgr and rocr have been moved into ROCclr
itself. This allows OpenCL to pull in all the required compiler/runtime
dependencies by simply linking against ROCclr. Note that ROCclr needs to
be configured from OpenCL cmake command line. If not, we will default to
LC + ROCr support.

Change-Id: I5271302d073aef8cfa617828d218c856711bf9ba


[ROCm/clr commit: 1c16690617]
2021-05-27 13:08:12 -04:00
Payam Ghafari 6dc853cb26 Revert "SWDEV-197835 - adding Khronos OpenCL ICD build"
This reverts commit d09b6e30fc.

Reason for revert: need to update other projects (linuxpro & marnier)

Change-Id: Ib02194d052170e487cd56480eb0d9226895aa580


[ROCm/clr commit: 0762c948b6]
2021-05-18 10:31:25 -04:00
Payam d09b6e30fc SWDEV-197835 - adding Khronos OpenCL ICD build
Change-Id: Id7d9cd6076c6f1670eedbea06a6976c05e391520


[ROCm/clr commit: 932c83fe8f]
2021-05-17 18:19:30 -04:00
Jason Tang 342f25aa11 SWDEV-268345 - Remove ADDRESS_SANITIZER option from cmake
DevOps is going to add this through build scripts.

Change-Id: Id48ac9c1729d60f337e4cb7f0203822a05038e5e


[ROCm/clr commit: d21913f140]
2021-02-16 18:31:07 -05:00
Jason Tang a97c8523f5 SWDEV-268345 - Enable address sanitizer build when ADDRESS_SANITIZER is ON
Change-Id: Iaef46358f33a399f8b047aaebc5154bb7352a69a


[ROCm/clr commit: 8d75c7e76f]
2021-01-21 18:31:14 -05:00
Vladislav Sytchenko 1f40ca06a6 Don't use CMAKE_SOURCE_DIR
Change-Id: I373e218850e72ca8fe7f76a7af3e559c485c569b


[ROCm/clr commit: bd4c6ce6dc]
2020-09-23 13:04:05 -04:00
Matt Arsenault e5ce842e8a Don't add -std flag to CMAKE_CXX_FLAGS
Use the cmake method, and consolidate setting the language standard in
one place.

Change-Id: I96826c31955b1553ed1beb94203c99933075bb0a


[ROCm/clr commit: dd5f255c7e]
2020-06-05 11:22:23 -04:00
Matt Arsenault b65ba80252 Fix include directories for cltrace
Change-Id: I8de82fa4b6ce7e1e869f1001d1710dc8673b7be5


[ROCm/clr commit: 7273fdedfe]
2020-05-19 21:41:16 -04:00
jujiang 515ef47896 SWDEV-230009-Cltrace log is not created as expected-Update return type to vdi_agent
Change-Id: Ice4083d0d3a061867f886119a4cc541e2048a328


[ROCm/clr commit: 1662b25dc6]
2020-05-08 18:56:25 -04:00
jujiang f3319937db SWDEV-230009-Cltrace log is not created as expected-Create dynamic library
Change-Id: I813d14c093d222c82bec6824b52cc7839f89cef5


[ROCm/clr commit: 08b66a4b1b]
2020-05-06 14:32:00 -04:00
Payam 7eda01bab6 name change vdi to rocclr
Change-Id: I59650f7082dd118c1fe92309b76a5bdb20eee3c1


[ROCm/clr commit: 94b203235e]
2020-04-30 19:06:58 -04:00
Payam Ghafari efeee416a1 Merge "adding cltrace" into amd-master-next
[ROCm/clr commit: 10de80eb17]
2020-04-28 09:48:35 -04:00
Payam caf39ab53f adding cltrace
Change-Id: I19b06f9a5954f317bbd00b5c2447ed5b6e9f30ae


[ROCm/clr commit: 50563e4544]
2020-04-28 05:49:30 -04:00
Matt Arsenault 6e10ca7f0a Use cmake features to set C++ version
Change-Id: Icf5dcd781b8fecc7a39117f3c6dee97dcba9dcca


[ROCm/clr commit: fc4afbd0f9]
2020-04-21 15:22:50 -04:00
Payam 90f37605a8 removed unused cl.hpp in clinfo
Change-Id: Idb7fc843d380322502a249231ef60799ae291ca1


[ROCm/clr commit: 3092e7c906]
2020-04-06 19:05:24 -04:00
Saleel Kudchadker 5029a7b467 Update OpenCL 2.2 headers
Update headers as of master https://github.com/KhronosGroup/OpenCL-Headers/
commit/9dde5da9c32cbd78656a5e2417c256922e851111

Change-Id: I698a3a1b92730c52b160b51af95469c2b54331c1


[ROCm/clr commit: 4092e3dee3]
2020-04-02 02:46:20 -04:00
Laurent Morichetti 0ffd5960a7 Update copyright info
Change-Id: I426ca741c082f3367c5d17946da6a25edd46a91f


[ROCm/clr commit: 9207465570]
2020-02-04 09:37:45 -08:00
foreman 2a7386e3dd P4 to Git Change 1978446 by kzhuravl@kzhuravl-spot-ocl on 2019/08/05 11:37:30
SWDEV-79445 - OCL generic changes and code clean-up

	Bring cmake changes from gerrit (reviewed and tested on gerrit)

Affected files ...

... //depot/stg/opencl/drivers/opencl/CMakeLists.txt#28 edit
... //depot/stg/opencl/drivers/opencl/tools/clinfo/CMakeLists.txt#7 edit


[ROCm/clr commit: b5025c1924]
2019-08-05 11:41:06 -04:00
foreman d9b6b4f0c6 P4 to Git Change 1977054 by kzhuravl@kzhuravl-spot-ocl on 2019/08/01 12:32:41
SWDEV-79445 - OCL generic changes and code clean-up

	- Fix COMGR+CMAKE combination - http://git.amd.com:8080/c/compute/ec/opencl/+/247843
	- Fix and clean up packaging (cmake) - http://git.amd.com:8080/c/compute/ec/opencl/+/247844

Affected files ...

... //depot/stg/opencl/drivers/opencl/CMakeLists.txt#26 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/CMakeLists.txt#19 edit
... //depot/stg/opencl/drivers/opencl/runtime/CMakeLists.txt#16 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.cpp#54 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/CMakeLists.txt#21 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#104 edit
... //depot/stg/opencl/drivers/opencl/tools/clinfo/CMakeLists.txt#6 edit


[ROCm/clr commit: 2b391e2148]
2019-08-01 12:44:10 -04:00
foreman 457ada789a P4 to Git Change 1609437 by kzhuravl@kzhuravl-fiji-ocllc-2 on 2018/09/21 15:26:55
SWDEV-79445 - Follow up for CL 1609403: clinfo: return EXIT_SUCCESS on success, EXIT_FAILURE on failure:

	 - Purge status
	 - Return EXIT_SUCCESS

Affected files ...

... //depot/stg/opencl/drivers/opencl/tools/clinfo/clinfo.cpp#7 edit


[ROCm/clr commit: 016454cd01]
2018-09-21 15:34:52 -04:00
foreman 66b72cf9b7 P4 to Git Change 1609403 by kzhuravl@kzhuravl-fiji-ocllc-2 on 2018/09/21 14:35:36
SWDEV-79445 - clinfo: return EXIT_SUCCESS on success, EXIT_FAILURE on failure.

Affected files ...

... //depot/stg/opencl/drivers/opencl/tools/clinfo/clinfo.cpp#6 edit


[ROCm/clr commit: d4ffba0544]
2018-09-21 14:44:45 -04:00
foreman 536bab6f5b P4 to Git Change 1585460 by jatang@jatang-opencl-hsa-stg5 on 2018/07/25 17:25:24
SWDEV-1 - Also catch clGetPlatformIDs error, so clinfo won't get a page fault when no platform is found.

	Instead clinfo now shows:

	ERROR: clGetPlatformIDs(-1001)

Affected files ...

... //depot/stg/opencl/drivers/opencl/tools/clinfo/clinfo.cpp#5 edit


[ROCm/clr commit: adf6570955]
2018-07-25 17:38:16 -04:00
foreman 5ce7e79f2c P4 to Git Change 1518310 by msearles@zuni-1666 on 2018/02/22 13:02:34
SWDEV-102733 - Update some CMakeLists.txt files:
	      - when setting CMAKE_CXX_FLAGS, append to it rather than overwriting it.
	      - some linker flags, -Wl,--unresolved-symbols=report-all being one of them, requires -shared-libasan if using -fsanitize=address.

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/CMakeLists.txt#13 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/utils/libelf/CMakeLists.txt#2 edit
... //depot/stg/opencl/drivers/opencl/runtime/CMakeLists.txt#9 edit
... //depot/stg/opencl/drivers/opencl/tools/clinfo/CMakeLists.txt#5 edit


[ROCm/clr commit: 23ba7de5cc]
2018-02-22 13:07:08 -05:00
foreman bec84b6503 P4 to Git Change 1506901 by lmoriche@lmoriche_opencl_dev2 on 2018/01/23 17:08:11
SWDEV-1 - Cleanups required to build with gcc-5.4

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/build/Makefile.api#171 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/glibc_functions.cpp#1 add
... //depot/stg/opencl/drivers/opencl/compiler/sclibdefs.opencl#24 edit
... //depot/stg/opencl/drivers/opencl/compiler/spirv-tools/spirvdefs#2 edit
... //depot/stg/opencl/drivers/opencl/compiler/tools/caching/cache.cpp#14 edit
... //depot/stg/opencl/drivers/opencl/make/llvm.git/llvmdefs#10 edit
... //depot/stg/opencl/drivers/opencl/opencldefs#225 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/build/Makefile.palbe#12 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/imported/jemalloc/make/Makefile.jemalloc#3 edit
... //depot/stg/opencl/drivers/opencl/support/libcxx/build/Makefile.libcxx#6 edit
... //depot/stg/opencl/drivers/opencl/tools/clinfo/clinfo.cpp#4 edit


[ROCm/clr commit: 59df136c4c]
2018-01-23 17:26:10 -05:00
foreman f7ea0599f8 P4 to Git Change 1476932 by kzhuravl@kzhuravl-fiji-ocllc on 2017/10/31 16:10:43
SWDEV-102733 - Bring CMakeLists.txt in sync with open source

	 - Remove extra empty lines
	 - Add new lines at the end of files

Affected files ...

... //depot/stg/opencl/drivers/opencl/CMakeLists.txt#17 edit
... //depot/stg/opencl/drivers/opencl/tools/clinfo/CMakeLists.txt#4 edit


[ROCm/clr commit: 5c24331d20]
2017-10-31 16:19:51 -04:00
foreman 11234a1ffd P4 to Git Change 1453266 by fdaniil@rocm_spec on 2017/08/30 12:27:36
SWDEV-102733 - [OCL-LC-ROCm] Cmake build Write CMakeLists.txt to enable building with and without the DK environment

	Update from git http://git.amd.com:8080/#/c/103512/

	1. fixed ninja warning on multiple targets generating .inc files
	2. added libamdocl64.so and libOpenCL.so.1.2 libraries installation into install/lib
	3. added Khronos OpenCL headers installation into install/include
	4. added clinfo application installation int install/bin
	5. removed installation of dozens of LLVM libs and tools
	6. fixed minor misspellings in llvm options setup

Affected files ...

... //depot/stg/opencl/drivers/opencl/CMakeLists.txt#15 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/CMakeLists.txt#11 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/CMakeLists.txt#9 edit
... //depot/stg/opencl/drivers/opencl/tools/clinfo/CMakeLists.txt#3 edit


[ROCm/clr commit: bd0e789f7c]
2017-08-30 12:44:23 -04:00
foreman 38ccff68fb P4 to Git Change 1419430 by lmoriche@lmoriche_palamida on 2017/06/07 12:28:09
SWDEV-102733 - [OCL-LC-ROCm] Cmake build Write CMakeLists.txt to enable building with and without the DK environment
	- Enable building the ICD and clinfo.

Affected files ...

... //depot/stg/opencl/drivers/opencl/CMakeLists.txt#11 edit
... //depot/stg/opencl/drivers/opencl/tools/clinfo/CMakeLists.txt#2 edit


[ROCm/clr commit: 04412e2b5a]
2017-06-07 12:55:38 -04:00
foreman 0d55a0a397 P4 to Git Change 1414821 by lmoriche@lmoriche_palamida on 2017/05/26 13:04:04
SWDEV-102733 - [OCL-LC-ROCm] Cmake build Write CMakeLists.txt to enable building with and without the DK environment
	- Update from git.

Affected files ...

... //depot/stg/opencl/drivers/opencl/.gitignore#1 add
... //depot/stg/opencl/drivers/opencl/CMakeLists.txt#10 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/CMakeLists.txt#6 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/CMakeLists.txt#5 edit
... //depot/stg/opencl/drivers/opencl/tools/clinfo/CMakeLists.txt#1 add


[ROCm/clr commit: 595192b942]
2017-05-26 13:12:30 -04:00