SWDEV-354868 - skip subtest when number of RT CUs is less than granularity

Change-Id: Ibe0b8a2d462e9a0178a12c224b0192454618cb7c
Этот коммит содержится в:
Todd tiantuo Li
2022-12-06 05:31:52 -08:00
родитель 0f7afda8ef
Коммит a284f9328f
2 изменённых файлов: 13 добавлений и 0 удалений
+12
Просмотреть файл
@@ -80,6 +80,7 @@ void OCLRTQueue::open(unsigned int test, char* units, double& conversion,
cl_uint rtQueues;
#define CL_DEVICE_MAX_REAL_TIME_COMPUTE_QUEUES_AMD 0x404D
#define CL_DEVICE_MAX_REAL_TIME_COMPUTE_UNITS_AMD 0x404E
#define CL_DEVICE_MAX_REAL_TIME_COMPUTE_UNITS_GRANULARITY_AMD 0x403A
error_ = _wrapper->clGetDeviceInfo(devices_[_deviceId],
CL_DEVICE_MAX_REAL_TIME_COMPUTE_QUEUES_AMD,
sizeof(rtQueues), &rtQueues, 0);
@@ -99,6 +100,11 @@ void OCLRTQueue::open(unsigned int test, char* units, double& conversion,
sizeof(maxCUs_), &maxCUs_, 0);
CHECK_RESULT(error_ != CL_SUCCESS, "clGetDeviceInfo failed");
error_ = _wrapper->clGetDeviceInfo(devices_[_deviceId],
CL_DEVICE_MAX_REAL_TIME_COMPUTE_UNITS_GRANULARITY_AMD,
sizeof(rtCUsGranularity_), &rtCUsGranularity_, 0);
CHECK_RESULT(error_ != CL_SUCCESS, "clGetDeviceInfo failed");
program_ = _wrapper->clCreateProgramWithSource(context_, 1, &strKernel, NULL,
&error_);
CHECK_RESULT((error_ != CL_SUCCESS), "clCreateProgramWithSource() failed");
@@ -147,6 +153,12 @@ void OCLRTQueue::run(void) {
} else {
cu_ = rtCUs_;
}
if (cu_ < rtCUsGranularity_) {
printf("The num of CUs is less than granularity, skipping...\n");
return;
}
// Create a real time queue
#define CL_QUEUE_REAL_TIME_COMPUTE_UNITS_AMD 0x404f
const cl_queue_properties cprops[] = {
+1
Просмотреть файл
@@ -43,6 +43,7 @@ class OCLRTQueue : public OCLTestImp {
cl_uint cu_;
cl_uint maxCUs_;
cl_uint rtCUs_;
cl_uint rtCUsGranularity_;
};
#endif // _OCL_RT_QUEUE_H_