mirror of
https://github.com/GOSTSec/ccminer
synced 2025-01-26 14:34:22 +00:00
stats: submit real freqs and plimit to yiimp benchmarks
This commit is contained in:
parent
ef44e88ef9
commit
aaa24a6262
2
nvml.cpp
2
nvml.cpp
@ -526,6 +526,8 @@ int nvml_set_plimit(nvml_handle *nvmlh, int dev_id)
|
||||
if (rc != NVML_SUCCESS) {
|
||||
applog(LOG_WARNING, "GPU #%d: plimit %s", dev_id, nvmlh->nvmlErrorString(rc));
|
||||
return -1;
|
||||
} else {
|
||||
device_plimit[dev_id] = plimit / 1000;
|
||||
}
|
||||
|
||||
if (!opt_quiet) {
|
||||
|
14
util.cpp
14
util.cpp
@ -1627,6 +1627,7 @@ static bool stratum_get_algo(struct stratum_ctx *sctx, json_t *id, json_t *param
|
||||
#include "nvml.h"
|
||||
extern char driver_version[32];
|
||||
extern int cuda_arch[MAX_GPUS];
|
||||
extern uint32_t device_plimit[MAX_GPUS];
|
||||
|
||||
static bool json_object_set_error(json_t *result, int code, const char *msg)
|
||||
{
|
||||
@ -1643,7 +1644,7 @@ static bool stratum_benchdata(json_t *result, json_t *params, int thr_id)
|
||||
char vid[32], arch[8], driver[32];
|
||||
char *card;
|
||||
char os[8];
|
||||
uint32_t watts = 0;
|
||||
uint32_t watts = 0, plimit = 0;
|
||||
int dev_id = device_map[thr_id];
|
||||
int cuda_ver = cuda_version();
|
||||
struct cgpu_info *cgpu = &thr_info[thr_id].gpu;
|
||||
@ -1660,9 +1661,13 @@ static bool stratum_benchdata(json_t *result, json_t *params, int thr_id)
|
||||
cuda_gpu_info(cgpu);
|
||||
#ifdef USE_WRAPNVML
|
||||
cgpu->has_monitoring = true;
|
||||
cgpu->gpu_power = gpu_power(cgpu); // mWatts
|
||||
if (cgpu->monitor.gpu_power)
|
||||
cgpu->gpu_power = cgpu->monitor.gpu_power;
|
||||
else
|
||||
cgpu->gpu_power = gpu_power(cgpu); // mWatts
|
||||
watts = (cgpu->gpu_power >= 1000) ? cgpu->gpu_power / 1000 : 0; // ignore nvapi %
|
||||
gpu_info(cgpu);
|
||||
plimit = device_plimit[dev_id] > 0 ? device_plimit[dev_id] : 0;
|
||||
gpu_info(cgpu); // vid/pid
|
||||
#endif
|
||||
get_currentalgo(algo, sizeof(algo));
|
||||
|
||||
@ -1686,7 +1691,10 @@ static bool stratum_benchdata(json_t *result, json_t *params, int thr_id)
|
||||
json_object_set_new(val, "arch", json_string(arch));
|
||||
json_object_set_new(val, "freq", json_integer(cgpu->gpu_clock/1000));
|
||||
json_object_set_new(val, "memf", json_integer(cgpu->gpu_memclock/1000));
|
||||
json_object_set_new(val, "curr_freq", json_integer(cgpu->monitor.gpu_clock));
|
||||
json_object_set_new(val, "curr_memf", json_integer(cgpu->monitor.gpu_memclock));
|
||||
json_object_set_new(val, "power", json_integer(watts));
|
||||
json_object_set_new(val, "plimit", json_integer(plimit));
|
||||
json_object_set_new(val, "khashes", json_real(cgpu->khashes));
|
||||
json_object_set_new(val, "intensity", json_real(cgpu->intensity));
|
||||
json_object_set_new(val, "throughput", json_integer(cgpu->throughput));
|
||||
|
Loading…
x
Reference in New Issue
Block a user