Commit Graph

12 Commits

Author SHA1 Message Date
Yaxun Sam Liu 8f5c812a68 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 fa9495841b 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 74578160bd Add code-object-v3 support for the HIP-Clang path. 2019-02-05 14:43:26 -08:00
Yaxun Sam Liu 988dcd1e4a Let hip-clang support --genco 2018-11-27 15:55:50 -05:00
root 0774b275c8 rebase to master, tracer related changes 2018-11-13 15:50:34 +00:00
Yaxun Sam Liu 80b382a37a Add more checks for fatbin 2018-11-08 16:46:01 -05:00
Yaxun Sam Liu 0027a54d8b Add HIP_DUMP_CODE_OBJECT 2018-10-26 14:14:00 -04:00
Yaxun Sam Liu da6c5c152e Adding checks and debug output for fat binary for hip-clang 2018-10-26 14:13:12 -04:00
Yaxun Sam Liu ce13c2061a Add HIP_DB=fatbin for debugging fat binary issues 2018-08-17 11:53:45 -04:00
Yaxun (Sam) Liu 2f9bce3652 Change HIP fat binary magic number 2018-05-17 17:04:51 -04:00
Laurent Morichetti f4cde23be3 Create one hipModule_t per device 2018-04-10 08:57:34 -07:00
Laurent Morichetti 323caee8d2 Add support for clang offload bundles and <<<>>> kernel launch. 2018-04-04 13:32:33 -07:00