summaryrefslogtreecommitdiffstats
path: root/backend/nvidia/autoAdjust.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'backend/nvidia/autoAdjust.hpp')
-rw-r--r--backend/nvidia/autoAdjust.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/backend/nvidia/autoAdjust.hpp b/backend/nvidia/autoAdjust.hpp
index 0e6c40f..659bd08 100644
--- a/backend/nvidia/autoAdjust.hpp
+++ b/backend/nvidia/autoAdjust.hpp
@@ -85,11 +85,13 @@ private:
ConfigEditor configTpl{};
configTpl.set( std::string(tpl) );
+ constexpr size_t byte2mib = 1024u * 1024u;
std::string conf;
int i = 0;
for(auto& ctx : nvidCtxVec)
{
-
+ conf += std::string(" // gpu: ") + ctx.name + " architecture: " + std::to_string(ctx.device_arch[0] * 10 + ctx.device_arch[1]) + "\n";
+ conf += std::string(" // memory: ") + std::to_string(ctx.free_device_memory / byte2mib) + "/" + std::to_string(ctx.total_device_memory / byte2mib) + " MiB\n";
conf += std::string(" { \"index\" : ") + std::to_string(ctx.device_id) + ",\n" +
" \"threads\" : " + std::to_string(ctx.device_threads) + ", \"blocks\" : " + std::to_string(ctx.device_blocks) + ",\n" +
" \"bfactor\" : " + std::to_string(ctx.device_bfactor) + ", \"bsleep\" : " + std::to_string(ctx.device_bsleep) + ",\n" +
@@ -100,7 +102,7 @@ private:
configTpl.replace("GPUCONFIG",conf);
configTpl.write("nvidia.txt");
- printer::inst()->print_msg(L0, "CPU configuration stored in file '%s'", "nvidia.txt");
+ printer::inst()->print_msg(L0, "NVIDIA: GPU configuration stored in file '%s'", "nvidia.txt");
}
std::vector<nvid_ctx> nvidCtxVec;
OpenPOWER on IntegriCloud