OpenCL backend disabled by default.

This commit is contained in:
XMRig 2019-09-23 05:51:46 +07:00
parent d9dc6a396f
commit 3e42fa28df
5 changed files with 16 additions and 9 deletions

View file

@ -1,4 +1,5 @@
# v4.0.2-beta
- **OpenCL backend disabled by default.**.
- [#1183](https://github.com/xmrig/xmrig/issues/1183) Fixed compatibility with systemd.
- [#1185](https://github.com/xmrig/xmrig/pull/1185) Added JIT compiler for RandomX on ARMv8.
- Added command line option `--no-cpu` to disable CPU backend.

View file

@ -215,16 +215,18 @@ void xmrig::OclConfig::read(const rapidjson::Value &value)
setPlatform(Json::getValue(value, kPlatform));
if (isEnabled()) {
m_threads.read(value);
m_threads.read(value);
generate();
}
generate();
}
else if (value.IsBool() && value.IsFalse()) {
m_enabled = false;
else if (value.IsBool()) {
m_enabled = value.GetBool();
generate();
}
else {
m_shouldSave = true;
generate();
}
}
@ -232,6 +234,10 @@ void xmrig::OclConfig::read(const rapidjson::Value &value)
void xmrig::OclConfig::generate()
{
if (!isEnabled()) {
return;
}
if (!OclLib::init(loader())) {
return;
}

View file

@ -56,7 +56,7 @@ private:
void setPlatform(const rapidjson::Value &platform);
bool m_cache = true;
bool m_enabled = true;
bool m_enabled = false;
bool m_shouldSave = false;
String m_loader;
String m_platformVendor;

View file

@ -29,7 +29,7 @@
"cn-lite/0": false
},
"opencl": {
"enabled": true,
"enabled": false,
"cache": true,
"loader": null,
"platform": "AMD",

View file

@ -63,7 +63,7 @@ R"===(
"cn-lite/0": false
},
"opencl": {
"enabled": true,
"enabled": false,
"cache": true,
"loader": null,
"platform": "AMD",