Skip to content

Instantly share code, notes, and snippets.

@jowens
Last active April 28, 2024 16:51
Show Gist options
  • Save jowens/bd15b42accaa20e9c403af89719a5256 to your computer and use it in GitHub Desktop.
Save jowens/bd15b42accaa20e9c403af89719a5256 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
table_html = """
<table class="wikitable" style="font-size: 85%; text-align: center;">
<tbody><tr>
<th rowspan="2">Model<br />(<a href="/wiki/Code_name" title="Code name">Code name</a>)
</th>
<th rowspan="2">Launch
</th>
<th rowspan="2"><a href="/wiki/Microarchitecture" title="Microarchitecture">Architecture</a><br />&amp;&#160;<a href="/wiki/Semiconductor_device_fabrication" title="Semiconductor device fabrication">fab</a>
</th>
<th rowspan="2">Transistors<br />&amp;&#160;die size
</th>
<th colspan="2">Core
</th>
<th colspan="2"><a href="/wiki/Fillrate" title="Fillrate">Fillrate</a><sup id="cite_ref-Boost_1-0" class="reference"><a href="#cite_note-Boost-1">&#91;a&#93;</a></sup><sup id="cite_ref-Texture_fill_2-0" class="reference"><a href="#cite_note-Texture_fill-2">&#91;b&#93;</a></sup><sup id="cite_ref-Pixel_fill_3-0" class="reference"><a href="#cite_note-Pixel_fill-3">&#91;c&#93;</a></sup>
</th>
<th colspan="3">Processing power<sup id="cite_ref-Boost_1-1" class="reference"><a href="#cite_note-Boost-1">&#91;a&#93;</a></sup><sup id="cite_ref-FLOPS_4-0" class="reference"><a href="#cite_note-FLOPS-4">&#91;d&#93;</a></sup> (<a href="/wiki/FLOPS" title="FLOPS">GFLOPS</a>)
</th>
<th colspan="5">Memory
</th>
<th rowspan="2"><a href="/wiki/Thermal_design_power" title="Thermal design power">TDP</a>
</th>
<th rowspan="2">Bus<br />interface
</th>
<th rowspan="2">Graphic&#160;output<br />ports
</th></tr>
<tr>
<th>Config<sup id="cite_ref-Core_config_5-0" class="reference"><a href="#cite_note-Core_config-5">&#91;e&#93;</a></sup>
</th>
<th>Clock<sup id="cite_ref-Boost_1-2" class="reference"><a href="#cite_note-Boost-1">&#91;a&#93;</a></sup><br />(<a href="/wiki/Hertz" title="Hertz">MHz</a>)
</th>
<th>Texture<br />(<a href="/wiki/Texel_(graphics)" title="Texel (graphics)">GT</a>/s)
</th>
<th>Pixel<br />(<a href="/wiki/Pixel" title="Pixel">GP</a>/s)
</th>
<th><a href="/wiki/Half-precision_floating-point_format" title="Half-precision floating-point format">Half</a>
</th>
<th><a href="/wiki/Single-precision_floating-point_format" title="Single-precision floating-point format">Single</a>
</th>
<th><a href="/wiki/Double-precision_floating-point_format" title="Double-precision floating-point format">Double</a>
</th>
<th>Size<br />(<a href="/wiki/Gigabyte" title="Gigabyte">GB</a>)
</th>
<th>Bandwidth<br />(<a href="/wiki/Gigabyte" title="Gigabyte">GB</a>/s)
</th>
<th>Bus&#160;type<br />&amp;&#160;width
</th>
<th><a href="/wiki/Cache_(computing)#GPU_cache" title="Cache (computing)">L3<br />cache</a>
</th>
<th>Clock<br />(<a href="/wiki/Transfer_(computing)" class="mw-redirect" title="Transfer (computing)">MT/s</a>)
</th></tr>
<tr>
<th style="text-align:left;"><span class="nowrap">Radeon Pro V320</span><br />(Vega&#160;10)<sup id="cite_ref-6" class="reference"><a href="#cite_note-6">&#91;1&#93;</a></sup><sup id="cite_ref-7" class="reference"><a href="#cite_note-7">&#91;2&#93;</a></sup><sup id="cite_ref-8" class="reference"><a href="#cite_note-8">&#91;3&#93;</a></sup>
</th>
<td data-sort-value="" style="background: #DDF; vertical-align: middle; text-align: center;" class="no table-no2"><span data-sort-value="000000002017-06-29-0000" style="white-space:nowrap">Jun 29, 2017</span><br />(Custom SKU)
</td>
<td rowspan="2"><a href="/wiki/Graphics_Core_Next#fifth" title="Graphics Core Next">GCN&#160;5</a><br /><a href="/wiki/GlobalFoundries" title="GlobalFoundries">GF</a>&#160;<a href="/wiki/14_nm_process" title="14 nm process">14LPP</a>
</td>
<td><span class="nowrap"><span data-sort-value="7010125000000000000♠"></span>12.5<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>9</sup></span><br />495 mm<sup>2</sup>
</td>
<td>4096:256:64:-<br />64 CU
</td>
<td>852<br /><i>1000</i>
</td>
<td>218.1<br /><i>256.0</i>
</td>
<td>54.52<br /><i>64.00</i>
</td>
<td>13,959<br /><i>16,384</i>
</td>
<td>6,979<br /><i>8,192</i>
</td>
<td>436.2<br /><i>512.0</i>
</td>
<td>8&#160;or&#160;16
</td>
<td>484
</td>
<td><a href="/wiki/High_Bandwidth_Memory#HBM2" title="High Bandwidth Memory">HBM2</a><br />2048-bit
</td>
<td rowspan="3">—
</td>
<td rowspan="2">1890
</td>
<td>230&#160;W
</td>
<td rowspan="2"><a href="/wiki/PCI_Express#PCI_Express_3.0" title="PCI Express">PCIe&#160;3.0</a><br />×16
</td>
<td>4×&#160;<a href="/wiki/Mini_DisplayPort" title="Mini DisplayPort">miniDP&#160;1.4a</a>
</td></tr>
<tr>
<th style="text-align:left;"><span class="nowrap">Radeon Pro V340</span><br />(Vega&#160;10)<sup id="cite_ref-9" class="reference"><a href="#cite_note-9">&#91;4&#93;</a></sup><sup id="cite_ref-10" class="reference"><a href="#cite_note-10">&#91;5&#93;</a></sup><sup id="cite_ref-11" class="reference"><a href="#cite_note-11">&#91;6&#93;</a></sup><sup id="cite_ref-12" class="reference"><a href="#cite_note-12">&#91;7&#93;</a></sup>
</th>
<td><span data-sort-value="000000002018-08-26-0000" style="white-space:nowrap">Aug 26, 2018</span>
</td>
<td>
<table>
<tbody><tr>
<td>2×
</td>
<td><span class="nowrap"><span data-sort-value="7010125000000000000♠"></span>12.5<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>9</sup></span><br />495 mm<sup>2</sup>
</td></tr></tbody></table>
</td>
<td>
<table>
<tbody><tr>
<td>2×
</td>
<td>3584:224:64:-<br />56 CU
</td></tr></tbody></table>
</td>
<td>852<br /><i>1500</i>
</td>
<td>
<table>
<tbody><tr>
<td>2×
</td>
<td>190.8<br /><i>336.0</i>
</td></tr></tbody></table>
</td>
<td>
<table>
<tbody><tr>
<td>2×
</td>
<td>54.52<br /><i>96.00</i>
</td></tr></tbody></table>
</td>
<td>
<table>
<tbody><tr>
<td>2×
</td>
<td>12,214<br /><i>21,504</i>
</td></tr></tbody></table>
</td>
<td>
<table>
<tbody><tr>
<td>2×
</td>
<td>6,107<br /><i>10,752</i>
</td></tr></tbody></table>
</td>
<td>
<table>
<tbody><tr>
<td>2×
</td>
<td>381.7<br /><i>672.0</i>
</td></tr></tbody></table>
</td>
<td>2×&#160;16
</td>
<td>2×&#160;484
</td>
<td>HBM2<br />2×&#160;2048-bit
</td>
<td>300&#160;W
</td>
<td>1×&#160;miniDP&#160;1.4a
</td></tr>
<tr>
<th style="text-align:left;"><span class="nowrap">Radeon Pro V520</span><br />(Navi&#160;12)<sup id="cite_ref-13" class="reference"><a href="#cite_note-13">&#91;8&#93;</a></sup><sup id="cite_ref-14" class="reference"><a href="#cite_note-14">&#91;9&#93;</a></sup>
</th>
<td><span data-sort-value="000000002020-12-01-0000" style="white-space:nowrap">Dec 1, 2020</span>
</td>
<td><a href="/wiki/RDNA_(microarchitecture)" title="RDNA (microarchitecture)">RDNA</a><br /><a href="/wiki/TSMC" title="TSMC">TSMC</a>&#160;<a href="/wiki/7_nm_process" title="7 nm process">N7</a>
</td>
<td style="background: #EEE; vertical-align: middle; white-space: nowrap; text-align: center;" class="table-Un­known">?
</td>
<td>2304:144:64:-<br />36 CU
</td>
<td>1000<br /><i>1600</i>
</td>
<td>144.0<br /><i>230.4 </i>
</td>
<td>64.00<br /><i>102.4</i>
</td>
<td>9,216<br /><i>14,746</i>
</td>
<td>4,608<br /><i>7,373</i>
</td>
<td>288.0<br /><i>460.8</i>
</td>
<td>8
</td>
<td rowspan="2">512
</td>
<td>HBM2<br />2048-bit
</td>
<td>2000
</td>
<td>225&#160;W
</td>
<td rowspan="2"><a href="/wiki/PCI_Express#PCI_Express_4.0" title="PCI Express">PCIe&#160;4.0</a><br />×16
</td>
<td rowspan="2" data-sort-value="" style="background: #ececec; color: #2C2C2C; vertical-align: middle; text-align: center;" class="table-na">—
</td></tr>
<tr>
<th style="text-align:left;"><span class="nowrap">Radeon Pro V620</span><br />(Navi&#160;21)<sup id="cite_ref-15" class="reference"><a href="#cite_note-15">&#91;10&#93;</a></sup><sup id="cite_ref-16" class="reference"><a href="#cite_note-16">&#91;11&#93;</a></sup>
</th>
<td><span data-sort-value="000000002021-11-04-0000" style="white-space:nowrap">Nov 4, 2021</span>
</td>
<td><a href="/wiki/RDNA_2" title="RDNA 2">RDNA 2</a><br /><a href="/wiki/TSMC" title="TSMC">TSMC</a>&#160;<a href="/wiki/7_nm_process" title="7 nm process">N7</a>
</td>
<td><span class="nowrap"><span data-sort-value="7010268000000000000♠"></span>26.8<span style="margin-left:0.25em;margin-right:0.15em;">×</span>10<sup>9</sup></span><br />520 mm<sup>2</sup>
</td>
<td>4608:288:128:72<br />72 CU
</td>
<td>1825<br /><i>2200</i>
</td>
<td>525.6<br /><i>633.6</i>
</td>
<td>233.6<br /><i>281.6</i>
</td>
<td>33,638<br /><i>40,550</i>
</td>
<td>16,819<br /><i>20,275</i>
</td>
<td>1,051<br /><i>1,267</i>
</td>
<td>32
</td>
<td><a href="/wiki/GDDR6_SDRAM" title="GDDR6 SDRAM">GDDR6</a><br />256-bit
</td>
<td>128 MB
</td>
<td>16000
</td>
<td>300&#160;W
</td></tr></tbody></table>
"""
from html_table_extractor.extractor import Extractor
extractor = Extractor(table_html)
extractor.parse()
erl = extractor.return_list()
print(erl)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment