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
Этот коммит содержится в:
коммит произвёл
Laurent Morichetti
родитель
24f8a50b20
Коммит
bbe1db3810
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user