mirror of
https://github.com/matrix-construct/construct
synced 2025-01-08 13:55:59 +01:00
ircd:🆑 Stop propagation of platform and device initialization errors.
This commit is contained in:
parent
7904fa0563
commit
dd6d17433e
1 changed files with 23 additions and 0 deletions
23
ircd/cl.cc
23
ircd/cl.cc
|
@ -355,6 +355,7 @@ ircd::cl::init::fini_libs()
|
||||||
|
|
||||||
size_t
|
size_t
|
||||||
ircd::cl::init::init_platforms()
|
ircd::cl::init::init_platforms()
|
||||||
|
try
|
||||||
{
|
{
|
||||||
// OpenCL sez platform=null is implementation defined.
|
// OpenCL sez platform=null is implementation defined.
|
||||||
constexpr auto ignore(CL_INVALID_PLATFORM);
|
constexpr auto ignore(CL_INVALID_PLATFORM);
|
||||||
|
@ -365,9 +366,21 @@ ircd::cl::init::init_platforms()
|
||||||
|
|
||||||
return platforms;
|
return platforms;
|
||||||
}
|
}
|
||||||
|
catch(const std::exception &e)
|
||||||
|
{
|
||||||
|
log::logf
|
||||||
|
{
|
||||||
|
log, log::level::DERROR,
|
||||||
|
"OpenCL platforms initialization :%s",
|
||||||
|
e.what(),
|
||||||
|
};
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
size_t
|
size_t
|
||||||
ircd::cl::init::init_devices()
|
ircd::cl::init::init_devices()
|
||||||
|
try
|
||||||
{
|
{
|
||||||
// Get the devices.
|
// Get the devices.
|
||||||
size_t devices_total(0);
|
size_t devices_total(0);
|
||||||
|
@ -414,6 +427,16 @@ ircd::cl::init::init_devices()
|
||||||
|
|
||||||
return devices_total;
|
return devices_total;
|
||||||
}
|
}
|
||||||
|
catch(const std::exception &e)
|
||||||
|
{
|
||||||
|
log::error
|
||||||
|
{
|
||||||
|
log, "OpenCL devices initialization :%s",
|
||||||
|
e.what(),
|
||||||
|
};
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
size_t
|
size_t
|
||||||
ircd::cl::init::init_ctxs()
|
ircd::cl::init::init_ctxs()
|
||||||
|
|
Loading…
Reference in a new issue