kfdtest: Adapt the CWSR test for emulators
The original test takes forever to run on emulators because emulators
are much slower than Asic. So intelligently detect the emulator scenarios
and reduce the run time by slashing the iteration times.
Change-Id: I087f43c04c2b23b5ab2ecaad07533b767c337e94
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
[ROCm/ROCR-Runtime commit: 21cda69ba9]
Этот коммит содержится в:
коммит произвёл
Yong Zhao
родитель
0251b4b0e2
Коммит
a139e04896
@@ -39,6 +39,31 @@ void WaitUntilInput() {
|
||||
} while (dummy != 10); // enter key's ascii value is 10
|
||||
}
|
||||
|
||||
/* fscanf_dec - read a file whose content is a decimal number
|
||||
* @file [IN ] file to read
|
||||
* @num [OUT] number in the file
|
||||
*
|
||||
* It is copied from the same function in libhsakmt
|
||||
*/
|
||||
HSAKMT_STATUS fscanf_dec(const char *file, uint32_t *num)
|
||||
{
|
||||
FILE *fd;
|
||||
HSAKMT_STATUS ret = HSAKMT_STATUS_SUCCESS;
|
||||
|
||||
fd = fopen(file, "r");
|
||||
if (!fd) {
|
||||
LOG() << "Failed to open " << file << std::endl;
|
||||
return HSAKMT_STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
if (fscanf(fd, "%u", num) != 1) {
|
||||
LOG() << "Failed to parse as a decimal: " << file << std::endl;;
|
||||
ret = HSAKMT_STATUS_ERROR;
|
||||
}
|
||||
|
||||
fclose(fd);
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint64_t RoundToPowerOf2(uint64_t val) {
|
||||
int bytes = sizeof(uint64_t);
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user