mirror of
https://github.com/xmrig/xmrig.git
synced 2025-01-09 20:39:27 +00:00
OpenCL backend disabled by default.
This commit is contained in:
parent
d9dc6a396f
commit
3e42fa28df
5 changed files with 16 additions and 9 deletions
|
@ -1,4 +1,5 @@
|
||||||
# v4.0.2-beta
|
# v4.0.2-beta
|
||||||
|
- **OpenCL backend disabled by default.**.
|
||||||
- [#1183](https://github.com/xmrig/xmrig/issues/1183) Fixed compatibility with systemd.
|
- [#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.
|
- [#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.
|
- Added command line option `--no-cpu` to disable CPU backend.
|
||||||
|
|
|
@ -215,16 +215,18 @@ void xmrig::OclConfig::read(const rapidjson::Value &value)
|
||||||
|
|
||||||
setPlatform(Json::getValue(value, kPlatform));
|
setPlatform(Json::getValue(value, kPlatform));
|
||||||
|
|
||||||
if (isEnabled()) {
|
m_threads.read(value);
|
||||||
m_threads.read(value);
|
|
||||||
|
|
||||||
generate();
|
generate();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (value.IsBool() && value.IsFalse()) {
|
else if (value.IsBool()) {
|
||||||
m_enabled = false;
|
m_enabled = value.GetBool();
|
||||||
|
|
||||||
|
generate();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
m_shouldSave = true;
|
||||||
|
|
||||||
generate();
|
generate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -232,6 +234,10 @@ void xmrig::OclConfig::read(const rapidjson::Value &value)
|
||||||
|
|
||||||
void xmrig::OclConfig::generate()
|
void xmrig::OclConfig::generate()
|
||||||
{
|
{
|
||||||
|
if (!isEnabled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!OclLib::init(loader())) {
|
if (!OclLib::init(loader())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ private:
|
||||||
void setPlatform(const rapidjson::Value &platform);
|
void setPlatform(const rapidjson::Value &platform);
|
||||||
|
|
||||||
bool m_cache = true;
|
bool m_cache = true;
|
||||||
bool m_enabled = true;
|
bool m_enabled = false;
|
||||||
bool m_shouldSave = false;
|
bool m_shouldSave = false;
|
||||||
String m_loader;
|
String m_loader;
|
||||||
String m_platformVendor;
|
String m_platformVendor;
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
"cn-lite/0": false
|
"cn-lite/0": false
|
||||||
},
|
},
|
||||||
"opencl": {
|
"opencl": {
|
||||||
"enabled": true,
|
"enabled": false,
|
||||||
"cache": true,
|
"cache": true,
|
||||||
"loader": null,
|
"loader": null,
|
||||||
"platform": "AMD",
|
"platform": "AMD",
|
||||||
|
|
|
@ -63,7 +63,7 @@ R"===(
|
||||||
"cn-lite/0": false
|
"cn-lite/0": false
|
||||||
},
|
},
|
||||||
"opencl": {
|
"opencl": {
|
||||||
"enabled": true,
|
"enabled": false,
|
||||||
"cache": true,
|
"cache": true,
|
||||||
"loader": null,
|
"loader": null,
|
||||||
"platform": "AMD",
|
"platform": "AMD",
|
||||||
|
|
Loading…
Reference in a new issue