private void OverClock(INTMinerRoot root, IGpuProfile data) { #if DEBUG Write.Stopwatch.Restart(); #endif if (root.GpuSet.TryGetGpu(data.Index, out IGpu gpu)) { IOverClock overClock = root.GpuSet.OverClock; if (!data.IsAutoFanSpeed) { overClock.SetFanSpeed(data.Index, data.Cool); } overClock.SetCoreClock(data.Index, data.CoreClockDelta, data.CoreVoltage); overClock.SetMemoryClock(data.Index, data.MemoryClockDelta, data.MemoryVoltage); overClock.SetPowerLimit(data.Index, data.PowerCapacity); overClock.SetTempLimit(data.Index, data.TempLimit); if (data.Index == NTMinerRoot.GpuAllId) { Write.UserOk($"统一超频:{data.ToOverClockString()}"); } else { Write.UserOk($"GPU{gpu.Index}超频:{data.ToOverClockString()}"); } overClock.RefreshGpuState(data.Index); } #if DEBUG Write.DevTimeSpan($"耗时{Write.Stopwatch.ElapsedMilliseconds}毫秒 {this.GetType().Name}.OverClock"); #endif }
public void Update(IGpuProfile data) { this.CoinId = data.CoinId; this.Index = data.Index; this.IsAutoFanSpeed = data.IsAutoFanSpeed; Update((IOverClockInput)data); }
private void OverClock(INTMinerContext root, IGpuProfile data) { #if DEBUG NTStopwatch.Start(); #endif if (root.GpuSet.TryGetGpu(data.Index, out IGpu gpu)) { // fanSpeed == -1表示开源自动温控 int fanSpeed = data.IsAutoFanSpeed ? -1 : data.Cool; root.GpuSet.OverClock.OverClock(data.Index, data.CoreClockDelta, data.CoreVoltage, data.MemoryClockDelta, data.MemoryVoltage, data.PowerCapacity, data.TempLimit, fanSpeed); if (data.Index == NTMinerContext.GpuAllId) { NTMinerConsole.UserOk($"统一超频:{data.ToOverClockString()}"); } else { NTMinerConsole.UserOk($"GPU{gpu.Index}超频:{data.ToOverClockString()}"); } 2.SecondsDelay().ContinueWith(t => { root.GpuSet.OverClock.RefreshGpuState(data.Index); }); } #if DEBUG var elapsedMilliseconds = NTStopwatch.Stop(); if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) { NTMinerConsole.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.{nameof(OverClock)}"); } #endif }
private void OverClock(INTMinerContext ntminerContext, IGpuProfile data) { #if DEBUG NTStopwatch.Start(); #endif if (ntminerContext.GpuSet.TryGetGpu(data.Index, out IGpu gpu)) { ntminerContext.GpuSet.OverClock.OverClock(gpuIndex: data.Index, OverClockValue.Create(data)); if (data.Index == NTMinerContext.GpuAllId) { NTMinerConsole.UserOk($"统一超频:{data.ToOverClockString()}"); } else { NTMinerConsole.UserOk($"GPU{gpu.Index}超频:{data.ToOverClockString()}"); } 2.SecondsDelay().ContinueWith(t => { ntminerContext.GpuSet.OverClock.RefreshGpuState(data.Index); }); } #if DEBUG var elapsedMilliseconds = NTStopwatch.Stop(); if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) { NTMinerConsole.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.{nameof(OverClock)}"); } #endif }
public void Update(IGpuProfile data) { this.CoinId = data.CoinId; this.Index = data.Index; this.CoreClockDelta = data.CoreClockDelta; this.MemoryClockDelta = data.MemoryClockDelta; this.PowerCapacity = data.PowerCapacity; this.Cool = data.Cool; }
public void SetCool(IGpuProfile data) { int value = data.Cool; if (value == 0) { return; } // 暂不支持A卡超频 }
public static void OverClock(this IGpuProfile data, IOverClock overClock) { overClock.SetCoreClock(data); overClock.SetMemoryClock(data); overClock.SetPowerCapacity(data); overClock.SetCool(data); TimeSpan.FromSeconds(2).Delay().ContinueWith(t => { overClock.RefreshGpuState(data.Index); }); }
public void SetPowerCapacity(IGpuProfile data) { int value = data.PowerCapacity; if (value == 0) { return; } // 暂不支持A卡超频 }
public GpuProfileViewModel(IGpuProfile data, GpuViewModel gpuVm) : this() { _coinId = data.CoinId; _index = data.Index; _coreClockDelta = data.CoreClockDelta; _memoryClockDelta = data.MemoryClockDelta; _powerCapacity = data.PowerCapacity; _cool = data.Cool; _gpuVm = gpuVm; }
public void Update(IGpuProfile data) { this._coinId = data.CoinId; this._index = data.Index; this._isAutoFanSpeed = data.IsAutoFanSpeed; OnPropertyChanged(nameof(CoinId)); OnPropertyChanged(nameof(Index)); OnPropertyChanged(nameof(IsAutoFanSpeed)); this.Update((IOverClockInput)data); }
public static OverClockValue Create(IGpuProfile gpuProfile) { return(new OverClockValue { IgnoreFanSpeed = gpuProfile.IsAutoFanSpeed, FanSpeed = gpuProfile.Cool, MemoryTimingLevel = gpuProfile.CurrentMemoryTimingLevel, CoreClockMHz = gpuProfile.CoreClockDelta, CoreClockVoltage = gpuProfile.CoreVoltage, MemoryClockMHz = gpuProfile.MemoryClockDelta, MemoryClockVoltage = gpuProfile.MemoryVoltage, PowerLimit = gpuProfile.PowerCapacity, TempLimit = gpuProfile.TempLimit }); }
public GpuProfileViewModel(IGpuProfile data, GpuViewModel gpuVm) : this() { _coinId = data.CoinId; _index = data.Index; _coreClockDelta = data.CoreClockDelta; _memoryClockDelta = data.MemoryClockDelta; _powerCapacity = data.PowerCapacity; _tempLimit = data.TempLimit; _isAutoFanSpeed = data.IsAutoFanSpeed; _cool = data.Cool; _gpuVm = gpuVm; _coreVoltage = data.CoreVoltage; _memoryVoltage = data.MemoryVoltage; }
public void Update(IGpuProfile data) { this._coinId = data.CoinId; this._index = data.Index; this._coreClockDelta = data.CoreClockDelta; this._memoryClockDelta = data.MemoryClockDelta; this._powerCapacity = data.PowerCapacity; this._cool = data.Cool; OnPropertyChanged(nameof(CoinId)); OnPropertyChanged(nameof(Index)); OnPropertyChanged(nameof(CoreClockDelta)); OnPropertyChanged(nameof(MemoryClockDelta)); OnPropertyChanged(nameof(PowerCapacity)); OnPropertyChanged(nameof(Cool)); }
public void SetCoreClock(IGpuProfile data) { int value = data.CoreClockDelta; value = 1000 * value; if (data.Index == NTMinerRoot.GpuAllId) { foreach (var gpu in NTMinerRoot.Current.GpuSet) { if (gpu.Index == NTMinerRoot.GpuAllId) { continue; } Windows.Cmd.RunClose(SpecialPath.NTMinerOverClockFileFullName, $"gpu:{gpu.Index} gclk:{value}"); } } else { Windows.Cmd.RunClose(SpecialPath.NTMinerOverClockFileFullName, $"gpu:{data.Index} gclk:{value}"); } }
private void OverClock(INTMinerRoot root, IGpuProfile data) { if (root.GpuSet.TryGetGpu(data.Index, out IGpu gpu)) { IOverClock overClock = root.GpuSet.OverClock; HashSet <int> effectGpus = new HashSet <int>(); overClock.SetCoreClock(data.Index, data.CoreClockDelta, ref effectGpus); overClock.SetMemoryClock(data.Index, data.MemoryClockDelta, ref effectGpus); overClock.SetPowerCapacity(data.Index, data.PowerCapacity, ref effectGpus); overClock.SetThermCapacity(data.Index, data.TempLimit, ref effectGpus); if (!data.IsAutoFanSpeed) { overClock.SetCool(data.Index, data.Cool, ref effectGpus); } string coreClockText = "默认"; if (data.CoreClockDelta != 0) { coreClockText = data.CoreClockDelta.ToString(); } string memoryClockText = "默认"; if (data.MemoryClockDelta != 0) { memoryClockText = data.MemoryClockDelta.ToString(); } if (data.Index == NTMinerRoot.GpuAllId) { Write.UserLine($"统一超频:核心({coreClockText}),显存({memoryClockText}),功耗({data.PowerCapacity}),温度({data.TempLimit}),风扇({data.Cool})", "超频", ConsoleColor.Yellow); } else { Write.UserLine($"GPU{gpu.Index}超频:核心({coreClockText}),显存({memoryClockText}),功耗({data.PowerCapacity}),温度({data.TempLimit}),风扇({data.Cool})", "超频", ConsoleColor.Yellow); } TimeSpan.FromSeconds(2).Delay().ContinueWith(t => { foreach (var gpuIndex in effectGpus) { overClock.RefreshGpuState(gpuIndex); } }); } }
private void OverClock(INTMinerRoot root, IGpuProfile data) { if (root.GpuSet.TryGetGpu(data.Index, out IGpu gpu)) { IOverClock overClock = root.GpuSet.OverClock; HashSet <int> effectGpus = new HashSet <int>(); overClock.SetCoreClock(data.Index, data.CoreClockDelta, ref effectGpus); overClock.SetMemoryClock(data.Index, data.MemoryClockDelta, ref effectGpus); overClock.SetPowerCapacity(data.Index, data.PowerCapacity, ref effectGpus); overClock.SetThermCapacity(data.Index, data.TempLimit, ref effectGpus); if (!data.IsAutoFanSpeed) { overClock.SetCool(data.Index, data.Cool, ref effectGpus); } TimeSpan.FromSeconds(2).Delay().ContinueWith(t => { foreach (var gpuIndex in effectGpus) { overClock.RefreshGpuState(gpuIndex); } }); } }
private void OverClock(INTMinerRoot root, IGpuProfile data) { if (root.GpuSet.TryGetGpu(data.Index, out IGpu gpu)) { IOverClock overClock = root.GpuSet.OverClock; if (!data.IsAutoFanSpeed) { overClock.SetCool(data.Index, data.Cool); } overClock.SetCoreClock(data.Index, data.CoreClockDelta); overClock.SetMemoryClock(data.Index, data.MemoryClockDelta); overClock.SetPowerCapacity(data.Index, data.PowerCapacity); overClock.SetThermCapacity(data.Index, data.TempLimit); string coreClockText = "默认"; if (data.CoreClockDelta != 0) { coreClockText = data.CoreClockDelta.ToString(); } string memoryClockText = "默认"; if (data.MemoryClockDelta != 0) { memoryClockText = data.MemoryClockDelta.ToString(); } if (data.Index == NTMinerRoot.GpuAllId) { Write.UserLine($"统一超频:核心({coreClockText}),显存({memoryClockText}),功耗({data.PowerCapacity}),温度({data.TempLimit}),风扇({data.Cool})", "超频", ConsoleColor.Yellow); } else { Write.UserLine($"GPU{gpu.Index}超频:核心({coreClockText}),显存({memoryClockText}),功耗({data.PowerCapacity}),温度({data.TempLimit}),风扇({data.Cool})", "超频", ConsoleColor.Yellow); } if (root.GpuSet.GpuType == GpuType.AMD) { overClock.RefreshGpuState(data.Index); } } }
private void OverClock(INTMinerContext root, IGpuProfile data) { #if DEBUG NTStopwatch.Start(); #endif if (root.GpuSet.TryGetGpu(data.Index, out IGpu gpu)) { IOverClock overClock = root.GpuSet.OverClock; if (!data.IsAutoFanSpeed) { overClock.SetFanSpeed(data.Index, data.Cool); } overClock.SetCoreClock(data.Index, data.CoreClockDelta, data.CoreVoltage); overClock.SetMemoryClock(data.Index, data.MemoryClockDelta, data.MemoryVoltage); overClock.SetPowerLimit(data.Index, data.PowerCapacity); overClock.SetTempLimit(data.Index, data.TempLimit); if (data.Index == NTMinerContext.GpuAllId) { NTMinerConsole.UserOk($"统一超频:{data.ToOverClockString()}"); } else { NTMinerConsole.UserOk($"GPU{gpu.Index}超频:{data.ToOverClockString()}"); } 1.SecondsDelay().ContinueWith(t => { overClock.RefreshGpuState(data.Index); }); } #if DEBUG var elapsedMilliseconds = NTStopwatch.Stop(); if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) { NTMinerConsole.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.OverClock"); } #endif }
public void SetCool(IGpuProfile data) { int value = data.Cool; if (value == 0) { return; } if (data.Index == NTMinerRoot.GpuAllId) { foreach (var gpu in NTMinerRoot.Current.GpuSet) { if (gpu.Index == NTMinerRoot.GpuAllId) { continue; } Windows.Cmd.RunClose(SpecialPath.NTMinerOverClockFileFullName, $"gpu:{gpu.Index} cool:{value}"); } } else { Windows.Cmd.RunClose(SpecialPath.NTMinerOverClockFileFullName, $"gpu:{data.Index} cool:{value}"); } }
public void SetMemoryClock(IGpuProfile data) { // 暂不支持A卡超频 }
private GpuProfileViewModel GetGpuProfileVm(Guid coinId, GpuViewModel gpuVm) { IGpuProfile data = NTMinerRoot.Instance.GpuProfileSet.GetGpuProfile(coinId, gpuVm.Index); return(new GpuProfileViewModel(data, gpuVm)); }
public void SetMemoryClock(IGpuProfile data) { // noting need todo }
public OverClockCommand(IGpuProfile input) { this.Input = input; }
public GpuProfileData(IGpuProfile data) { Update(data); }
public void SetPowerCapacity(IGpuProfile data) { // noting need todo }
public static string ToOverClockString(this IGpuProfile gpuProfile) { return($"核心({gpuProfile.CoreClockDelta.ToString()}),核心电压({gpuProfile.CoreVoltage.ToString()}),显存({gpuProfile.MemoryClockDelta.ToString()}),显存电压({gpuProfile.MemoryVoltage.ToString()}),功耗({gpuProfile.PowerCapacity.ToString()}),温度({gpuProfile.TempLimit.ToString()}),风扇({gpuProfile.Cool.ToString()})"); }
public void SetCoreClock(IGpuProfile data) { // 暂不支持A卡超频 }
public void SetCool(IGpuProfile data) { // noting need todo }
public AddOrUpdateGpuProfileCommand(IGpuProfile input) { this.Input = input; }
public void SetCoreClock(IGpuProfile data) { // noting need todo }