[Tasks] Add computeCapability to NVIDIA GPUs in hardware.ts#2010
[Tasks] Add computeCapability to NVIDIA GPUs in hardware.ts#2010
Conversation
Add CUDA Compute Capability version numbers to all 105 NVIDIA GPU entries in the hardware specs database. This enables downstream consumers to filter or group GPUs by architecture/capability level (e.g. for CUDA compatibility). Co-Authored-By: Claude <Agents+claude@huggingface.co>
|
Stacked PR: #2011 adds |
| /** | ||
| * CUDA Compute Capability (NVIDIA GPUs only) | ||
| */ | ||
| computeCapability?: number; |
There was a problem hiding this comment.
i would say simpler to do version comparisons that way (also it's used as an integer in the kernels package)
There was a problem hiding this comment.
but why: do you have a preference for strings?
There was a problem hiding this comment.
It's quite usual to store the nvidia compute capabilities as major * 10 + minor so it becomes easy to do comparison. It also works seemlessly for AMDGPU gfx<compute_capability:integer> (ex: gfx1150).
|
LGTM - If there is a path where you'd like to display some more "informative" info on the Hub UI, maybe an enum for each provider would fit best: enum NvidiaComputeCapabilities {
BLACKWELL_RTX = 12.0,
BLACKWELL = 10.0,
HOPPER = 9.0,
AMPERE_RTX = 8.6,
AMPERE = 8.0
...
}Can make it easier for a reader to map these numbers to actual literals used by NVIDIA on their comm |
Or even a comment could suffice for now, as a reference for contributors. |
pcuenca
left a comment
There was a problem hiding this comment.
Amazing, thanks for taking the time to dive into this!
Summary
computeCapabilityfield to theHardwareSpecinterface representing the CUDA Compute Capability version numbercomputeCapabilityfor all 105 NVIDIA GPU entries, covering architectures from Maxwell (5.3) through Blackwell (12.0/12.1)Compute Capability Mappings
Test plan
npx tsc --noEmitpasses with no errorscomputeCapabilityvalueNote
Low Risk
Low risk, additive change: extends
HardwareSpecwith an optional field and populates static NVIDIA SKU data; main risk is minor downstream assumptions about SKU shape or increased bundle size.Overview
Adds an optional
computeCapabilityfield toHardwareSpecinhardware.tsto capture NVIDIA CUDA compute capability.Populates
computeCapabilityacross the NVIDIA GPU entries inSKUS, enabling consumers to filter/group hardware by CUDA compatibility without changing existing required fields.Written by Cursor Bugbot for commit 4e1c621. This will update automatically on new commits. Configure here.