A small, easy-to-use open source database of over 2000 GPUs with architecture, manufacturing, API support and performance details sourced from TechPowerUp.
![forks - dbgpu](https://img.shields.io/github/forks/painebenjamin/dbgpu?style=social)
Installation
DBGPU is available on PyPI and can be installed with pip:
pip install dbgpu
In order to be as minimal as possible (the package is only 170kb
compressed,) some features are only available as additional dependencies. To install any additional package, use pip install dbgpu[package]
:
dbgpu[tabulate]
will install tabulate for pretty-printing tables.dbgpu[fuzz]
will install thefuzz for fuzzy searching.dbgpu[build]
will install requests, beautifulsoup4 and tqdm for building the database.dbgpu[socks]
will install PySocks for SOCKS proxy support.dbgpu[all]
will install all optional dependencies.
Usage
Python API
from dbgpu import GPUDatabase
database = GPUDatabase.default()
spec = database["GeForce GTX 1080"]
print(spec)
This is the output without tabulate
available; see below for an example with it installed.
----------------
GeForce GTX 1080
----------------
GPU Name: GP104
Manufacturer: NVIDIA
Architecture: Pascal
Foundry: TSMC
Process Size: 16 nm
Transistor Count: 7.2 billion
Transistor Density: 22.9 million/mm²
Die Size: 314 mm²
Chip Package: BGA-2150
Release Date: 2016-05-27
Generation: GeForce 10
Bus Interface: PCIe 3.0 x16
Base Clock: 1,607 MHz
Boost Clock: 1,733 MHz
Memory Clock: 1,251 MHz
Memory Size: 8.0 GB
Memory Type: GDDR5X
Memory Bus: 256 bit
Memory Bandwidth: 320.3 GB/s
Shading Units: 2,560
Texture Mapping Units: 160
Render Output Processors: 64
Streaming Multiprocessors: 20
Tensor Cores: Unknown
Ray Tracing Cores: Unknown
L1 Cache: 48.0 KB
L2 Cache: 2.0 MB
Thermal Design Power: 180 W
Board Length: 267 mm
Board Width: 112 mm
Board Slot Width: Dual-slot
Suggested PSU: 450 W
Power Connectors: 1x 8-pin
Display Connectors: 1x DVI, 1x HDMI 2.0, 3x DisplayPort 1.4a
DirectX Version: 12.1
OpenGL Version: 4.6
Vulkan Version: 1.3
OpenCL Version: 3.0
CUDA Version: 6.1
Shader Model Version: 6.7
Pixel Rate: 110.9 GPixel/s
Texture Rate: 277.3 GTexel/s
Half Float Performance: 138.6 GFLOP/s
Single Float Performance: 8.9 TFLOP/s
Double Float Performance: 277.3 GFLOP/s
Available fields and their types are:
class GPUSpecification:
manufacturer: MANUFACTURER_LITERAL
name: str
gpu_name: str
generation: str
base_clock_mhz: Optional[float]
boost_clock_mhz: Optional[float]
architecture: Optional[str]
foundry: Optional[str]
process_size_nm: Optional[int]
transistor_count_m: Optional[float]
transistor_density_k_mm2: Optional[float]
die_size_mm2: Optional[float]
chip_package: Optional[str]
release_date: Optional[date]
bus_interface: Optional[str]
memory_clock_mhz: Optional[float]
memory_size_gb: Optional[float]
memory_bus_bits: Optional[int]
memory_bandwidth_gb_s: Optional[float]
memory_type: Optional[str]
shading_units: int
texture_mapping_units: int
render_output_processors: int
streaming_multiprocessors: int
tensor_cores: int
ray_tracing_cores: int
l1_cache_kb: float
l2_cache_mb: float
thermal_design_power_w: Optional[int]
board_length_mm: Optional[float]
board_width_mm: Optional[float]
board_slot_width: Optional[str]
suggested_psu_w: Optional[int]
power_connectors: Optional[str]
display_connectors: Optional[str]
directx_major_version: Optional[int]
directx_minor_version: Optional[int]
opengl_major_version: Optional[int]
opengl_minor_version: Optional[int]
vulkan_major_version: Optional[int]
vulkan_minor_version: Optional[int]
opencl_major_version: Optional[int]
opencl_minor_version: Optional[int]
cuda_major_version: Optional[int]
cuda_minor_version: Optional[int]
shader_model_major_version: Optional[int]
shader_model_minor_version: Optional[int]
pixel_rate_gpixel_s: Optional[float]
texture_rate_gtexel_s: Optional[float]
half_float_performance_gflop_s: Optional[float]
single_float_performance_gflop_s: Optional[float]
double_float_performance_gflop_s: Optional[float]
To use your own database:
from dbgpu import GPUDatabase
database = GPUDatabase.from_file("path/to/database.json")
Supported formats are JSON, CSV and PKL. The PKL format is the fastest to load and is recommended for large databases.
Command Line
$ dbgpu lookup "GeForce GTX 1080"
╒═══════════════════════════════════════════════════════════════════════╕
│ GeForce GTX 1080 │
├───────────────────────────────────────────────────────────────────────┤
│ GPU Name | GP104 │
│ Manufacturer | NVIDIA │
│ Architecture | Pascal │
│ Foundry | TSMC │
│ Process Size | 16 nm │
│ Transistor Count | 7.2 billion │
│ Transistor Density | 22.9 million/mm² │
│ Die Size | 314 mm² │
│ Chip Package | BGA-2150 │
│ Release Date | 2016-05-27 │
│ Generation | GeForce 10 │
│ Bus Interface | PCIe 3.0 x16 │
│ Base Clock | 1,607 MHz │
│ Boost Clock | 1,733 MHz │
│ Memory Clock | 1,251 MHz │
│ Memory Size | 8.0 GB │
│ Memory Type | GDDR5X │
│ Memory Bus | 256 bit │
│ Memory Bandwidth | 320.3 GB/s │
│ Shading Units | 2,560 │
│ Texture Mapping Units | 160 │
│ Render Output Processors | 64 │
│ Streaming Multiprocessors | 20 │
│ Tensor Cores | Unknown │
│ Ray Tracing Cores | Unknown │
│ L1 Cache | 48.0 KB │
│ L2 Cache | 2.0 MB │
│ Thermal Design Power | 180 W │
│ Board Length | 267 mm │
│ Board Width | 112 mm │
│ Board Slot Width | Dual-slot │
│ Suggested PSU | 450 W │
│ Power Connectors | 1x 8-pin │
│ Display Connectors | 1x DVI, 1x HDMI 2.0, 3x DisplayPort 1.4a │
│ DirectX Version | 12.1 │
│ OpenGL Version | 4.6 │
│ Vulkan Version | 1.3 │
│ OpenCL Version | 3.0 │
│ CUDA Version | 6.1 │
│ Shader Model Version | 6.7 │
│ Pixel Rate | 110.9 GPixel/s │
│ Texture Rate | 277.3 GTexel/s │
│ Half Float Performance | 138.6 GFLOP/s │
│ Single Float Performance | 8.9 TFLOP/s │
│ Double Float Performance | 277.3 GFLOP/s │
╘═══════════════════════════════════════════════════════════════════════╛
This is the output with tabulate
available; see above for an example without it installed.
Here is a potentially useful bash one-liner to look up the local machine, assuming the availability of the nvidia-smi
tool:
dbgpu lookup "$(nvidia-smi --query-gpu=name --format=csv,noheader | awk '{$1=""; print $0}' | cut -c2-)"
Building a Database
When installing from PyPI, the latest database is included. If you want to build the database yourself, you can use the dbgpu
command line tool:
dbgpu build
Note that requests are limited to 4 per minute to be courteous to TechPowerUp's servers. With over 2000 GPUs, a full build will take over 10 hours, with most of it spent waiting.
For that reason, if you need to build your own database, it's recommended to limit the build to a specific manufacturer and/or year range, e.g.:
dbgpu build --manufacturer NVIDIA --start-year 2023
Pass --help
for more options.
Usage: dbgpu build [OPTIONS]
Builds a database of GPUs from TechPowerUp.
Options:
-o, --output PATH Output file path. [default: /home/benjamin/mini
conda3/envs/enfugue/lib/python3.10/site-
packages/dbgpu/data.pkl]
-m, --manufacturer TEXT GPU manufacturers to include. Pass multiple
times for multiple manufacturers. [default:
NVIDIA, AMD, Intel, ATI, 3dfx, Matrox, XGI,
Sony]
-y, --start-year INTEGER Start year for GPU database. [default: 1986]
-Y, --end-year INTEGER End year for GPU database. [default: 2024]
-d, --courtesy-delay FLOAT Delay in seconds between requests. [default:
15.0]
-p, --proxy TEXT HTTPS proxy URL.
-t, --timeout FLOAT Timeout in seconds.
-r, --retry-max INTEGER Maximum number of retries. [default: 5]
-R, --retry-delay FLOAT Delay in seconds between retries. [default:
15.0]
--help Show this message and exit.
License
DBGPU is licensed under the MIT License. See LICENSE for more information.
Acknowledgements
This project is not affiliated with TechPowerUp, but could not exist without their website. If you find this project useful, please consider supporting them.