Граф коммитов

6075 Коммитов

Автор SHA1 Сообщение Дата
Christophe Paquot d208afcb36 SWDEV-281658 - Preserve the callback IDs enum ordering
This change addresses the rocprofiler and HIP backward compatibility
issues. Before this patch, each time the hip_prof_str.h header was
generated, the ordering of the callbacks IDs changed, causing
incompatibilities between tools compiled with the old header and
runtimes compiled with the new headers (or vice versa).

To make the API callback IDs stable, the previous version of the header
is read to extract the enum values so that the same values can be
assigned in the new header.

Also, to make diffing different versions of the hip_prof_str.h easier
to read, all other sections (types, macros, helper functions) are now
alphabetically ordered.

If an update to the checked-in hip_prof_str.h file is required, the
cmake build is aborted and a message printed on stderr. The build will
not be successful until the checked-in hip_prof_str.h and the generated
hip_prof_str.h match.

Change-Id: I38b920e601185f7365a76a6584df91a7e8a11798
2021-07-09 11:17:09 -04:00
Satyanvesh Dittakavi 688288c2e3 SWDEV-1 - Rearrange error conditions in elapsed time
- when the first argument is null API should return hipErrorInvalidValue
- but when first and second argument both are null API was returning hipErrorInvalidHandle causing catch2 event tests to fail

Change-Id: I0978ce8b8462e4baa043be75a40b5bc45b036bb6
2021-07-09 00:47:12 -04:00
Aaron En Ye Shi e5a1f25424 SWDEV-284682 - Revert Workaround RTC macro in vector types
Re-enable __HIPCC_RTC__ in hip_vector_types.h which require
an upstream clang patch, 6823af0ca858b54e09e5be61a19d067ccd0bd6b7.
Once upstream patch has landed in mainline, merge this for
hiprtc functionality.

Change-Id: Ife884e0c3081b307bdadc8bec7804d1d7c60153b
2021-07-08 12:49:04 -04:00
Michael LIAO 45205c5e53 SWDEV-293408 Add atomicInc_system and atomicDec_system
- Also revise the implementation of atomicInc/atomicDec based on clang
  builtins.

Change-Id: Ia5e06e88c7be1da5f8fc7ac70037a120c604e343
2021-07-08 11:42:16 -04:00
Anusha GodavarthySurya 52bc5d7d1f SWDEV-240806 - hipGraph support for nvidia path
Change-Id: Idb51b3ed7ca65474afac0dc714c9097294d46bd2
2021-07-07 06:51:21 -04:00
Maneesh Gupta 1e35b26108 SWDEV-234709 - SWDEV-258907 - Reimplement assert() using the new fprintf_stderr facility
This reverts commit 18234e1d24.

Change-Id: Ic1bbf4e4e6f950934d9ba02224ef61a96bdd0e9b
2021-07-07 00:57:36 -07:00
Rahul Garg 67be27c184 SWDEV-293541 - Update copyright for external reference
Change-Id: I0e7522d24313c1974ff4936c81df3159794ea953
2021-07-06 12:56:39 -04:00
Tao Sang 53b3c8a3fb SWDEV-288593 - Rework "hip-config only adds compile and link options to C++"
This reverts commit b01fb5d72f.
Rework to support old cmake in order to fix mathlibs' failure.

Change-Id: I605fc633ba28df4fca95ceee83671600dd3f0b72
2021-07-05 22:36:37 -04:00
Sarbojit Sarkar 165d417d60 SWDEV-293424 - Included gfx90a and gfx1030
Change-Id: I765890f3476f0983021dea722c4f771c51d53cd2
2021-06-30 23:14:56 -04:00
Anusha GodavarthySurya 942703dfc4 SWDEV-293455 - Fix nvidia build failure on CI
Change-Id: I3fac79c601ba846c6b7d8e5a3b21fdfdf2931c90
2021-06-30 02:55:53 -07:00
jujiang cd23e6b436 SWDEV-286322 - add support for auto-removal of trailing whitespace
Change-Id: I1bddaf78b8ee9f7420553bc67bca8e61193c62a1
2021-06-29 10:33:53 -04:00
Anusha GodavarthySurya e420815e75 SWDEV-290637 - Migrate cmake build from hip to hipamd
Change-Id: I605fc633ba18df4fca95ceee83670600dd3f0b71
2021-06-28 06:23:33 -04:00
Jatin 19a30de0a6 SWDEV-245414 - fix nvcc CI breakage
Change-Id: I34ff533f34cfc2f60abefc0d8f6c6d8266d30f61
2021-06-26 13:31:10 +05:30
Sarbojit Sarkar 7e3c17c023 SWDEV-284435 - StreamOps mapping with cuda drv API
Change-Id: I6ed9196cfe59d9004338206f6dd8d6fb367b3ffa
2021-06-25 12:20:40 -04:00
Sarbojit Sarkar b30543e890 SWDEV-261977 - Fixed function symbols
Change-Id: I70f568d12e66ae02efa16c48786a56ff10628a6b
2021-06-25 01:32:57 -04:00
German Andryeyev 910d8bdfde SWDEV-292018 - Make sure start event is done
HSA signal callback order is undefined. Make sure start event is
also done before calculating the elapsed time.

Change-Id: Ic69bfe336b20cd62ef35194261a5d0d234bc65ce
2021-06-24 20:02:54 -04:00
German Andryeyev 52f5b0fa16 SWDEV-290160 - Add blocking command for callbacks in IPC and graph
Change-Id: I1474e19db6ebf2559e1b2c8dd7d06139bd699835
2021-06-24 17:01:55 -04:00
Aaron En Ye Shi c42308e2e5 SWDEV-286884 - Add CMake hiprtc-builtins library generation part 1
Add the CMake support for generating the hiprtc-builtins
library. Replaces the previous execution of shell script.
For backwards compatibility, link hiprtc pre-processed
object to amdhip64, and support versioning in name.
Add libcmt.lib to Windows link step, due to manually
generated .obj from llvm-mc.

Change-Id: I267be3cf4b241840b35f7f27a0b8659530108b0e
2021-06-24 14:34:47 +00:00
Vladislav Sytchenko 44e8b72267 SWDEV-273235 - Allow overwriting HIP_LLVM_ROOT
Change-Id: I1ae89d97671fff0f2d8968313501893fecc5093c
2021-06-21 11:19:16 -04:00
Maneesh Gupta f4680d98a9 SWDEV-285388 - Bring back the inline asm till we have a proper compiler support
Change-Id: Ibafe33dd8298f6e19f8b6a6d2aa220b633b76862
2021-06-21 09:15:34 -04:00
Sarbojit Sarkar 2d17f2776d SWDEV-261977 - Added HIP symbol version
Change-Id: I108e2112a03351b29c659981023805213704a970
2021-06-21 03:39:37 -04:00
Christophe Paquot 0f7a47a95f SWDEV-281658 - Fix compilation warnings
In file included from /extra/lmoriche/hip-vdi/hip/rocclr/hip_internal.hpp:25,
                 from /extra/lmoriche/hip-vdi/hip/rocclr/hip_hmm.cpp:22:
/extra/lmoriche/hip-vdi/hip/rocclr/hip_prof_api.h: In constructor ‘api_callbacks_table_t::api_callbacks_table_t()’:
/extra/lmoriche/hip-vdi/hip/rocclr/hip_prof_api.h:72:59: warning: ‘void* memset(void*, int, size_t)’ clearing an object of type ‘struct api_callbacks_table_t::hip_cb_table_t’ with no trivial copy-assignment; use value-initialization instead [-Wclass-memaccess]
   72 |      memset(&callbacks_table_, 0, sizeof(callbacks_table_));
      |                                                           ^
/extra/lmoriche/hip-vdi/hip/rocclr/hip_prof_api.h:67:10: note: ‘struct api_callbacks_table_t::hip_cb_table_t’ declared here
   67 |   struct hip_cb_table_t {
      |          ^~~~~~~~~~~~~~

Address the above warning by providing default initialization of the
api_callbacks_table_t::hip_cb_table_t class members.

Change-Id: I69ea7c390c28cf3f8aec57f23566d6a3061a0365
2021-06-18 07:03:35 -07:00
Christophe Paquot f3a54f0823 SWDEV-281658 - Fix the gen-prof-api-str-header target
There is no OUTPUT_FILE option for add_custom_command (it is an option
for execute_process). Instead, redirect stdout to the output file.

Change-Id: Ic649bc6c4f709c3c42166500a72fce5014690a47
2021-06-18 09:57:02 -04:00
Maneesh Gupta a9b4df0ad0 SWDEV-285388 - Allow fallback to asm when builtin not available
Change-Id: Ifeee7f3ad1be9ce9b79cf26008b75102153143a5
2021-06-17 21:21:19 -07:00
Aleksey 4f0bf535c4 SWDEV-284883 - QMCPACK hangs when using rocprof --trace-period
Workaraund fix race condition in api_callbacks_spawner_t destructor.

Change-Id: I77d61492dfa484c3e477805c6f314a00dbb6cc32
2021-06-17 00:24:56 -04:00
Aaron En Ye Shi 3fa21c1d49 SWDEV-285388 - Clean up llvm intrinsics using __asm
Instead of using inline asm, use clang builtins
for llvm intrinsics.

Change-Id: I30287f5a8de035ccd7e48d10e559a8a2e1d389f7
2021-06-16 13:20:44 -04:00
pghafari 8d3542e7d9 SWDEV-245531 - GLInterop: Add Buffer Interop support
Change-Id: Ic32e1f3f985505b9310d2d2bc85b1e10b4166145
2021-06-16 06:02:24 -04:00
Christophe Paquot bea4fa8700 SWDEV-276396 - Implement hipDeviceReset
Add a hip::Stream::destroyAllStreams static function to destroy all streams
Also call MemObjMap::Purge

Change-Id: I6ee7e3f26ab1f1870a9271c65e99fb818134482b
2021-06-15 13:13:09 -04:00
Jatin Chaudhary 2223a508f5 SWDEV-290993 - Fix error seen in __launch_bounds__ seen with -Werror -Wpedantic
Change-Id: If89c681a5e383c30a9233a183db282787e2f0081
2021-06-15 00:36:35 -07:00
Julia Jiang de150e1803 SWDEV-290704 - update hiprtc header with doxygen
Change-Id: I93b7ddd2a89f8a214bca7e67bd5b88f6144b70dd
2021-06-14 15:28:32 -04:00
Vladislav Sytchenko 52ff66f4fc SWDEV-289854 - Revert to using hardcoded library destination
Current packaging assumes that HIP runtime will always be installed in
/opt/rocm/lib. This is false to assume, because some distros like CentOS
will use the lib64 directory instead of lib. Relying on CMake to choose
the library directory for us will default in that case to lib64. Hence
there will be a mismatch between where HIP is installed and where CMake
thinks it is.

Change-Id: I46e405b25bda987e74b095fcb41319f8a504ae41
2021-06-14 04:20:31 -04:00
German Andryeyev dd8265fc87 SWDEV-290367 - Make sure HIP checks for GPU signal
Check GPU signal status for event before falling into CPU command
status validation

Change-Id: I66f15752d7dca550c0fa1a2252ec5a63817391c3
2021-06-11 16:40:00 -04:00
Vladislav Sytchenko 37be0e449a SWDEV-288707 - Fix build
Currently build is only passing because amdhip64 is being built with
headers from /opt/rocm/include. It should be using the headers from
the hipamd project.

Change-Id: I27cb64b460547ef281d368322afac376fa49db51
2021-06-11 13:29:36 -04:00
Sarbojit Sarkar 7866ba9713 SWDEV-290278 - typedef for hiprtcResult
Change-Id: I93f637dd04ce31aee8ef0ba097f1232af9af8d2b
2021-06-11 11:52:38 -04:00
Sarbojit Sarkar 4c5c0419be SWDEV-286147 - Added image support check before using
Change-Id: I4b8ae854bf3488ef2418f0864a15b2fef0a889da
2021-06-11 11:51:08 -04:00
German Andryeyev 9fa1d9ebfa SWDEV-272496 - Enable direct dispatch
Change-Id: I1e550b45d19b4b498af1ffb8f82db70d6a99c908
2021-06-11 10:34:36 -04:00
Saleel Kudchadker 712963a97e SWDEV-247372 - Always enable marker_ts_ events
Change-Id: I7579ba1ee228809ce38f6f130fb33f1164587903
2021-06-11 00:04:21 -04:00
Julia Jiang 1936678084 SWDEV-290704 - Add doxygen in hiprtc
Change-Id: Ib1efb6874472601c0f45fc5c7f85a01e69b0a958
2021-06-10 17:21:25 -04:00
Rahul Garg e0d7fc8909 ROCMOPS - 1956 - Update hipamd CMake
Change-Id: I1b6fa5953a27660b938d7232f0d88c5981624cd9
2021-06-08 00:52:13 +00:00
Rahul Garg 19c84bc604 ROCMOPS-1956 - Push restructured code to hipamd
hipamd will have AMD's ROCCLR based HIP backend implementation

Change-Id: Id7de9634519b4ce46fca71a1b61f3d5b1e3fc459
2021-06-07 21:42:44 +00:00
Rahul Garg f1f1d9d47c SWDEV-288707 - Move amdhip.def
Change-Id: I77f9519d0d098b9cfdd1d09f67b3ab38d848620b
2021-06-07 05:16:16 +00:00
Rahul Garg 260a1fed06 SWDEV-288707 - Merge HIP refactored code to staging
These changes move-
- rocclr based implementation inside src/hipamd/src
- platform specific (both nvidia and amd) headers inside
src/hipamd/include/hip

Change-Id: Ia29791a727244952591fe1d813dcef0303b73a9e
2021-06-07 00:07:24 +00:00
Tao Sang 50d8183d0b SWDEV-287768 - Fix hipTestClock test
Use long long instead of int as clock64() return.

Change-Id: Id3e4645c05959e13f58efd88bc43f3a1d3e50d59
2021-06-04 15:45:07 -04:00
Aaron En Ye Shi 7c8e210c26 SWDEV-283266 - Fix hipRTC script bugs
Remove extra -isystem causing --cuda-device-only flag
to be dropped. Fix missing __hipRTC_header_size symbol.
Add macros which were consumed during pre-processor
generation. Add INT_MAX and CHAR_BIT macros used in
HIP headers.

Change-Id: Id5143e3c8a2b1e7c78658ba84d5ab3b55ac1fa72
2021-06-04 13:58:32 -04:00
Saleel Kudchadker 4381858778 SWDEV-286092 - Guarantee flush for event record
Every event record will guarantee completion when its called.

Change-Id: I8de34714a4ca2e105f36de2818e95ec2903143ce
2021-06-03 15:41:28 -07:00
cjatin 4d69596c66 SWDEV-277697 - Fix ununsed variable error with -Werror,-Wunused-parameter
Change-Id: Iadd0050e6cf4e4858e1508c1f24f73732a1af443
2021-06-03 13:25:07 -04:00
jujiang 0a6d2ea863 SWDEV-279885 - correct HIP doc for managed memory
Change-Id: I94bb307dbe12692eb60cce744424fb18deea28ba
2021-06-03 11:05:18 -04:00
Vladislav Sytchenko e4e9110f97 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 amdhip.def file is being added. The
hip_hcc.def.in file will be removed later, as the Makefile build still
uses it.

Change-Id: Id3e4645c95959e13f50efd88bc43f3a1d3e50d58
2021-06-03 11:00:26 -04:00
Robert Maynard 576af84864 SWDEV-288593 - hip-config only adds compile and link options to C++
Change-Id: Iefc7c3597fc8c8864621ad6154352c9dd56a3e74
2021-06-03 00:18:12 -04:00
German Andryeyev 2b3a4e711b SWDEV-240804 - Add hipMemAdvise() extension
Add coarse grain memory extension. The new advice will allow HMM
to disable cache coherency policy to improve performance

Change-Id: I3c792d6a96896b983a7ffccddaa0ded06d183212
2021-06-02 16:16:14 -04:00