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
- 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
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
HSA signal callback order is undefined. Make sure start event is
also done before calculating the elapsed time.
Change-Id: Ic69bfe336b20cd62ef35194261a5d0d234bc65ce
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
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
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
Add a hip::Stream::destroyAllStreams static function to destroy all streams
Also call MemObjMap::Purge
Change-Id: I6ee7e3f26ab1f1870a9271c65e99fb818134482b
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
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
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
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
Add coarse grain memory extension. The new advice will allow HMM
to disable cache coherency policy to improve performance
Change-Id: I3c792d6a96896b983a7ffccddaa0ded06d183212