I think it's more appropriate to lump consoles based on hardware feature sets... So with that in mind, the Switch would be an 8th generation machine as it has all the hallmarks of 8th gen hardware features. I.E. Direct X 11 featuresets encompassing things like Tessellation, Compute Shader, Geometry Shader etc'.
..And that is in part due to using nVidia Maxwell GPU hardware which was a Direct X 11 designed part.
The 9th gen would encompass 1st generation hardware Ray Tracing consoles. Aka. Series S/X, Playstation 5 and Switch 2.
7th gen was all about fully programmable pixel shaders.
--::{PC Gaming Master Race}::--