wip on multiple fixes

This commit is contained in:
Concedo 2025-03-15 10:50:36 +08:00
parent 4a29e216e7
commit 4212f0b8e8
5 changed files with 154 additions and 70 deletions

View file

@ -50,6 +50,7 @@ int main(void) {
unsigned number;
cl_device_type type;
char name[128];
cl_ulong global_mem_size;
};
enum { NPLAT = 16, NDEV = 16 };
@ -94,7 +95,8 @@ int main(void) {
d->platform = p;
CL_CHECK(clGetDeviceInfo(d->id, CL_DEVICE_NAME, sizeof(d->name), &d->name, NULL));
CL_CHECK(clGetDeviceInfo(d->id, CL_DEVICE_TYPE, sizeof(d->type), &d->type, NULL));
std::string devicetemplate = "{\"CL_DEVICE_NAME\":\"" + std::string(d->name) + "\"}";
CL_CHECK(clGetDeviceInfo(d->id, CL_DEVICE_GLOBAL_MEM_SIZE, sizeof(d->global_mem_size), &d->global_mem_size, NULL));
std::string devicetemplate = "{\"CL_DEVICE_NAME\":\"" + std::string(d->name) + "\", \"CL_DEVICE_GLOBAL_MEM_SIZE\":"+std::to_string(d->global_mem_size)+"}";
if(j>0)
{
devicetemplate = ","+devicetemplate;