Wykres commitów

20 Commity

Autor SHA1 Wiadomość Data
Payam c5f76c3de3 name change vdi to rocclr
Change-Id: I06d198bbb4a499e153b290b73a92afed3553b252
2020-05-06 09:14:30 -04:00
Maneesh Gupta a0b5dfd625 Merge in the rocclr based hip runtime (#2032)
* Merge master-next changes in master (include vdi development in master branch)
2020-04-23 09:12:06 -07:00
lmoriche 9de5e90ab5 Don't duplicate embedded code objects (#1991)
If the code object is embedded in an already mapped file, and the
lifetime of the mapped file exceeds the lifetime of the executable,
we do not need to make a copy of the binary.

This allows the ROCR to present the code object URI as
file:///path/to/file#offset=X&size=Y.
2020-04-06 15:37:35 +05:30
zhaozhangjian 7c8b8d24ef fix a bug when initializing a vector of hipFunction_t (#1949) 2020-03-17 14:05:07 +05:30
saleelk 499938d974 Implement __hipPushCallConfiguration/__hipPopCallConfiguration for hip_clang (#1845)
This is needed so that the right symbols are present if we want to use hip-clang with hip/hcc runtime
2020-02-04 19:37:57 +05:30
Rahul Garg 47b832bba7 Fix build issues seen with hip-clang path (#1331) 2019-08-16 02:13:45 +00:00
Jeff Daily 1eb3dbf065 consolidate thread local storage (#915)
* all thread local access now through single struct

* clean up old commented-out code, more use of GET_TLS()

* fewer calls to GET_TLS by passing tls as a funtion argument

* revert unnecessary change to printf

* fix failing tests due to TLS change

* fix merge conflicts in ihipOccupancyMaxActiveBlocksPerMultiprocessor
2019-08-05 09:51:02 +00:00
Siu Chi Chan f5eb91d53d migrate program_state logic from header into shared library (phase I) (#1077)
* Revert "Revert "Use COMgr to read Kernel Args Metadata (#1006)""

This reverts commit a3d118eaa8.

* Revert "Use COMgr to read Kernel Args Metadata (#1006)"

This reverts commit 8a548bf40b.

* Revert "improve program state commentary"

This reverts commit 7aada87cbd.

* Revert "load program state once per agent"

This reverts commit c9117de8eb.

* start moving function_names() into the hip shared lib

* start moving code_object_blobs to a new "state" object

* Consolidate various program state related static objects into a
single program_state object

* minor clean up

* move more stuffs from functional_grid_launch into program_state

* debug make_kernarg

* moving lookup for kernargs size_align into program_state

* clean up old code for kernarg size and alignment

* update hip_module to use newer api in program_state

* Create public member functions for program_state

* move most program state functions into shared library

* Pass the data buffer size to load_executable
Otherwise, it can't figure what the data size is
just from the char* (since the data is not really a string)

* turning free functions in program state into members of program_state_impl

* change the free function globals() into a member of program_state_impl

* replace the static mutex used for populating globals

* moving associate_code_object_symbols_with_host_allocation into
program_state_impl

* move load_code_object_and_freeze_executable into program_state_impl

* moving executables and functions_names into program_state_impl

* moving kernels() into program_state_impl

* moving functions() into program_state_impl

* move get_kernargs into program_state_impl

* moving kernel_descriptor into program_state_impl

* moving kernargs_size_align calculation into program_state_impl

* Changing the handle to program_state_impl to a pointer

* moving program_state_impl into a separate inline source file

* fixing/cleaning up some header file includes

* moving member function for kernargs_size_align into program_state.cpp

* moving Kernel_descriptor into program_state.inl

* add a new class to manage agent globals

* moving all agent globals processing functions into agent_globals_impl

* load program state once per agent

re-merging PR991 against other program state changes

* fix per-agent program state member initialization

* cache executables based on elf name, isa, and agent.

This avoids program state reloading executables after a shared library is dlopened.

re-merging PR1057 against other program state changes

* protect executables cache by a global mutex

* return ref to executables cache

* adapt PR#981 Make hipModuleGetGlobal be in HIP runtime
2019-05-12 19:24:03 +05:30
Yaxun Sam Liu 98b9e92908 hip-clang: fix kernel not found on multi-gpu
__hipRegisterFunction is called during by .init functions during program initialization.
It calls hipModuleGetFunction to locate kernel symbol in code objects. hipModuleGetFunction
assumes current device when locating kernel symbols. This works for HCC but not for hip-clang,
since hip-clang needs to locate kernel symbols for different devices without switching
between devices.

This patch introduces a new hsa agent parameter to ihipModuleGetFunction, which allows
__hipRegisterFunction to choose the correct hsa agent when locating kernel symbols. By
default it uses this_agent(), therefore this patch has no impact on HCC.
2019-03-31 10:08:20 -04:00
Siu Chi Chan 24d08beef8 reimplement HIP_INIT as hip_impl::hip_init(), add hip_init() to some of the inlined API (#966)
* reimplement HIP_INIT as a function, expose it as hip_impl::hip_init()
so that it could be called from hipLaunchKernelGGL and other inlined
HIP functions

* Don't call hip_init from ihipPreLaunchKernel
2019-03-20 05:11:15 +00:00
Laurent Morichetti 6ab8711f02 Add code-object-v3 support for the HIP-Clang path. 2019-02-05 14:43:26 -08:00
Yaxun Sam Liu 450f093231 Let hip-clang support --genco 2018-11-27 15:55:50 -05:00
root 091124a766 rebase to master, tracer related changes 2018-11-13 15:50:34 +00:00
Yaxun Sam Liu a31b6b78d5 Add more checks for fatbin 2018-11-08 16:46:01 -05:00
Yaxun Sam Liu f5d8842f6a Add HIP_DUMP_CODE_OBJECT 2018-10-26 14:14:00 -04:00
Yaxun Sam Liu 062398c72f Adding checks and debug output for fat binary for hip-clang 2018-10-26 14:13:12 -04:00
Yaxun Sam Liu 1299b65e15 Add HIP_DB=fatbin for debugging fat binary issues 2018-08-17 11:53:45 -04:00
Yaxun (Sam) Liu d079463887 Change HIP fat binary magic number 2018-05-17 17:04:51 -04:00
Laurent Morichetti 91f996035c Create one hipModule_t per device 2018-04-10 08:57:34 -07:00
Laurent Morichetti 0c1893ea62 Add support for clang offload bundles and <<<>>> kernel launch. 2018-04-04 13:32:33 -07:00