mirror of
https://github.com/ilya-zlobintsev/LACT.git
synced 2025-02-25 18:55:26 -06:00
feat: bump amdgpu-sysfs for clear functionality
This commit is contained in:
4
Cargo.lock
generated
4
Cargo.lock
generated
@@ -25,9 +25,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "amdgpu-sysfs"
|
||||
version = "0.9.5"
|
||||
version = "0.9.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ae160ad9551e11cf5aa19fc78b590ee5f8ccfe07f983a99bead7a6680907da30"
|
||||
checksum = "ba5905dc18461f166bcc7422c103ac633d5892fa0f8e1133fc59dd347d0fe7a1"
|
||||
dependencies = [
|
||||
"enum_dispatch",
|
||||
"serde",
|
||||
|
||||
@@ -6,7 +6,7 @@ edition = "2021"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
amdgpu-sysfs = { version = "0.9.5", features = ["serde"] }
|
||||
amdgpu-sysfs = { version = "0.9.6", features = ["serde"] }
|
||||
anyhow = "1.0"
|
||||
bincode = "1.3"
|
||||
nix = "0.26"
|
||||
|
||||
@@ -11,8 +11,8 @@ use amdgpu_sysfs::{
|
||||
};
|
||||
use anyhow::{anyhow, Context};
|
||||
use lact_schema::{
|
||||
ClocksInfo, ClocksTable, ClockspeedStats, DeviceInfo, DeviceStats, FanStats, GpuPciInfo,
|
||||
LinkInfo, PciInfo, PerformanceLevel, PowerStats, VoltageStats, VramStats,
|
||||
ClocksInfo, ClocksTable, ClocksTableGen, ClockspeedStats, DeviceInfo, DeviceStats, FanStats,
|
||||
GpuPciInfo, LinkInfo, PciInfo, PerformanceLevel, PowerStats, VoltageStats, VramStats,
|
||||
};
|
||||
use pciid_parser::Database;
|
||||
use std::{
|
||||
@@ -347,6 +347,13 @@ impl GpuController {
|
||||
{
|
||||
let mut table = self.handle.get_clocks_table()?;
|
||||
|
||||
if let ClocksTableGen::Vega20(ref mut table) = table {
|
||||
// Avoid writing settings to the clocks table except the user-specified ones
|
||||
// There is an issue on some GPU models where the default values are actually outside of the allowed range
|
||||
// See https://github.com/sibradzic/amdgpu-clocks/issues/32#issuecomment-829953519 (part 2) for an example
|
||||
table.clear();
|
||||
}
|
||||
|
||||
if let Some(clockspeed) = config.max_core_clock {
|
||||
table.set_max_sclk(clockspeed)?;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ version = "0.2.2"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
amdgpu-sysfs = { version = "0.9.5", features = ["serde"] }
|
||||
amdgpu-sysfs = { version = "0.9.6", features = ["serde"] }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
indexmap = { version = "*", features = ["serde"] }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user