mirror of
https://github.com/matrix-construct/construct
synced 2025-03-14 05:20:17 +01:00
ircd:🆑 Increase version buffer width; stop propagation per device.
This commit is contained in:
parent
b0c9c9f8b2
commit
7a0b169375
1 changed files with 11 additions and 2 deletions
13
ircd/cl.cc
13
ircd/cl.cc
|
@ -317,11 +317,11 @@ ircd::cl::init::init_devices()
|
|||
|
||||
// Gather the API versions for the devices.
|
||||
for(size_t i(0); i < platforms; ++i)
|
||||
for(size_t j(0); j < devices[i]; ++j)
|
||||
for(size_t j(0); j < devices[i]; ++j) try
|
||||
{
|
||||
// OpenCL sez:
|
||||
// OpenCL<space><major_version.minor_version><space><vendor-specific information>
|
||||
string_view ver; char buf[32];
|
||||
string_view ver; char buf[256];
|
||||
ver = info(clGetDeviceInfo, device[i][j], CL_DEVICE_VERSION, buf);
|
||||
ver = lstrip(ver, "OpenCL ");
|
||||
ver = split(ver, ' ').first;
|
||||
|
@ -333,6 +333,15 @@ ircd::cl::init::init_devices()
|
|||
api[i][j].major = lex_cast<uint>(major);
|
||||
api[i][j].minor = lex_cast<uint>(minor);
|
||||
}
|
||||
catch(const error &e)
|
||||
{
|
||||
log::error
|
||||
{
|
||||
log, "OpenCL [%u][%u] CL_DEVICE_VERSION :%s",
|
||||
i, j,
|
||||
e.what(),
|
||||
};
|
||||
}
|
||||
|
||||
return devices_total;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue