forked from RainbowMiner/RainbowMiner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GPUtest.ps1
112 lines (84 loc) · 4.47 KB
/
GPUtest.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
using module .\Include.psm1
if ($MyInvocation.MyCommand.Path) {Set-Location (Split-Path $MyInvocation.MyCommand.Path)}
$TestFileName = "gputestresult.txt"
if ($IsWindows -eq $null) {
if ([System.Environment]::OSVersion.Platform -eq "Win32NT") {
$Global:IsWindows = $true
$Global:IsLinux = $false
$Global:IsMacOS = $false
}
}
"GPU-TEST $((Get-Date).ToUniversalTime())" | Out-File $TestFileName -Encoding utf8
"="*80 | Out-File $TestFileName -Append
" " | Out-File $TestFileName -Append
if ($IsWindows) {
Start-Afterburner
"1. Afterburner NVIDIA" | Out-File $TestFileName -Append
"-"*80 | Out-File $TestFileName -Append
" " | Out-File $TestFileName -Append
Get-AfterburnerDevices "NVIDIA" | Out-File $TestFileName -Encoding utf8 -Append
" " | Out-File $TestFileName -Append
"2. Afterburner AMD" | Out-File $TestFileName -Append
"-"*80 | Out-File $TestFileName -Append
" " | Out-File $TestFileName -Append
Get-AfterburnerDevices "AMD" | Out-File $TestFileName -Encoding utf8 -Append
" " | Out-File $TestFileName -Append
"3. OverdriveN" | Out-File $TestFileName -Append
"-"*80 | Out-File $TestFileName -Append
" " | Out-File $TestFileName -Append
Invoke-Exe '.\Includes\OverdriveN.exe' -WorkingDirectory $Pwd -ExpandLines -ExcludeEmptyLines | Out-File $TestFileName -Encoding utf8 -Append
" " | Out-File $TestFileName -Append
"4. nvidia-smi" | Out-File $TestFileName -Append
"-"*80 | Out-File $TestFileName -Append
" " | Out-File $TestFileName -Append
$Arguments = @(
'--query-gpu=gpu_name,utilization.gpu,utilization.memory,temperature.gpu,power.draw,power.limit,fan.speed,pstate,clocks.current.graphics,clocks.current.memory,power.max_limit,power.default_limit'
'--format=csv,noheader'
)
Invoke-Exe ".\Includes\nvidia-smi.exe" -ArgumentList ($Arguments -join ' ') -WorkingDirectory $Pwd -ExpandLines -ExcludeEmptyLines | Out-File $TestFileName -Encoding utf8 -Append
" " | Out-File $TestFileName -Append
"5. OpenCL" | Out-File $TestFileName -Append
"-"*80 | Out-File $TestFileName -Append
" " | Out-File $TestFileName -Append
[OpenCl.Platform]::GetPlatformIDs() | ForEach-Object {
$_ | Out-File $TestFileName -Encoding utf8 -Append
[OpenCl.Device]::GetDeviceIDs($_, [OpenCl.DeviceType]::All) | Out-File $TestFileName -Encoding utf8 -Append
"."*80 | Out-File $TestFileName -Append
}
"6. OverdriveNTool" | Out-File $TestFileName -Append
"-"*80 | Out-File $TestFileName -Append
" " | Out-File $TestFileName -Append
$Arguments = @('-console-only','-getcurrent')
Invoke-Exe ".\Includes\overdriventool.exe" -ArgumentList ($Arguments -join ' ') -WorkingDirectory $Pwd -ExpandLines -ExcludeEmptyLines | Out-File $TestFileName -Encoding utf8 -Append
"7. OdVII" | Out-File $TestFileName -Append
"-"*80 | Out-File $TestFileName -Append
" " | Out-File $TestFileName -Append
$Arguments = @('s')
Invoke-Exe ".\Includes\odvii.exe" -ArgumentList ($Arguments -join ' ') -WorkingDirectory $Pwd -ExpandLines -ExcludeEmptyLines | Out-File $TestFileName -Encoding utf8 -Append
}
if ($IsLinux) {
" " | Out-File $TestFileName -Append
"1. nvidia-smi" | Out-File $TestFileName -Append
"-"*80 | Out-File $TestFileName -Append
" " | Out-File $TestFileName -Append
$Arguments = @(
'--query-gpu=gpu_name,utilization.gpu,utilization.memory,temperature.gpu,power.draw,power.limit,fan.speed,pstate,clocks.current.graphics,clocks.current.memory,power.max_limit,power.default_limit'
'--format=csv,noheader'
)
Invoke-Exe "nvidia-smi" -ArgumentList ($Arguments -join ' ') -WorkingDirectory $Pwd -ExpandLines -ExcludeEmptyLines | Out-File $TestFileName -Encoding utf8 -Append
" " | Out-File $TestFileName -Append
"2. OpenCL" | Out-File $TestFileName -Append
"-"*80 | Out-File $TestFileName -Append
" " | Out-File $TestFileName -Append
[OpenCl.Platform]::GetPlatformIDs() | ForEach-Object {
$_ | Out-File $TestFileName -Encoding utf8 -Append
[OpenCl.Device]::GetDeviceIDs($_, [OpenCl.DeviceType]::All) | Out-File $TestFileName -Encoding utf8 -Append
"."*80 | Out-File $TestFileName -Append
}
}
Write-Host "Done! Now please drop the file"
Write-Host " "
Write-Host $(Resolve-Path $TestFileName | Select-Object -ExpandProperty Path) -ForegroundColor Yellow
Write-Host " "
Write-Host "onto your issue at https://github.com/RainbowMiner/RainbowMiner/issues"
Write-Host " "