Skip to content

Commit ec42f6b

Browse files
committed
Remove nvml
1 parent d06484b commit ec42f6b

File tree

3 files changed

+9
-115
lines changed

3 files changed

+9
-115
lines changed

Cargo.lock

+1-108
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/cuda/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ log = "0.4"
1212
rand = "0.8"
1313
clap = { version = "3.0", features = ["color", "derive"]}
1414
env_logger = "0.9"
15-
nvml-wrapper = { git = "https://github.com/benrod3k/nvml-wrapper", branch = "495.29.05" }
15+
#nvml-wrapper = { git = "https://github.com/benrod3k/nvml-wrapper", branch = "495.29.05" }
1616

1717
[lib]
1818
crate-type = ["cdylib", "rlib"]

plugins/cuda/src/lib.rs

+7-6
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ use cust::prelude::*;
66
use kaspa_miner::{Plugin, Worker, WorkerSpec};
77
use log::LevelFilter;
88
use log::{error, info};
9-
use nvml_wrapper::Device as NvmlDevice;
10-
use nvml_wrapper::Nvml;
9+
//use nvml_wrapper::Device as NvmlDevice;
10+
//use nvml_wrapper::Nvml;
1111
use std::error::Error as StdError;
1212

1313
pub type Error = Box<dyn StdError + Send + Sync + 'static>;
@@ -22,16 +22,16 @@ const DEFAULT_WORKLOAD_SCALE: f32 = 256.;
2222

2323
pub struct CudaPlugin {
2424
specs: Vec<CudaWorkerSpec>,
25-
nvml_instance: Nvml,
25+
//nvml_instance: Nvml,
2626
_enabled: bool,
2727
}
2828

2929
impl CudaPlugin {
3030
fn new() -> Result<Self, Error> {
3131
cust::init(CudaFlags::empty())?;
3232
env_logger::builder().filter_level(LevelFilter::Info).parse_default_env().init();
33-
let nvml_instance = Nvml::init()?;
34-
Ok(Self { specs: Vec::new(), _enabled: false, nvml_instance })
33+
//let nvml_instance = Nvml::init()?;
34+
Ok(Self { specs: Vec::new(), _enabled: false/*, nvml_instance*/ })
3535
}
3636
}
3737

@@ -62,6 +62,7 @@ impl Plugin for CudaPlugin {
6262
}
6363
};
6464

65+
/*
6566
// if any of cuda_lock_core_clocks / cuda_lock_mem_clocks / cuda_power_limit is valid, init nvml and try to apply
6667
if opts.cuda_lock_core_clocks.is_some()
6768
|| opts.cuda_lock_mem_clocks.is_some()
@@ -109,7 +110,7 @@ impl Plugin for CudaPlugin {
109110
};
110111
};
111112
}
112-
}
113+
}*/
113114

114115
self.specs = (0..gpus.len())
115116
.map(|i| CudaWorkerSpec {

0 commit comments

Comments
 (0)