Skip to content

Commit

Permalink
[HIPIFY][ROCm#525][perl] Populate convertedTags pattern with librar…
Browse files Browse the repository at this point in the history
…ies' prefixes

+ Updated regenerated hipify-perl accordingly

[ToDo] Populate with header file names, APIs without prefixes, etc.
  • Loading branch information
emankov committed Apr 8, 2022
1 parent 647ffe3 commit df3687f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/hipify-perl
Original file line number Diff line number Diff line change
Expand Up @@ -7799,7 +7799,7 @@ while (@ARGV) {
transformKernelLaunch();
transformCubNamespace();
if ($print_stats) {
while (/(\b(hip|HIP)([A-Z]|_)\w+\b)/g) {
while (/(\b(hip|HIP|HIP_|hipblas|HIPBLAS_|hipcub|hipdnn|HIPDNN_|hipfft|HIPFFT_|hiprand|HIPRAND_|hiprtc|HIPRTC_|hipsparse|HIPSPARSE_)([A-Z]|_)\w+\b)/g) {
$convertedTags{$1}++;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/CUDA2HIP_Perl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ namespace perl {
*streamPtr.get() << tab_3 << sTansformKernelLaunch << "();" << endl;
*streamPtr.get() << tab_3 << sTransformCubNamespace << "();" << endl;
*streamPtr.get() << tab_3 << "if ($print_stats) {" << endl;
*streamPtr.get() << tab_4 << while_ << "(/(\\b(hip|HIP)([A-Z]|_)\\w+\\b)/g) {" << endl;
*streamPtr.get() << tab_4 << while_ << "(/(\\b(hip|HIP|HIP_|hipblas|HIPBLAS_|hipcub|hipdnn|HIPDNN_|hipfft|HIPFFT_|hiprand|HIPRAND_|hiprtc|HIPRTC_|hipsparse|HIPSPARSE_)([A-Z]|_)\\w+\\b)/g) {" << endl;
*streamPtr.get() << tab_5 << "$convertedTags{$1}++;" << endl_tab_4 << "}" << endl_tab_3 << "}" << endl;
*streamPtr.get() << tab_3 << my << "$hasDeviceCode = $countKeywords + $ft{'device_function'};" << endl;
*streamPtr.get() << tab_3 << unless_ << "($quiet_warnings) {" << endl;
Expand Down

0 comments on commit df3687f

Please sign in to comment.