Fix an intermittent failure in "tool flushing test"

The test (MatrixTranspose) and the tracer tool both write to stdout
which sometime causes a trace corruption.

Change the test to emit info messages to stderr instead of stdout,
leaving stdout for the tracer tool's exclusive use.

Change-Id: I18047dbcd9039b70dd24ef6e7e8e9d89b40bedd2
This commit is contained in:
Laurent Morichetti authored and Laurent Morichetti committed 2022-05-12 20:15:37 -04:00
1 förälder 24f8a50b20
incheckning bbe1db3810
3 files changed
+13 -13

No files matched your search

+4 -4
Visa fil
@@ -67,7 +67,7 @@ int main() {
hipDeviceProp_t devProp;
hipGetDeviceProperties(&devProp, 0);
std::cout << "Device name " << devProp.name << std::endl;
std::cerr << "Device name " << devProp.name << std::endl;
int i;
int errors;
@@ -87,7 +87,7 @@ int main() {
uint32_t iterations = 100;
while (iterations-- > 0) {
std::cout << "## Iteration (" << iterations << ") #################" << std::endl;
std::cerr << "## Iteration (" << iterations << ") #################" << std::endl;
// Memory transfer from host to device
hipMemcpy(gpuMatrix, Matrix, NUM * sizeof(float), hipMemcpyHostToDevice);
@@ -124,9 +124,9 @@ int main() {
}
}
if (errors != 0) {
printf("FAILED: %d errors\n", errors);
fprintf(stderr, "FAILED: %d errors\n", errors);
} else {
printf("PASSED!\n");
fprintf(stderr, "PASSED!\n");
}
}