نمودار کامیت

125 کامیت‌ها

مولف SHA1 پیام تاریخ
Rahul Garg 3b5dac1d9d Add HIP init in hipFuncGetAttributes (#1262)
* Add HIP init in hipFuncGetAttributes

* [dtest]Remove explicit hip init call in hipFuncGetAttributes dtest


[ROCm/clr commit: c610159b85]
2019-07-31 15:42:08 +00:00
cdevadas 35f0fb2916 Increased the number of implicit-kernarg bytes to 56 (#1217)
[ROCm/clr commit: fc0aca2a7d]
2019-07-19 04:45:34 +00:00
wkwchau d20537e595 Fixed bug of determine max block size in hipOccupancyMaxPotentialBlockSize (#1235)
[ROCm/clr commit: 6ec476e50a]
2019-07-18 03:19:29 +00:00
wkwchau 7662c1a650 Fixed bug in hipOccupancyMaxPotentialBlockSize for the SGPRs limitation of gfx8 devices (#1176)
[ROCm/clr commit: 3742f24477]
2019-06-26 15:18:00 +05:30
Aryan Salmanpour 362445220a [hip] implement the hipExtLaunchMultiKernelMultiDevice API (#1165)
* [hip] implement the hipExtLaunchMultiKernelMultiDevice API

* add a guard to check the HCC version for acquire_locked_hsa_queue() API which was introdued in HCC for ROCm 2.5

* modified code based on the requested changes

* changes to lock all streams before launching kernels for each device and unlock them after the dispatches

* check each stream to be valid before starting to lock all the streams


[ROCm/clr commit: d6ad690cb6]
2019-06-20 05:59:05 +05:30
wkwchau 81b5ea1c4a Implement the hipOccupancyMaxPotentialBlockSize function (#1162)
* Implement the hipOccupancyMaxPotentialBlockSize function

* Replaced hipGetDeviceProperties() call by ihipGetDeviceProperties() in ihipOccupancyMaxPotentialBlockSize()

* Add test for hipOccupancyMaxPotentialBlockSize in Module API

* Added extern declaration for ihipGetDeviceProperties() to be accessed inside ihipOccupancyMaxPotentialBlockSize()

* fixed hipOccupancyMaxPotentialBlockSize test build issue

* Fix hipOccupancyMaxPotentialBlockSize dtest

* Add BUILD_CMD in hipOccupancyMaxPotentialBlockSize dtest

* Revert "Add BUILD_CMD in hipOccupancyMaxPotentialBlockSize dtest"

This reverts commit 0480ff56f1441fc515d2c26ce33783e303423938.

* Disable hipOccupancyMaxPotentialBlockSize dtest on NVCC

* move extern declaration of ihipGetDeviceProperties to hip_module.cpp

* Update the limiation of 32 wavefronts per CU and 800/512 SGPRs for VI/pre-VI chips to calculate the occupancy


[ROCm/clr commit: 28c34ead70]
2019-06-20 05:58:29 +05:30
Rahul Garg effbc8b212 HACK for SWDEV-173477/SWDEV-190701
[ROCm/clr commit: 107734f7ad]
2019-06-13 18:15:31 -07:00
Maneesh Gupta b4fb2b0ab4 Merge pull request #1140 from scchan/program_state_stage_2-rebase-20190524
migrate more program_state logic from header into shared library (phase II)

[ROCm/clr commit: 1d5d923d36]
2019-06-05 16:09:01 +05:30
Maneesh Gupta 3d6944e0db Merge branch 'master' into implicit-kernarg
[ROCm/clr commit: d4fa74ff09]
2019-06-04 13:24:19 +05:30
Maneesh Gupta 1a9326b2dd Merge pull request #1155 from gargrahul/fix_kernel_lp_dim_trace
Fix wrong grid dim shown in trace

[ROCm/clr commit: 40a09318e4]
2019-06-04 13:21:39 +05:30
cdevadas 8de283ef77 Runtime changes to append implicit kernel arguments.
Appended 48 empty bytes to the kernarg area at runtime. The implicit arguments are enabled primarily for the hostcall services
and it is completely abstracted from the user code. Enabled it for both hip-clang and hip-hcc.


[ROCm/clr commit: 214ec53da3]
2019-06-04 10:45:49 +05:30
Rahul Garg a8de3fafba Fix wrong grid dim shown in trace
[ROCm/clr commit: 7a2e3b6a1c]
2019-05-31 22:30:24 +05:30
Siu Chi Chan 305eb4239e remove executables() from program_state
[ROCm/clr commit: e2c0122892]
2019-05-24 17:27:01 -04:00
Siu Chi Chan 0cae3e06c1 moving agent_globals_impl into hip_module
[ROCm/clr commit: 6852be819f]
2019-05-24 16:43:38 -04:00
Laurent Morichetti 4c402ccfaf Add support for code object v3
Use the code object manager library to parse the code object metadata. Both
code object v2 and v3 formats are now supported for HCC generated binaries.


[ROCm/clr commit: de89102528]
2019-05-23 18:03:32 -07:00
Alex Voicu a4a3132c64 Add HIPRTC, glorious ersatz for NVRTC (#1097)
* Add ersatz for NVRTC.

* Fix extraneous paren and use correct namespace.

* Use lowerCamelCase (yuck, yuck) consistently.

* Link against FS when building hiprtc lib.

* Correctly mark Manipulators. Fix dual compile.

* Add unit tests. Extend HIT to accept linker options.

* Make sure the HIPRTC library is installed.

* Better logging. Try to auto-detect the target.

* Stop specifying the target explicitly.

* Add missing flavour of `hipModuleLaunchKernel`.

* Program was already destroyed.

* Don't use `--genco`. Fix mangled name trimming.

* Fix HIPRTC breakage due to upstream noise.

* [dtests] Replace RUN -> TEST in hiprtc tests

Change-Id: Ie499e92dfe4e5c94634b1c2b76cf52d241bcfea3

* [hit] Set HIP_PATH to HIP_ROOT_DIR for all tests

Change-Id: Ib0ad1f99bc71c03e363e055dd508a7a4a210680a


[ROCm/clr commit: a538eb705a]
2019-05-16 18:28:54 +05:30
Siu Chi Chan 76f535b4ce 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 f8d108a815.

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

This reverts commit 10048a5631.

* Revert "improve program state commentary"

This reverts commit 5233d41c6c.

* Revert "load program state once per agent"

This reverts commit 9cee2c5311.

* 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


[ROCm/clr commit: 05a1b696da]
2019-05-12 19:24:03 +05:30
Yaxun (Sam) Liu cb81018121 Fix missing arg in HIP_INIT_API
[ROCm/clr commit: 710e633bdd]
2019-04-18 16:18:31 -04:00
Yaxun (Sam) Liu d8acabf24c Fix regression on multi-gpu due to PR#997
[ROCm/clr commit: 5c67ee11f4]
2019-04-05 22:54:41 -04:00
Yaxun Sam Liu 12ac74bad1 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.


[ROCm/clr commit: 8f5c812a68]
2019-03-31 10:08:20 -04:00
Wen-Heng (Jack) Chung cfe930f9d6 Make hipModuleGetGlobal be in HIP runtime so it can be discovered at runtime (#981)
* Make hipModuleGetGlobal be in HIP runtime so it can be discovered at runtime

In HIP PR #929, quite a few HIP public APIs were made as inline functions with
hidden visibility. It was necessary to support applications with shared
libraries with GPU kernels launched via hipLaunchKernelGGL(), after HIP runtime
is initialized.

In empirical tests, the implementation has been proved to be a bit too
excessive, especially for hipModuleGetGlobal(). The function is used by another
type of client applications which relies on the existence of this function
within HIP runtime so global symbols from HSA code objects loaded dynamically
at runtime can be retrieved programmtically.

This commit moves hipModuleGetGlobal() back to src/hip_module.cpp, and makes it
visible and not inline, to fulfill requirements for applications
aforementioned. It does not change the behavior of applications depending on
hipLaunchKernelGGL().

* Add HIP_INIT_API into the implementation of hipModuleGetGlobal

Address review comments.

* Fix failing HIP unit tests


[ROCm/clr commit: 04915cea2f]
2019-03-29 03:45:04 +00:00
Jeff Daily 9cee2c5311 load program state once per agent
[ROCm/clr commit: 2845b4c4b8]
2019-03-27 18:19:10 +00:00
Evgeny a0c8ef2e96 tracing callback layer update
[ROCm/clr commit: 2aa88a4505]
2019-03-14 22:43:52 -05:00
Siu Chi Chan 3951fccb4e Fix memory leak introduced by previous change to Agent_global.
Make Agent_global manage the lifetime of the name string


[ROCm/clr commit: fa564a5345]
2019-03-11 19:51:32 +00:00
Aaron Enye Shi 3562ddf981 Fix Agent_global variables failing hipTestDeviceSymbol
Issue: Header uses std::vector<Agent_global> agent_globals which is created by hip_module.cpp
  - Move iterator fails to copy Agent_global from library source into header version
  - Due to different versions of std::string name in struct Agent_global
Fix: Change Agent_global to use char* name instead of std::string name


[ROCm/clr commit: fcde9fe3df]
2019-03-11 19:51:25 +00:00
Aaron Enye Shi 4326d67550 Fix hash_for undefined reference in hipTestConstant test
Issue: mismatch undefined symbols in different user env
  - Binary expects modified return value std::string&
  - Fails to match libhip_hcc.so: return value is std::string& but doesn't match modified C++ env
Fix: Change return value to char*, create new key std::string in header from char*


[ROCm/clr commit: f8aca3159c]
2019-03-11 19:51:18 +00:00
Maneesh Gupta 2a11a5529e Merge pull request #949 from gargrahul/single_stream_concurrent_kernels
Add extension for kernel concurrency on same stream

[ROCm/clr commit: 3955f2c131]
2019-03-06 17:34:54 +05:30
Alex Voicu 45f4ac5023 dlopen() fixes (#929)
* Initial attempt to switch over to internally linked state.

* Add missing CMake update.

* hipLaunchKernelGGLImpl must be inline as well. Ensure internal linkage.

* Ensure global retrieval uses internally linked state.

* Hide HC in the implementation. Minimise ADL woes.

* Strange software exists, and must be catered to.

* Use a less spammy mechanism for ensuring internal linkage / non-export.

* Remove leftover internal detail.


[ROCm/clr commit: ed48847237]
2019-03-06 17:31:44 +05:30
Rahul Garg f364b32e29 Add extension for kernel concurrency on same stream
[ROCm/clr commit: 263e82a67a]
2019-03-06 12:55:39 +05:30
Wen-Heng (Jack) Chung 2f64c76789 Introduce hash key to HIP module implementation
A hash calculated via FNV-1a algorithm is introduced in ihipModule_t, the
internal of hipModule_t. The hash is used by HIP module APIs such as

- read_agent_global_from_module

to determine whether the agent-scope globals for a module have been iterated.

This commit fixes one issue that applications which load / unload modules
frequently would occasionally fail. After deep investigation of the issue it
turns out the old implementation in read_agent_global_from_module uses
hipModule_t as the key, which is not robust enough, as hipModule_t instances
are allocated dynamically so there are cases that one memory address may be
used by multiple hipModule_t instances. The real solution is to introduce a
uniquely identifiable hash for the code object associated with the HIP module.
And that's the rationale behind this commit.


[ROCm/clr commit: 6e68d44220]
2019-01-08 17:33:40 +00:00
Yaxun Sam Liu f2e2eb68e7 Let hip-clang support --genco
[ROCm/clr commit: 988dcd1e4a]
2018-11-27 15:55:50 -05:00
Maneesh Gupta 938c731b27 Merge pull request #760 from eshcherb/roctracer-hip-frontend-181113
Roctracer hip frontend 181113

[ROCm/clr commit: 99bb89b756]
2018-11-23 11:08:25 +05:30
Michael Kuron 4b77b5c1ba Merge branch 'master' into getsymboladdress
[ROCm/clr commit: e9b88711e2]
2018-11-20 12:03:22 +01:00
Evgeny 96b7f0404e renaming HIP_INIT_CB_API to HIP_INIT_API
[ROCm/clr commit: e362688adf]
2018-11-13 15:33:26 +00:00
Evgeny 6b45949728 adding lost i the merge change
[ROCm/clr commit: a13e035fd9]
2018-11-13 15:33:26 +00:00
Evgeny 7519b3f75e adding activity prof layer
[ROCm/clr commit: 084a68be63]
2018-11-13 15:33:26 +00:00
Rahul Garg ea9ea82fe1 Fixed symbol tracking device index
[ROCm/clr commit: 70bb04cc61]
2018-11-13 07:01:17 +05:30
Maneesh Gupta 387e6de9e6 Merge pull request #721 from fronteer/my-fix
Make correct checking of the returned hipDeviceptr_t from read_global…

[ROCm/clr commit: 0bafc38135]
2018-11-08 11:42:08 +05:30
Michael Kuron a857354072 Introduce ihipModuleGetGlobal
[ROCm/clr commit: 4da2d92281]
2018-11-06 09:54:34 +01:00
Rahul Garg 8856b89b21 Fixes global symbols tracking in hip_module
[ROCm/clr commit: 592efa017f]
2018-10-31 03:22:38 +05:30
Qianfeng Zhang b12c16f72b Make correct checking of the returned hipDeviceptr_t from read_global_description()
[ROCm/clr commit: 443698ce00]
2018-10-23 21:13:11 +08:00
Alex Voicu 677e945726 Update hip_module.cpp
Typo.

[ROCm/clr commit: 43fca684c8]
2018-05-18 17:50:45 +01:00
Alex Voicu 5a9d5a931b Update hip_module.cpp
[ROCm/clr commit: 40a22d235e]
2018-05-14 17:15:36 +01:00
Alex Voicu 2973f68465 Don't use magic constants, they're evil.
Also clarify that the register count cannot be queried at the moment.

[ROCm/clr commit: eded014abc]
2018-05-11 11:31:46 +01:00
Alex Voicu 4e6996282d Add support for the hipFuncGetAttributes interface.
[ROCm/clr commit: bf9529aaa8]
2018-05-11 03:35:10 +01:00
Rahul Garg 181e0ee8ee hip_module code cleanup
-Fixed missing ihipLogStatus in hipModuleLoad()
-Fixed some ihipXXX functions


[ROCm/clr commit: c23898f49b]
2018-04-16 15:35:04 +05:30
Maneesh Gupta 46ddefedee Apply .clangformat to all repo source files
Change-Id: I7e79c6058f0303f9a98911e3b7dd2e8596079344


[ROCm/clr commit: 9e47fccc89]
2018-03-12 11:29:03 +05:30
Alex Voicu eab8624938 Re-sync with upstream.
[ROCm/clr commit: a704bd8b44]
2018-02-12 20:20:24 +00:00
Rahul Garg f15543d5cf Fixed host allocated globals address lookup for host usage
Fixed texture driver APIs failure


[ROCm/clr commit: b8c23f979b]
2018-01-30 18:06:31 +05:30
Rahul Garg 1ee7e7c2f9 Fixed build error
[ROCm/clr commit: d1dcc5025d]
2017-12-28 16:15:45 +05:30