Commit Graph

8 Commits

Author SHA1 Message Date
Vikram 1f8ead914a SWDEV-423946 - Make hash string to int conversion platform independent
The "long" type size seems to be platform dependent, causing hash value
overflow on implementations where "long" is 4 bytes. This addresses the
scenario.

Change-Id: I4e3c0df457e35b139dcc496d832210ba2cb849ba
2023-11-14 12:01:44 -05:00
Vikram 7b6a8f1702 SWDEV-354050 - Runtime support for HIP non hostcall printf
Relates to https://reviews.llvm.org/D150427,

Each printf call populates buffer with following data
1. Control DWord - contains info regarding stream, format string constness and size of data frame
   (see http://gerrit-git.amd.com/c/lightning/ec/device-libs/+/857722 for more info)
2. Hash of the format string (if constant) else the format string itself
3. Printf arguments (each aligned to 8 byte boundary)

Change-Id: I7e320deb343921b4b4cfaf08a2be2883e0bc1f65
2023-05-26 01:55:20 -04:00
Jeremy Newton 70bdb7a597 SWDEV-1 - device: Add missing include
Newer GCC's seem to require this.

Change-Id: I85926d4fa552b772f2eb9f8ede7863a546c47f54
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
2023-02-09 14:57:14 -05:00
Satyanvesh Dittakavi e20dd61932 SWDEV-306939 - Fix vdi errors/warnings by CppCheck
Change-Id: I56d910f8363787f1050d5d7e8064ed553c5827fd
2022-01-12 00:22:16 -05:00
agunashe d96481fb36 SWDEV-293742 - Update copyright end year VDI repo
Change-Id: I69d2fea4a7a43adf96ccea794270e4af991c5261
2021-08-22 23:56:07 -07:00
Siu Chi Chan 8341fd31d1 SWDEV-286082 - Fix C string processing in GPU printf
This fixes an issue in hostcall when processing printf of a C string.
The calculation to round-up the string size to the next data chunk
didn't include the extra byte for the null terminating character.

Change-Id: I4cf0c250fa4fda253b0db15be461819ffce76d32
2021-05-17 12:41:19 -04:00
Sameer Sahasrabuddhe e0ac6b4fc5 SWDEV-234709: redirect printf to stderr if specified by device code
The first qword in the printf messages is called the control
qword. If the LSB is set, then the output of the printf is now
redirected to stderr instead of stdout.

Change-Id: I391e04e6e8e0f231fda56f3a6e02703bf50e1924
2021-01-11 01:36:00 -05:00
Aryan Salmanpour 1bd265f8d6 move hostcall-based implementation of messages/printf from rocm backend to the common device layer
SWDEV-232428

Change-Id: I14b774e66a1783569c6d34d8759c1faa5f340e27
2020-06-18 13:49:28 -04:00