Skip to content

Commit 52fd69c

Browse files
garloffmbuechse
andauthored
Shorten GPU names by dropping h. Fix intel Gen 12.7. (#786)
* Shorten GPU names by dropping h. Fix intel Gen 12.7. Plus some typos. * Implement 'shorten' method for each name part * fix typo, thanks unit tests * bugfix: parameter got shifted * Output shortened name in interactive CLI generator. Signed-off-by: Kurt Garloff <[email protected]> Signed-off-by: Matthias Büchse <[email protected]> Co-authored-by: Matthias Büchse <[email protected]>
1 parent 1e24ed4 commit 52fd69c

File tree

3 files changed

+53
-15
lines changed

3 files changed

+53
-15
lines changed

Standards/scs-0100-w1-flavor-naming-implementation-testing.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ of a GPU) result in what GPU part of the flavor name.
5353

5454
#### Nvidia (`N`)
5555

56-
We show the most popular recent generations here. older one are of course possible as well.
56+
We show the most popular recent generations here. Older one are of course possible as well.
5757

5858
##### Ampere (`a`)
5959

6060
One Streaming Multiprocessor on Ampere has 64 (A30, A100) or 128 Cuda Cores (A10, A40).
6161

62-
GPUs without MIG (one SM has 128 Cude Cores and 4 Tensor Cores):
62+
GPUs without MIG (one SM has 128 Cuda Cores and 4 Tensor Cores):
6363

6464
| Nvidia GPU | Tensor C | Cuda Cores | SMs | VRAM | SCS name piece |
6565
|------------|----------|------------|-----|-----------|----------------|
@@ -138,14 +138,14 @@ Cores and 64 Stream Processors per CU.
138138

139139
#### intel Xe (`I`)
140140

141-
##### Xe-HPC (Ponte Vecchio) (`12.7`)
141+
##### Xe-HPC (Ponte Vecchio) (`3`)
142142

143143
1 EU corresponds to one Tensor Core and contains 128 Shading Units.
144144

145-
| intel DC GPU | Tensor C | Shading U | EUs | VRAM | SCS name piece |
146-
|--------------|----------|-----------|-----|------------|-------------------|
147-
| Max 1100 | 56 | 7168 | 56 | 48G HBM2e | `GI12.7-56-48h` |
148-
| Max 1550 | 128 | 16384 | 128 | 128G HBM2e | `GI12.7-128-128h` |
145+
| intel DC GPU | Tensor C | Shading U | EUs | VRAM | SCS name part |
146+
|--------------|----------|-----------|-----|------------|----------------|
147+
| Max 1100 | 56 | 7168 | 56 | 48G HBM2e | `GI3-56-48h` |
148+
| Max 1550 | 128 | 16384 | 128 | 128G HBM2e | `GI3-128-128h` |
149149

150150
## Automated tests
151151

Tests/iaas/flavor-naming/flavor-name-check.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ def main(argv):
8686
nm2 = _fnmck.outname(ret2)
8787
if nm1 != nm2:
8888
print(f"WARNING: {nm1} != {nm2}")
89+
snm = _fnmck.outname(ret.shorten())
90+
if snm != nm1:
91+
print(f"Shortened name: {snm}")
8992
argv = argv[1:]
9093
scs = 1
9194

Tests/iaas/flavor-naming/flavor_names.py

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ class Main:
162162
raminsecure = BoolAttr("?no ECC", letter="u")
163163
ramoversubscribed = BoolAttr("?RAM Over", letter="o")
164164

165+
def shorten(self):
166+
return self
167+
165168

166169
class Disk:
167170
"""Class representing the disk part"""
@@ -171,20 +174,29 @@ class Disk:
171174
disksize = OptIntAttr("#.GB Disk")
172175
disktype = TblAttr("Disk type", {'': '(unspecified)', "n": "Networked", "h": "Local HDD", "s": "SSD", "p": "HiPerf NVMe"})
173176

177+
def shorten(self):
178+
return self
179+
174180

175181
class Hype:
176182
"""Class repesenting Hypervisor"""
177183
type = "Hypervisor"
178184
component_name = "hype"
179185
hype = TblAttr(".Hypervisor", {"kvm": "KVM", "xen": "Xen", "hyv": "Hyper-V", "vmw": "VMware", "bms": "Bare Metal System"})
180186

187+
def shorten(self):
188+
return None
189+
181190

182191
class HWVirt:
183192
"""Class repesenting support for hardware virtualization"""
184193
type = "Hardware/NestedVirtualization"
185194
component_name = "hwvirt"
186195
hwvirt = BoolAttr("?HardwareVirt", letter="hwv")
187196

197+
def shorten(self):
198+
return None
199+
188200

189201
class CPUBrand:
190202
"""Class repesenting CPU brand"""
@@ -206,6 +218,12 @@ def __init__(self, cpuvendor="i", cpugen=0, perf=""):
206218
self.cpugen = cpugen
207219
self.perf = perf
208220

221+
def shorten(self):
222+
# For non-x86-64, don't strip out CPU brand for short name, as it contains the architecture
223+
if self.cpuvendor in ('i', 'z'):
224+
return None
225+
return CPUBrand(self.cpuvendor)
226+
209227

210228
class GPU:
211229
"""Class repesenting GPU support"""
@@ -226,13 +244,29 @@ class GPU:
226244
vram = OptIntAttr("#.V:GiB VRAM")
227245
vramperf = TblAttr("Bandwidth", {"": "Std BW {<~1GiB/s)", "h": "High BW", "hh": "Very High BW"})
228246

247+
def __init__(self, gputype="g", brand="N", gen='', cu=None, perf='', vram=None, vramperf=''):
248+
self.gputype = gputype
249+
self.brand = brand
250+
self.gen = gen
251+
self.cu = cu
252+
self.perf = perf
253+
self.vram = vram
254+
self.vramperf = vramperf
255+
256+
def shorten(self):
257+
# remove h modifiers
258+
return GPU(gputype=self.gputype, brand=self.brand, gen=self.gen, cu=self.cu, vram=self.vram)
259+
229260

230261
class IB:
231262
"""Class representing Infiniband"""
232263
type = "Infiniband"
233264
component_name = "ib"
234265
ib = BoolAttr("?IB")
235266

267+
def shorten(self):
268+
return self
269+
236270

237271
class Flavorname:
238272
"""A flavor name; merely a bunch of components"""
@@ -250,14 +284,15 @@ def __init__(
250284

251285
def shorten(self):
252286
"""return canonically shortened name as recommended in the standard"""
253-
if self.hype is None and self.hwvirt is None and self.cpubrand is None:
254-
return self
255-
# For non-x86-64, don't strip out CPU brand for short name, as it contains the architecture
256-
if self.cpubrand and self.cpubrand.cpuvendor not in ('i', 'z'):
257-
return Flavorname(cpuram=self.cpuram, disk=self.disk,
258-
cpubrand=CPUBrand(self.cpubrand.cpuvendor),
259-
gpu=self.gpu, ib=self.ib)
260-
return Flavorname(cpuram=self.cpuram, disk=self.disk, gpu=self.gpu, ib=self.ib)
287+
return Flavorname(
288+
cpuram=self.cpuram and self.cpuram.shorten(),
289+
disk=self.disk and self.disk.shorten(),
290+
hype=self.hype and self.hype.shorten(),
291+
hwvirt=self.hwvirt and self.hwvirt.shorten(),
292+
cpubrand=self.cpubrand and self.cpubrand.shorten(),
293+
gpu=self.gpu and self.gpu.shorten(),
294+
ib=self.ib and self.ib.shorten(),
295+
)
261296

262297

263298
class Outputter:

0 commit comments

Comments
 (0)