John Hubbard
2025-Nov-06 22:24 UTC
[PATCH 3/6] gpu: nova-core: Blackwell: basic GPU identification
On 11/6/25 6:44 AM, Timur Tabi wrote:> On Wed, 2025-11-05 at 19:54 -0800, John Hubbard wrote: >> ???? let hal = match chipset { >> -??????? GA102 | GA103 | GA104 | GA106 | GA107 | GH100 | AD102 | AD103 | AD104 | AD106 | AD107 >> => { >> +??????? GA102 | GA103 | GA104 | GA106 | GA107 | GH100 | AD102 | AD103 | AD104 | AD106 | AD107 >> +??????? | GB100 | GB102 | GB202 | GB203 | GB205 | GB206 | GB207 => { >> ???????????? KBox::new(ga102::Ga102::<E>::new(), GFP_KERNEL)? as KBox<dyn FalconHal<E>> >> ???????? } > > Maybe combine patches 2 and 3? Also, maybe this should be a range check, instead of listing > every since version? It seems like everything past GA100 uses the GA102 HAL. >Sure, I can combine the patches. I'm not sure why I've been wary of using ranges for these arch's. I'll try it out. thanks, John Hubbard
John Hubbard
2025-Nov-19 01:46 UTC
[PATCH 3/6] gpu: nova-core: Blackwell: basic GPU identification
On 11/6/25 2:24 PM, John Hubbard wrote:> On 11/6/25 6:44 AM, Timur Tabi wrote: >> On Wed, 2025-11-05 at 19:54 -0800, John Hubbard wrote: >>> ???? let hal = match chipset { >>> -??????? GA102 | GA103 | GA104 | GA106 | GA107 | GH100 | AD102 | AD103 | AD104 | AD106 | AD107 >>> => { >>> +??????? GA102 | GA103 | GA104 | GA106 | GA107 | GH100 | AD102 | AD103 | AD104 | AD106 | AD107 >>> +??????? | GB100 | GB102 | GB202 | GB203 | GB205 | GB206 | GB207 => { >>> ???????????? KBox::new(ga102::Ga102::<E>::new(), GFP_KERNEL)? as KBox<dyn FalconHal<E>> >>> ???????? } >> >> Maybe combine patches 2 and 3? Also, maybe this should be a range check, instead of listing >> every since version? It seems like everything past GA100 uses the GA102 HAL. >> > > Sure, I can combine the patches. > > I'm not sure why I've been wary of using ranges for these arch's. > I'll try it out.Now I know. :) Unlike C, Rust does *not* like it when we try to treat enums as integers. Casting or other (messier) approaches are required, and in no case is the end result a more readable on-screen experience. At least not so far. It is possible to mix in Architecture (Turing, Ampere, etc) checks, but I'm not sure that is worth the additional clutter. Maybe let's just do the long lists of chipsets for now...? thanks, -- John Hubbard