27 Commits

Autor SHA1 Mensaje Fecha
pghoshamd 637b0d71f0 SWDEV-569319 Replace ScopedAcquire with stdcpp wrappers (#2146)
* SWDEV-569319 Replace ScopedAcquire with stdcpp wrappers

* Remove KernelMutex and KernelSharedMutex abstractions with std::mutex and std::shared_mutex

* Replaced unique_locks with lock_guards

* More changes

* Replace new and deletes with smart pointers

* Replaced some more with shared ptrs

* Replacements with smart pointers - pt 2

* missed change
2026-01-06 10:59:34 -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
Apurv Mishra 23ab95b5f2 rocr: multiple uninitialized and unused variables
Minor modifications to multiple source and header
files based on Coverity report

Change-Id: I4a73d0f56640983c4d5124e13c8c280245cca672
Signed-off-by: Apurv Mishra <apurv.mishra@amd.com>


[ROCm/ROCR-Runtime commit: 699d0140be]
2024-12-18 10:11:13 -05:00
Konstantin Zhuravlyov ae24ca1528 Switch to per-executable contexts in the loader
- Per-executable contexts should be used from now on
  - Global contexts are left as is for now for backwards
    compatibility and will be phased out in follow up
    patches.

Change-Id: I6291abf865c7ed24ee71f5065e539afc23f5ce64


[ROCm/ROCR-Runtime commit: b983c19729]
2024-04-09 10:31:51 -04:00
Joseph Huber 3f872d8c97 Add executable symbol info for the wavefront size
The wavefront size is currently only exposed as an agent level
attribute. This is not correctyl, because while the agent has a default
wave front size that is usually correct, it can easily be overridden via
options like -mwavefrontsize64 on various ISAs. The wavefrontsize
attribute is actually more of a calling convention that is consistent
within a callgraph. Because the root of each call graph is a kernel in
this architecture, we need to be able to query this on a per-kernel
basis. This information is already avialable in the kernel descriptor
packet, but it wasn't exported.

This patch adds HSA_CODE_SYMBOL_INFO_KERNEL_WAVEFRONT_SIZE as a new
option to query on the executable symbol.

Change-Id: I744815c89cc9d4c82f25479bdd48ae1f32e859ff


[ROCm/ROCR-Runtime commit: 9e26cbac14]
2024-02-09 15:55:30 +00:00
Ramesh Errabolu b84e4987da Add rocr namespace to core header and impl files
Change-Id: I1e1b33f9bba1078d049bc19797889988c3e43360


[ROCm/ROCR-Runtime commit: fa13208698]
2020-06-19 22:34:21 -04:00
Sean Keely abd712f33f Update copyright date.
Change-Id: If4bf4c20cf051878bfe759080bb7345d884dd53d


[ROCm/ROCR-Runtime commit: ce19721c88]
2020-06-19 22:34:01 -04:00
Konstantin Zhuravlyov b1f050524b Add support for code object URI to ROCr
Adds the following:
	- New factory method to create a code object reader from
          file with offset and size.
	- A pair of queries on a loaded code object to get the URI name/length.
	- A bump to the AMD vendor loader extension API and its associated table.

Change-Id: I17c83e9c2447d29a43c438459395365f786a3611


[ROCm/ROCR-Runtime commit: 9eb735ec24]
2020-06-01 11:07:50 -04:00
Ramesh Errabolu 38747b8fec Update how code references publicly available ROCr headers
Change-Id: I357c51eb713a23704d4fee71081be46a73a71806


[ROCm/ROCR-Runtime commit: 627991b1c1]
2020-02-21 20:01:11 -05:00
Saleel Kudchadker 7c5a08073f Reset link_map map in the constructor
Change-Id: I8a6ad3bc0fca790dec2992cacf9288068b3bcaa3


[ROCm/ROCR-Runtime commit: c57f3da1dc]
2020-02-19 15:29:35 -08:00
Qingchuan Shi 2ab9ce6d5c Adding code object list in loader.
Change-Id: Iab3541287bd56276fd32615ee59fcd590de84ca0


[ROCm/ROCR-Runtime commit: 16a20cfb8c]
2019-10-30 20:31:51 -04:00
Konstantin Zhuravlyov 2b9e13a56c Loader: add basic logging abilities
- Enabled with env var LOADER_ENABLE_LOGGING=1

Change-Id: Ibdbb1b55ffddb7dc9c63e52fc9db3013409376a4


[ROCm/ROCR-Runtime commit: 2275c74695]
2019-08-21 13:29:15 -04:00
Sean Keely 5b71bc65b7 Patch from github.
At the moment it is not possible to build ROCr with Clang. This is
a spurious limitation. The present PR addresses it by guarding GCC
only flags and by fixing some additional warnings that Clang triggers;
one of said warnings did outline a rather interesting issue with math
being done on void*s. - AlexVlx

Void ptr arithmetic had already been fixed in amd-master branch.

Change-Id: I5ee97e20b5c40b10dd73facecabe75f02ba46462


[ROCm/ROCR-Runtime commit: e89f9807f1]
2019-04-29 16:17:24 -04:00
Qingchuan Shi 3e9a0561c0 Add APIs to support debugging vm fault
1. Add hsa ext api hsa_amd_register_vmfault_handler for debugger to register callback in case of VM fault.
2. Extend hsa_ven_amd_loader API to:
   (1) iterate loaded code objects in executable:
       hsa_ven_amd_loader_executable_iterate_loaded_code_objects
   (2) get loaded code object info:
       hsa_ven_amd_loader_loaded_code_object_get_info
3. Make the id of hsa_queue the same as the one used in communication with thunk (for amd_aql_queue)

Change-Id: I68910809e59e24297350d262606f00e96c14bcbd


[ROCm/ROCR-Runtime commit: ce6aee01ed]
2017-10-28 21:48:26 -04:00
Konstantin Zhuravlyov 2a071e1456 Bring loader in sync with stg/sc
Change-Id: Iccce07b8fa03d37c4267a2a9bd343e6614dc43e7


[ROCm/ROCR-Runtime commit: 9887c26113]
2017-02-10 11:21:15 -05:00
Konstantin Zhuravlyov 578c17681b Revert "Bring loader in sync with stg/sc"
This reverts commit cdcc5ec921.

Change-Id: If99e8cc9e2afb525f690e49eb6538d8e950a5615


[ROCm/ROCR-Runtime commit: 08aded148a]
2016-12-14 15:14:36 -05:00
Konstantin Zhuravlyov cdcc5ec921 Bring loader in sync with stg/sc
Change-Id: I684522c442de0872007a7e4da8919067fc7b42b3


[ROCm/ROCR-Runtime commit: c798c60343]
2016-12-13 16:30:25 -05:00
Ramesh Errabolu e3d8eac639 Initial set of changes for ThreadTrace
Change-Id: I07ce31f9b4f508cef0fc9ca6dadcf26b6c90361e


[ROCm/ROCR-Runtime commit: eb2efb83d1]
2016-11-21 23:40:56 -06:00
Konstantin Zhuravlyov 05a7b5a9e4 Remove load_legacy parameter + change prefix for some loaded code object queries back to AMD
Change-Id: I74e905abd77dab3a7a00b5ced94cd9b5130365c5


[ROCm/ROCR-Runtime commit: 4b86843409]
2016-11-20 13:46:17 -05:00
Konstantin Zhuravlyov ee3b926381 Allocate only one segment for code object v2+
Change-Id: I7cd03b5c205d3ea5735f8f29820867ca90ac081b


[ROCm/ROCR-Runtime commit: 54245e064c]
2016-11-03 09:51:11 -04:00
Jay Cornwall c6bfeda697 Fix miscellaneous warnings flagged by Clang
Change-Id: I85a45cb3b44e4379b31bcc56af061fd1571f2af5


[ROCm/ROCR-Runtime commit: c30c25bd30]
2016-10-26 19:26:16 -05:00
Konstantin Zhuravlyov e10cd184ef Update code object/isa/loader to hsa v1.1
- Includes Sean's latest changes
- Cleanups/improvements
- Fixes for few bugs that crept over from previous releases

Change-Id: I839dc4895bf13ebd0afc8843424387a9fef667b0


[ROCm/ROCR-Runtime commit: c2c993e0d8]
2016-08-22 15:03:23 -04:00
Konstantin Zhuravlyov b43cdae36b Implement new load map API.
Change-Id: I5f148fe66f899b2fa6a2e75430afa988f38db58d

[ROCm/ROCR-Runtime commit: 0e4cab3001]
2016-06-28 11:32:19 -04:00
Konstantin Zhuravlyov bf46c9e840 Add support for dynamic relocations (code object v2.1)
Change-Id: Ic19be97d3ea78b53f5aa814787515b587d0be21b


[ROCm/ROCR-Runtime commit: 5a14d496ab]
2016-05-26 14:09:07 -04:00
Nikolay Haustov [TEXT] 6b9e626507 Cherry-pick CL 1250286 from SC stg.
HSA Finalizer: Add dumping of code object, ISA and executable to loader.

This is controlled by loader options -dump-all, -dump-isa, -dump-code, -dump-exec

The options can now also be set with env variable LOADER_OPTIONS_APPEND.

Added tests to finalizer_offline

Testing: smoke, dumping on hardware

Reviewed by: Konstantin Zhuravlyov

[git-p4: depot-paths = "//depot/stg/hsa/drivers/hsa/runtime/": change = 1255351]


[ROCm/ROCR-Runtime commit: a795909bca]
2016-04-07 06:01:20 -05:00
Nikolay Haustov [TEXT] b69a730231 HSA Finalizer: Merge changes in libamdhsacode and loader from sc_prm into hsa/compiler/finalizer and hsa/runtime.
Testing: pre-checkin

[git-p4: depot-paths = "//depot/stg/hsa/drivers/hsa/runtime/": change = 1251389]


[ROCm/ROCR-Runtime commit: 46842a57e5]
2016-03-25 08:36:20 -05:00
James Edwards (xN/A) TX 67e6064a6a Check open source core runtime code into perforce. This includes license and README files.
[git-p4: depot-paths = "//depot/stg/hsa/drivers/hsa/runtime/": change = 1249136]


[ROCm/ROCR-Runtime commit: c9ffe0004e]
2016-03-20 15:39:40 -05:00