Skip to content

Commit

Permalink
Update to v 1.4
Browse files Browse the repository at this point in the history
See changelog for details
  • Loading branch information
Kirby0Louise authored Jan 5, 2023
1 parent 20fc1ee commit 7c64b18
Show file tree
Hide file tree
Showing 22 changed files with 123 additions and 36 deletions.
66 changes: 61 additions & 5 deletions TFLOPSCalc/CalcCompute.vb
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
Public Class CalcCompute

Private Shared shaderMultiplier As Integer = 0
Private Shared OpsPerCycleMultiplier As Integer = 0

Public Shared Function calculateCompute(ByVal uarch As uarches, ByVal computeUnits As Integer, ByVal clock As Integer, ByVal giga As Boolean) As Single
shaderMultiplier = getShadersForUarch(uarch)
OpsPerCycleMultiplier = getIPC(uarch)
Dim totalShaders As Integer = shaderMultiplier * computeUnits
If giga Then
Return (totalShaders * clock * 0.002)
Return (totalShaders * clock * (OpsPerCycleMultiplier / 1000))
Else
Return (totalShaders * clock * 0.000002)
Return (totalShaders * clock * (OpsPerCycleMultiplier / 1000000))
End If

End Function
Expand All @@ -17,14 +19,14 @@
If computeUnits = 0 Then
computeUnits = 1
End If
Return Integer.Parse(Math.Ceiling(compute / (computeUnits * getShadersForUarch(uarch) * 2) * 1000000))
Return Integer.Parse(Math.Ceiling(compute / (computeUnits * getShadersForUarch(uarch) * getIPC(uarch)) * 1000000))
End Function

Public Shared Function findReqCUs(ByVal uarch As uarches, ByVal clock As Integer, ByVal compute As Single) As Integer
If clock = 0 Then
clock = 1
End If
Return Integer.Parse(Math.Ceiling(compute / ((clock / 1000) * 2 * getShadersForUarch(uarch)) * 1000))
Return Integer.Parse(Math.Ceiling(compute / ((clock / 1000) * getIPC(uarch) * getShadersForUarch(uarch)) * 1000))
End Function

Public Shared Function getShadersForUarch(ByVal uarch As uarches) As Integer
Expand All @@ -40,7 +42,9 @@
Case uarches.NvidiaTuring
Return 64
Case uarches.NvidiaAmpere
Return 64
Return 128
Case uarches.NvidiaAda
Return 128
Case uarches.AMDGCN1
Return 64
Case uarches.AMDGCN2
Expand All @@ -55,12 +59,61 @@
Return 64
Case uarches.AMDRDNA2
Return 64
Case uarches.AMDRDNA3
Return 64 '64 shaders per CU but they do 4 ops/cycle instead of usual 2
Case uarches.Intelgen8
Return 8
Case uarches.Intelgen9
Return 8
Case uarches.Intelgen11
Return 8
Case uarches.IntelAlchemist
Return 128
Case Else
Return 0
End Select
End Function

Public Shared Function getIPC(ByVal uarch As uarches) As Integer
Select Case uarch
Case uarches.NvidiaFermi
Return 2
Case uarches.NvidiaKepler
Return 2
Case uarches.NvidiaMaxwell
Return 2
Case uarches.NvidiaPascal
Return 2
Case uarches.NvidiaTuring
Return 2
Case uarches.NvidiaAmpere
Return 2
Case uarches.NvidiaAda
Return 2
Case uarches.AMDGCN1
Return 2
Case uarches.AMDGCN2
Return 2
Case uarches.AMDGCN3
Return 2
Case uarches.AMDGCN4
Return 2
Case uarches.AMDVega
Return 2
Case uarches.AMDRDNA1
Return 2
Case uarches.AMDRDNA2
Return 2
Case uarches.AMDRDNA3
Return 4 '64 shaders per CU but they do 4 ops/cycle instead of usual 2
Case uarches.Intelgen8
Return 2
Case uarches.Intelgen9
Return 2
Case uarches.Intelgen11
Return 2
Case uarches.IntelAlchemist
Return 2
Case Else
Return 0
End Select
Expand All @@ -73,16 +126,19 @@
NvidiaPascal
NvidiaTuring
NvidiaAmpere
NvidiaAda
AMDGCN1
AMDGCN2
AMDGCN3
AMDGCN4
AMDVega
AMDRDNA1
AMDRDNA2
AMDRDNA3
Intelgen8
Intelgen9
Intelgen11
IntelAlchemist
End Enum

End Class
Binary file modified TFLOPSCalc/bin/Debug/TFLOPSCalc.exe
Binary file not shown.
Binary file modified TFLOPSCalc/bin/Debug/TFLOPSCalc.pdb
Binary file not shown.
Binary file modified TFLOPSCalc/bin/Release/TFLOPSCalc.exe
Binary file not shown.
Binary file modified TFLOPSCalc/bin/Release/TFLOPSCalc.pdb
Binary file not shown.
6 changes: 3 additions & 3 deletions TFLOPSCalc/frmMain.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion TFLOPSCalc/frmMain.resx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
<value>Simple TFLOPS calculator for the next-gen world
Created because I was sick of seeing fake leaks that don't even pass basic math sanity checks and being asked about how many TFLOPS a system would have

v 1.3.1
v 1.4

Developed by</value>
</data>
Expand Down
81 changes: 54 additions & 27 deletions TFLOPSCalc/frmMain.vb
Original file line number Diff line number Diff line change
Expand Up @@ -41,35 +41,44 @@
currentUarch = CalcCompute.uarches.NvidiaAmpere
lblStep2.Text = "Step 2: Enter number of SMs"
Case 6
currentUarch = CalcCompute.uarches.NvidiaAda
lblStep2.Text = "Step 2: Enter number of SMs"
Case 7
currentUarch = CalcCompute.uarches.AMDGCN1
lblStep2.Text = "Step 2: Enter number of CUs"
Case 7
Case 8
currentUarch = CalcCompute.uarches.AMDGCN2
lblStep2.Text = "Step 2: Enter number of CUs"
Case 8
Case 9
currentUarch = CalcCompute.uarches.AMDGCN3
lblStep2.Text = "Step 2: Enter number of CUs"
Case 9
Case 10
currentUarch = CalcCompute.uarches.AMDGCN4
lblStep2.Text = "Step 2: Enter number of CUs"
Case 10
Case 11
currentUarch = CalcCompute.uarches.AMDVega
lblStep2.Text = "Step 2: Enter number of CUs"
Case 11
Case 12
currentUarch = CalcCompute.uarches.AMDRDNA1
lblStep2.Text = "Step 2: Enter number of CUs"
Case 12
Case 13
currentUarch = CalcCompute.uarches.AMDRDNA2
lblStep2.Text = "Step 2: Enter number of CUs"
Case 13
Case 14
currentUarch = CalcCompute.uarches.AMDRDNA3
lblStep2.Text = "Step 2: Enter number of CUs"
Case 15
currentUarch = CalcCompute.uarches.Intelgen8
lblStep2.Text = "Step 2: Enter number of EUs"
Case 14
Case 16
currentUarch = CalcCompute.uarches.Intelgen9
lblStep2.Text = "Step 2: Enter number of EUs"
Case 15
Case 17
currentUarch = CalcCompute.uarches.Intelgen11
lblStep2.Text = "Step 2: Enter number of EUs"
Case 18
currentUarch = CalcCompute.uarches.IntelAlchemist
lblStep2.Text = "Step 2: Enter number of Xe Cores"
End Select

lblTFLOPS.Text = CalcCompute.calculateCompute(currentUarch, nudComputeUnits.Value, tbClockSpeed.Value, False) & "TFLOPS"
Expand Down Expand Up @@ -109,35 +118,44 @@
currentUarch = CalcCompute.uarches.NvidiaAmpere
lblStep2a.Text = "Step 2: Enter number of SMs"
Case 6
currentUarch = CalcCompute.uarches.NvidiaAda
lblStep2a.Text = "Step 2: Enter number of SMs"
Case 7
currentUarch = CalcCompute.uarches.AMDGCN1
lblStep2a.Text = "Step 2: Enter number of CUs"
Case 7
Case 8
currentUarch = CalcCompute.uarches.AMDGCN2
lblStep2a.Text = "Step 2: Enter number of CUs"
Case 8
Case 9
currentUarch = CalcCompute.uarches.AMDGCN3
lblStep2a.Text = "Step 2: Enter number of CUs"
Case 9
Case 10
currentUarch = CalcCompute.uarches.AMDGCN4
lblStep2a.Text = "Step 2: Enter number of CUs"
Case 10
Case 11
currentUarch = CalcCompute.uarches.AMDVega
lblStep2a.Text = "Step 2: Enter number of CUs"
Case 11
Case 12
currentUarch = CalcCompute.uarches.AMDRDNA1
lblStep2a.Text = "Step 2: Enter number of CUs"
Case 12
Case 13
currentUarch = CalcCompute.uarches.AMDRDNA2
lblStep2a.Text = "Step 2: Enter number of CUs"
Case 13
Case 14
currentUarch = CalcCompute.uarches.AMDRDNA3
lblStep2a.Text = "Step 2: Enter number of CUs"
Case 15
currentUarch = CalcCompute.uarches.Intelgen8
lblStep2a.Text = "Step 2: Enter number of EUs"
Case 14
Case 16
currentUarch = CalcCompute.uarches.Intelgen9
lblStep2a.Text = "Step 2: Enter number of EUs"
Case 15
Case 17
currentUarch = CalcCompute.uarches.Intelgen11
lblStep2a.Text = "Step 2: Enter number of EUs"
Case 18
currentUarch = CalcCompute.uarches.IntelAlchemist
lblStep2a.Text = "Step 2: Enter number of Xe Cores"
End Select

Dim result As Single = 0
Expand Down Expand Up @@ -193,35 +211,44 @@
currentUarch = CalcCompute.uarches.NvidiaAmpere
computeUnitName = "SMs"
Case 6
currentUarch = CalcCompute.uarches.NvidiaAda
computeUnitName = "SMs"
Case 7
currentUarch = CalcCompute.uarches.AMDGCN1
computeUnitName = "CUs"
Case 7
Case 8
currentUarch = CalcCompute.uarches.AMDGCN2
computeUnitName = "CUs"
Case 8
Case 9
currentUarch = CalcCompute.uarches.AMDGCN3
computeUnitName = "CUs"
Case 9
Case 10
currentUarch = CalcCompute.uarches.AMDGCN4
computeUnitName = "CUs"
Case 10
Case 11
currentUarch = CalcCompute.uarches.AMDVega
computeUnitName = "CUs"
Case 11
Case 12
currentUarch = CalcCompute.uarches.AMDRDNA1
computeUnitName = "CUs"
Case 12
Case 13
currentUarch = CalcCompute.uarches.AMDRDNA2
computeUnitName = "CUs"
Case 13
Case 14
currentUarch = CalcCompute.uarches.AMDRDNA3
computeUnitName = "CUs"
Case 15
currentUarch = CalcCompute.uarches.Intelgen8
computeUnitName = "EUs"
Case 14
Case 16
currentUarch = CalcCompute.uarches.Intelgen9
computeUnitName = "EUs"
Case 15
Case 17
currentUarch = CalcCompute.uarches.Intelgen11
computeUnitName = "EUs"
Case 18
currentUarch = CalcCompute.uarches.IntelAlchemist
computeUnitName = "Xe Cores"
End Select

Dim result As Single = 0
Expand Down
Binary file modified TFLOPSCalc/obj/Debug/TFLOPSCalc.exe
Binary file not shown.
Binary file modified TFLOPSCalc/obj/Debug/TFLOPSCalc.pdb
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
825fabfeba9ab915f6ca2c6a9efcd87fa6c180f1
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ C:\Users\darkm\source\repos\TFLOPSCalc\TFLOPSCalc\obj\Debug\TFLOPSCalc.vbproj.Ge
C:\Users\darkm\source\repos\TFLOPSCalc\TFLOPSCalc\obj\Debug\TFLOPSCalc.exe
C:\Users\darkm\source\repos\TFLOPSCalc\TFLOPSCalc\obj\Debug\TFLOPSCalc.xml
C:\Users\darkm\source\repos\TFLOPSCalc\TFLOPSCalc\obj\Debug\TFLOPSCalc.pdb
C:\Users\darkm\source\repos\TFLOPSCalc\TFLOPSCalc\obj\Debug\TFLOPSCalc.vbproj.CoreCompileInputs.cache
Binary file modified TFLOPSCalc/obj/Debug/TFLOPSCalc.vbproj.GenerateResource.cache
Binary file not shown.
Binary file modified TFLOPSCalc/obj/Debug/TFLOPSCalc.vbprojAssemblyReference.cache
Binary file not shown.
Binary file modified TFLOPSCalc/obj/Release/DesignTimeResolveAssemblyReferences.cache
Binary file not shown.
Binary file modified TFLOPSCalc/obj/Release/TFLOPSCalc.exe
Binary file not shown.
Binary file modified TFLOPSCalc/obj/Release/TFLOPSCalc.frmMain.resources
Binary file not shown.
Binary file modified TFLOPSCalc/obj/Release/TFLOPSCalc.pdb
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
945e1f7ffb9d4be44f98a310dcdf243d8cf99acc
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ C:\Users\darkm\source\repos\TFLOPSCalc\TFLOPSCalc\obj\Release\TFLOPSCalc.vbproj.
C:\Users\darkm\source\repos\TFLOPSCalc\TFLOPSCalc\obj\Release\TFLOPSCalc.exe
C:\Users\darkm\source\repos\TFLOPSCalc\TFLOPSCalc\obj\Release\TFLOPSCalc.xml
C:\Users\darkm\source\repos\TFLOPSCalc\TFLOPSCalc\obj\Release\TFLOPSCalc.pdb
C:\Users\darkm\source\repos\TFLOPSCalc\TFLOPSCalc\obj\Release\TFLOPSCalc.vbproj.CoreCompileInputs.cache
Binary file modified TFLOPSCalc/obj/Release/TFLOPSCalc.vbproj.GenerateResource.cache
Binary file not shown.
Binary file modified TFLOPSCalc/obj/Release/TFLOPSCalc.vbprojAssemblyReference.cache
Binary file not shown.

0 comments on commit 7c64b18

Please sign in to comment.