Merge "SWDEV-354868 - skip subtest when number of RT CUs is less than granularity" into amd-staging

此提交包含在:
Todd tiantuo Li
2022-12-09 16:41:03 -05:00
提交者 Gerrit Code Review
當前提交 05f99a45f8
共有 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_