forked from ROCm/hcc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SWDEV-204509: re-enable printf on all platforms (including CentOS)
printf was previously disabled for two reasons: 1. The format string was parsed using std::regex, which is broken on CentOS. This dependence on std::regex is now replaced with simpler parsing of the format string using string::find_first_of. 2. One unit test in particular, early_finalize, was crashing on the Jenkins build that uses an Ubuntu 16.04 container. The crash was traced to a segfault when trying to flush/delete the printf buffer when the application exits. The reason for the segfault is not yet understood, but simply disabling the deletion removes the crash. Note that the printf buffer is no longer valid at the point of deletion, and the contents of the buffer are flushed after every kernel returns. In addition, this change sets HCC_ENABLE_PRINTF to 0 in the LIT tests by default, and sets it to 1 only for the printf tests under tests/Unit/Printf. See the following github PRs for more details: ROCm#1185 ROCm#1199 ROCm#1169 Change-Id: I7d390745c3abdf3aa3722a3cdab586368ea03771
- Loading branch information
Showing
12 changed files
with
108 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
config.environment['HCC_ENABLE_PRINTF'] = "1" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
tests/Unit/HSA/printf_error_check.cpp → tests/Unit/Printf/printf_error_check.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
tests/Unit/HSA/printf_excess_args.cpp → tests/Unit/Printf/printf_excess_args.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
tests/Unit/HSA/printf_minimal.cpp → tests/Unit/Printf/printf_minimal.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
tests/Unit/HSA/printf_ptr_addr.cpp → tests/Unit/Printf/printf_ptr_addr.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.